LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the IXXAT CAN interface have a "Wait-state" capability similar to NI-CAN?

Solved!
Go to solution

Greetings,

We have a IXXAT USB-CAN adapter, so I'm using their "driver" VIs, however...

I came across an NI-CAN Read SDO example that writes a SDO request then waits for "state" = 2 before reading a response.  I assume this waits for some CAN-bus state or status bit, and seems like a good idea, but I can't figure out what IXXAT VIs to use, to accomplish a similar wait(?)

Thanks/Cheers!

0 Kudos
Message 1 of 7
(3,916 Views)

Hi 550nm,

 

Where did you find these drivers? Were they on our IDNet page? Can you post a link to the driver package, or attach the VIs in question? Also, can you list the directory for the NI-CAN example you mentioned? I took a surf through the example finder but couldn't find the one you referenced.

 

Nick 

Applications Engineer

0 Kudos
Message 2 of 7
(3,853 Views)

Hi Nick,

The NI-CAN example is found here.

The IXXAT "VCI" installer is here - it includes the USB/CAN adapter device-driver and LabVIEW examples.

 

Cheers!

0 Kudos
Message 3 of 7
(3,847 Views)

Hi Nick,

I _may_ have answered my own question...

On looking through the IXXAT "C-API" doc I found a function "canChannelWaitTxEvent".  In their LV wrapper DLL, there was a "lv_canChannelWaitTxEvent", though it was not represented in the IXXAT Channel VIs - so I made a VI for it.  It doesn't crash or hang LV and occasionally appears to wait for 300+ ms, though usually executes "instantly" (following SDO query message).

 

I'd still like to know exactly what the NI-CAN wait state (= 2) does!

 

Thanks/Cheers

0 Kudos
Message 4 of 7
(3,831 Views)
Solution
Accepted by topic author 550nm

I was able to find this documentation on the function ncWaitForState on page 2-37 of the CAN manual. This is essentially a blocking function that waits for the desired state to be reached. A list of states and their numeric identifiers can be found in Appendix A (pp. A-1 - A-2). 

 

"NI-CAN Programmer Reference Manual"

http://www.ni.com/pdf/manuals/370289c.pdf

 

Nick

 

Message 5 of 7
(3,826 Views)

Hi Nick,

Thanks for the pdf!

The description of the '2' bit may indicate NI-CAN is waiting for the same TX event I described...

"

Indicates that all data provided using ncWrite has

been successfully transmitted onto network. Set when

last transmission is successful

"

Cheers.

0 Kudos
Message 6 of 7
(3,812 Views)

Glad to help!

 

Nick

0 Kudos
Message 7 of 7
(3,796 Views)