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-09-2012 03:47 PM - edited 05-09-2012 03:49 PM
SYSTEM:
I am using a cRIO system connected to a host PC via ethernet.
One of the pieces of my cRIO system I'm having a problem with is using CAN.
BACKGROUND:
FPGA waits for a read, and when a message is received (U8 Array format), it shoves each element into a U8 Target-to-Host FIFO.
RT sees the message in the FIFO, collects it, and builds it into a 2D U8 Array (in case more that one message is received) and appends it to a growing 2D U8 Array.
PROBLEM:
Originally, I was passing that 2D array off to the Host computer through a Network Variable, and displaying it on the front panel of the host machine. This works, except over time this 2D U8 array gets huge- especially if I'm using an echo.
Ultimately I want the host to display the entire history, but having the RT rewrite that entire variable every time and sending the whole thing over the network slows it down.
FAILED ATTEMPTS:
I was hoping to change it to a Queue, but apparently it can only be accessed by other elements in the host (in this case, the LabVIEW RT Module.)
Writing a blank array to the Network Variable after reading it obviously causes major race condition issues.
QUESTION:
Any suggestions on how to pass this data to the host without losing data?
Is it possible to have something similar to a queue or FIFO over the network?
Thanks,
~Andrew
Solved! Go to Solution.
05-09-2012 05:22 PM
05-09-2012 05:55 PM
I'm going to have to try the Network Stream. I haven't used one before and once you mentioned it, I remember reading about that in the RT Manual/User Guide thing.
I don't have to disconnect my host at any point. (I had thought about going that route at one point but decided against it for my first RT project.)
I'm going to try that. THanks.