From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Read and write with Labview

Hello,
I´m developing and application with Labview and CAN using a PCMCIA card. I want to see in the same panel(front panel) some displays that show values that are read from the messages in the bus and also i have some displays in the same panel that send some messages to the bus just clicking. But i can´t use read.vi and write.vi at the same time in the diagram. How can i do it? is it possible using Sub.vi? Must i open two different panels(and also two different diagrams)? Thanks a lot
e.c.
0 Kudos
Message 1 of 3
(3,558 Views)
Double check which CAN read and write functions you are using. There are 2 different ways to read and write to the bus, CANobject, and CANnet.

CANobjects use a ObjectHandle to refer to just that object, meaning you can assign and configure 1 CAN message with that object. If you try to use the wrong object handle for the wrong CAN message you will get errors. Each CAN message will usually have its own object handle.

CANnet is a more basic function, the CANreadNet and CANwriteNet basically are a simple way of sending and recieving any CAN message. If you are sending and recieving strictly with CANnet calls, they will usually share the same NCCANconfigure, meaning you use 1 object handle to refer to the CAN bus interface for both reads and writes.

the CANo
bject reads and writes are more complex, but they do have distinct advantages, and the CANnet reads and writes are more primitive, but also more universal.

Check out the NI-CAN examples for more help at this link;
<>
0 Kudos
Message 2 of 3
(3,558 Views)
Thanks for your answer. I have seen that CANobject and CANnet are used when working with Frame API. I´m new so i have only worked with Channel API. Is not possible to do it with Channel API?
Thanks a lot
e.c.
0 Kudos
Message 3 of 3
(3,558 Views)