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.
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.
05-02-2017 11:59 PM
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!
Solved! Go to Solution.
05-03-2017 04:37 PM
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
05-03-2017 05:41 PM
05-04-2017 03:30 PM
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
05-04-2017 05:00 PM
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
05-05-2017 03:38 PM
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.
05-08-2017 10:44 AM
Glad to help!
Nick