06-04-2022 11:29 AM
I'm using NI-XNET to communicate over a CAN bus. I am working with two CAN devices at two different addresses. I have defined all of the specifics of the CAN project using the XNET Database Editor.
This is what I don't understand: why does my code continue to run after I exit the routine that writes / reads from the bus, and continues to run until I close the labview program? The frame rate is 100mS on both read and write frames, and my bus sniffer (pCAN) continues to see bus traffic at that rate until labview is closed. Is this normal operation?
What am I missing? What am I doing wrong in my code?
06-04-2022 11:31 AM
I'm using NI-XNET to communicate over a CAN bus. I am working with two CAN devices at two different addresses. I have defined all of the specifics of the CAN project using the XNET Database Editor.
This is what I don't understand: why does my code continue to run after I exit the routine that writes / reads from the bus, and continues to run until I close the labview program? The frame rate is 100mS on both read and write frames, and my bus sniffer (pCAN) continues to see bus traffic at that rate until labview is closed. Is this normal operation?
What am I missing? What am I doing wrong in my code?
06-04-2022 12:22 PM
Please avoid duplicate posts - https://forums.ni.com/t5/LabVIEW/Using-XNET-CAN-with-LabVIEW/td-p/4234926
06-08-2022 09:32 AM
It would be helpful if you could post your vi.
06-08-2022 09:45 AM
Do you need more of my vi than what I already posted? What part would you like to see?
06-08-2022 09:52 AM - edited 06-08-2022 09:56 AM
Where your stop command is coming from? Seems like you either have some parallel process still running or you aren't stopping your while loop properly.
06-08-2022 09:56 AM
@charlieallanp wrote:
Do you need more of my vi than what I already posted? What part would you like to see?
You have posted pictures of your code. It is very difficult to debug a picture.
@charlieallanp wrote:
why does my code continue to run...?
You have some kind of queued state machine. You will need to stop both loops to stop your code from running.
06-08-2022 10:01 AM
We can't see what parts you have, os how can we answer that?
How do you close and stop you XNET sessions?