02-14-2017 11:13 AM
I am currently working on a data acquisition system using a cRIO 9025. On the target VI, I have a low priority loop which sends live values to the HMI, and I have a high priority loop which handles creating a data stream to be sent to the host computer and logged to file. At the moment, the application uses the FPGA to collect data from 5 NI 9236 modules and now I would like to include data from a CAN bus.
I have added an NI 9862 to the system which is connected to a CAN bus with ECU's transmitting data at 200 Hz. At first I tried creating a signal single-point-in session and reading the signals in the low priority loop to pass the data to the computer. However, doing so caused data points to be lost. So now I am thinking that I need to read the session in the high priority loop, but I would also like to continue reading the live values in the low priority loop for the HMI. If I wire one XNET session to two different Read Session VI's in separate loops, will there be a problem?
This might be a silly question but I am new to XNET and I want to make sure that the two read VI's will not interfere with each other.
02-15-2017 02:17 PM
Hi daqrookie,
No question is a silly question!
My first thought was that instead of doing 2 separate reads on your XNET session, you could just pass data from the high priority loop to the low priority loop. Take a look at this reference for some ideas on how to transfer data within your RT system:
https://zone.ni.com/reference/en-XX/help/370622K-01/lvrtconcepts/passing_data_between_vis/
Since you will just be sending the latest value to your HMI, you can store the values from the XNET session in a variable and have the low priority loop read it at a slower rate to send to the HMI. Since you don't need every single value, it won't matter if the variable is overwritten before you get a chance to read every value.
Cheers,
Ryan
02-16-2017 01:07 PM
I hadn't thought of that but it seems like a much better approach than what I was considering. I'll give it a try.
Thank you,
Brandon