Wrong Data Is Being Sent Through CAN Bus Using NI-XNET in LabVIEW NXG

Updated Jul 1, 2018

Reported In


  • PXIe-8510


  • LabVIEW



Issue Details

I am communicating with a CAN device using the NI XNET API and LabVIEW NXG but my device reports that no valid data is being sent. I verified that the correct data is being sent using a LabVIEW 2017 XNET CAN example. 


The XNET API for LabVIEW 20XX uses a typedef for the CAN frame in which the payload data is represented in Hexadecimal, while the XNET API for LabVIEW NXG uses a G Type for the CAN frame in which the payload data is in Decimal. Convert the data to decimal to make sure the same data is being sent as with LabVIEW 20XX.

LabVIEW 20XX CAN Frame, payload data represented in Hexadecimal

LabVIEW NXG CAN Frame, payload data represented in Decimal

Additional Information

To change the representation in the LabVIEW NXG Can Frame Control we need to disconnect the control from the G Type, by right clicking the control and selecting "Disconnect G Type".
After this, we can select any of the payload numeric controls and from the Item Pane on the right side, under the "Display Format" section, select "Hexadecimal" from the list. Additionally, we can choose to display the radix of the representation, by checking the "Show radix" option.


Not Helpful