NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

J1939 Add-on Feedback

Daniel,

I built the source and attempted to deploy with VeriStand. I got this in the prompt window:

• Start Date: 5/3/2016 7:07 AM • Loading System Definition file: \\tsclient\G\stash\Custom Device Stuff\J1939 Addon VS Project\J1939 Device.nivssdf • Preparing to deploy the System Definition to the targets... • Compiling the System Definition file... • Initializing TCP subsystem... • Starting TCP Loops... • Connection established with target PXI RT PharLap. • Sending reset command to all targets... • Preparing to deploy files to the targets... • Starting download for target PXI RT PharLap... • Opening WebDAV session to IP 10.64.244.90... • Processing Action on Deploy VIs... • Deploying XNET database: j1939 • Gathering target dependency files... • Closing WebDAV session... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The VeriStand Gateway encountered an error while deploying the System Definition file.  Details: Error 7 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi  Possible reason(s):  LabVIEW:  File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct. ========================= NI-488:  Nonexistent GPIB interface. ========================= NI VeriStand:  NI VeriStand Gateway.lvlib:VeriStand Server Wrapper.vi >> NI VeriStand Server.lvlib:NI VeriStand Server.vi >> System Definition Deployment.lvlib:Deployment Dialog.vi >> System Definition Deployment.lvlib:Deploy Target Files.vi >> System Definition Deployment.lvlib:Get Target Dependency Files.vi ========================= NI VeriStand:  Source: C:\Users\Public\Documents\National Instruments\NI VeriStand 2015\Custom Devices\J1939 Addon\Pharlap\J1939 Addon Engine Pharlap.llb System Explorer Path: Targets/PXI RT PharLap/Custom Devices/J1939 Addon  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * • Stopping TCP loops. Waiting for TCP loops to shut down... • TCP loops shut down successfully. • Unloading System Definition file... • Connection with target PXI RT PharLap has been lost.

I will continue to investigate...

0 Kudos
Message 151 of 175
(2,298 Views)

supported_targets_config_fix_j1939_lv2015.PNG

I edited the Custom Device Addon xml from the updated LV2015 source for this project to look like this. I think it is the fix I needed.

Fixed: This change to the Custom Device Addon xml was exactly what was needed.

0 Kudos
Message 152 of 175
(2,298 Views)

Noticing that the device is not transmitting CAN message on channel value change as configured. Is there anyway to diagnose? I am not getting any errors during or after deployment via VeriStand.

Fixed: line termination was off.

0 Kudos
Message 153 of 175
(2,298 Views)

Daniel,

I notice that the custom device places 0xFF's in used bytes for messages. I would like to modify the device so that is will do the same for the messages I have added to the database. Anyway guidance on how to make this work?

0 Kudos
Message 154 of 175
(2,298 Views)

Are you referencing fill bytes?  If so, there is no way to do this natively that I can find (I wish there was).  If you want to force it in the database, you can set the signals of the frame to default values that result in xFF.

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 155 of 175
(2,298 Views)

Daniel,

I need to add channels to the device when it initializes. What is the name of the VI that runs when the device is added under Custom Devices in VS, that adds the necessary channels for the device?

[solved]

0 Kudos
Message 156 of 175
(2,298 Views)

"I keep track of frame position (offset and length) in the data array by arbitration ID.  So, I can pass the function a desired arb ID and it returns the offset and length of that frame in the data array, which I then use to get or set all the signal values contained within the frame"

Where is the function/VI that allows/does this?

0 Kudos
Message 157 of 175
(2,298 Views)

Data Lookup Table is the main one I was referencing.  Conversion Lookup Table does something similar.

Thanks!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 158 of 175
(2,298 Views)

Daniel,

I recognize that the data for each CAN frame is stored in a big array and searchable by CAN ID.

Question: Do the signal positions in the array by CAN ID occur in the same order for each CAN ID as they appear in the XNET database file under that CAN ID?

0 Kudos
Message 159 of 175
(2,298 Views)

I don't believe you can make that assumption.  Partly because the user can individually select which signals to use.  Therefore, they could read some but not all.  This would screw up the order for sure.  Even if they do add all signals, I do no checks on order against the database.  In fact, XNET doesn't care about order once you get to reading/writing/scaling.  All that matters is the order that is put into the XNET initialization function.  So, the signal positions in the array by CAN ID will match the order of the configued signals when they go into the XNET initialize scaling function.

Does that help?

Thanks!


Dan Eaton

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 160 of 175
(2,298 Views)