05-17-2018 10:01 PM
Good afternoon,
I am working to implement a CAN bus control of a piece of construction equipment useing the NI-9860 CAN module and the XNET database which I setup through he editor. I been through most of the tutorials and have it setup mostly but I have hit an issue.
I run a simple program just to test my messages and I see the message I expect (I am connected directly to a PCAN adapter). But I it only send about 20 messages then stops. I get no errors in the code. I can't post the database and the code is pictured below.
Basically I have my message setup as Cyclic,
I am writing to just one DB (the only one that the data changes in)
I expect the message to be sent at my Cyclic Rate Until I stop the APP and send the Default values for the rest of the frame which it does but only about 20 times.
Thanks in advance for any help!
Gene
Code
Session Setup
Frame Setup in DB
Solved! Go to Solution.
05-18-2018 09:08 AM
Interesting. Nothing about your VI or DB immediately jumps out at me as problematic. I would expect it to send cyclic messages indefinitely.
Do you see the same results if you create a session with the create session VIs instead of the I/O control?
05-18-2018 09:56 AM
I will give it a try. My only other theory is I dont have a termination resistor and this causes some sort of errors at the HW level that adds up. I am connected directly from my 9860 to the PCAN adapter. But now that I think about it I do have my equipment connected also and it is not powered. Still seems like a stretch.
05-18-2018 10:01 AM
You can throw a property node into the code immediately after the create session to turn on Interface:CAN:Termination and rule it out.
Failing that my thoughts are that we may have a bug or something in the Session I/O Controls which my sample code should help us confirm or reject.
05-18-2018 07:50 PM
Thanks Jeff! All I had to do was enable the termination resistor wit the property node and all is well. I suppose it is possible that it was still sending messages and the PCAN adapter gave up due to to many errors. But I think the 9860 stopped sending but I couldn't find a way to tell that at run time