LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN VIs returns never error

I used: CAN Get Names.vi, CAN Init Start.vi, CAN Get Property.vi and CAN Read.vi (from nicantsk.llb) to acquire data from CANSAS-SC16 to CAN-port.

 

It worked fine.

 

But when I disconnected the cable from CAN-port and run "Highlight Excecution", the Error Cluster showed always OK.


Is there a VI, which can return status if hardware connected (or disconnected) like RS-232?

0 Kudos
Message 1 of 2
(2,218 Views)

Hey,

 

You need to read "2D Time & DBL", this will produce an error if there is no message within a timeout.

The help says:

If Timeout is greater than zero, the VI will wait for number of samples to read messages to arrive. If number of samples to read messages are not received before the Timeout expires, an error is returned. Timeout is specified as milliseconds

 

 

Christian

0 Kudos
Message 2 of 2
(2,169 Views)