LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming data and writing data to measurement file problem

 Hi everyone,

I found something wrong about my code but i don't know exactly what it is first i have a program for acquiring 15 analog signals(NI PXI6259) after acquiring the data i use network stream to stream data from my NI PXI8186 to the host pc these steps are in target VI, after streaming data to host PC
, i tried to write down the data to the spreadsheet using Express write to measurement VI.

Problems : 1. After i run the host Vi and target Vi the number available to read is always 0 after sometimes the data displaying on the chart incdicator on host Vi is stopped and start counting the numberavailable to read also the time indicated on X axis of the chart doesn't grow.
                     2. Write to measurement file generate the file that record the data counting the data from 0 to 99 and start over and over again

 Please help i really have no idea what is the cause for each problems.

 

Download All
0 Kudos
Message 1 of 4
(2,282 Views)

You are likely getting an error from your target.  A big flag I am seeing is that you are trying to read every 100ms, but you set your DAQmx buffer size to be 100ms worth.  I highly recommend removing the input to "Samples Per Channel" on the DAQmx Timing VI.  That way the buffer can be as large as the card will allow.

 

Another thing you can do to clean up your target VI is to use a FOR loop for initializing all of your channels.  Just make an array of your channels and keep adding to the task.  Store the task in a shift register.  You will also need to use the Create Task VI before the FOR loop.  But all of that is a lot easier to read than a huge chain for Create Channel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,262 Views)

Dear Crossrulz

 

        Thank you for your prompt reply i have removed the input to "Samples Per Channel" on the DAQmx Timing VI already but still didn't arrange the 
channels input i will do it but i want to keep it this way first. Now the data acquiring looks okay but i have found new problem.
        After running the program for acquiring the data for about 5 to 6 minutes the program will stop acquiring the data or

sometimes the target (NI pxi8186) will reboot itself and displaying message "Reboot due to system error" "System state: Safe Mode (System error)

and on the Host PC there will be a window pop-up displaying

"Waiting for the target (NI-PXI8186-2F0a597C) to respond"  "Stop Waiting and Disconnect"

 i didn't run the host Vi just run the target Vi only. If this problem caused from the program or the hardware ? Please help.

Download All
0 Kudos
Message 3 of 4
(2,233 Views)

I'm not seeing anything in your code that should cause the PXI RT system to go belly up.  It is looking like you might have a hardware issue with your PXI controller.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,218 Views)