01-13-2016 03:13 PM
We are using XNET for J1939 CAN frame definitions and transmission. Is there a way to specify that the data should start out as all 0xFF's in the XNET Database Editor? Ideally, for the whole frame and not signal by signal.
01-14-2016 01:17 PM
HI swbpnole,
Unfortunately, the Database Editor does not have the functionality to specify default payload of a frame, only default values for that frame's signals. However, you have a few other options to acheive this. You can use the Default Payload Property of the Frame class to set the payload of a frame in software; you could implement this at the beginning of a VI before beginning the session or writing to it. Documentation for this property appears in the XNET Hardware and Software Manual on page 5-221 (see link below). You can use this property in a XNET Frame Property Node and create an array of U8's to set what the default value would be. Because you're using J1939, you'll need to make sure the length is 8 bytes precisely.
Additionally, there is a vi in the Example Finder, Editing Database with IO Control.vi, which performs a similar function. Using the property node as stated above would need to be done every run of the code. If you use the Editing Database vi, you can change the default payload of the frame and then save it in the database. This VI would take some modification NI-XNET Example subVI - Create CAN Frame.vi, expanding the cluster that is passed in and then putting that data into the Frame property node. Once this frame is created, it is saved off into the database. By using this VI as a framework, you could modify all of the frames you needed to and then save them into the database for future use.
NI-XNET Hardware and Software Manual -
http://www.ni.com/pdf/manuals/372840k.pdf