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-12-2020 02:15 PM
Hi all,
I am a new user to LV. I am using a high sampling rate NI Scope VI to write to a binary file. I modified it to write a 2 channel data. The gain, offset, and xincrement are prewritten to the actual data. I am facing problems in reading 2 channel data. When I give the data type as @D double to read VI. I read nothing. But when I give a 1D double, I was able to read 1 Ch data. Though I need to read complete data.
Please help.
05-12-2020 05:18 PM
Try closing the file when you are done writing to it. Then open it back up to read.
OR
Use the Set File Position to set the file pointer back to the beginning of the file before doing your reads.
05-12-2020 05:36 PM
Hi crossrulz,
Thanks for the reply.
I tried Set file pointer. And I am ending up with the Error 116.
Even I deleted writing gain, offset and x increment and only writing the waveform data.
Please see the fig. and the Vi
Thank you
Kiran
05-12-2020 05:38 PM
Sorry modified vi was missing
05-12-2020 06:15 PM
So this time you turned off the Prepend Array Size on your write. I think you want to turn that back to TRUE and then read 2D arrays until you reach the end of the file (I think its error code 4). You can then append however you need to in order to have your channels properly put together. I'm thinking it might be better to use a TDMS file so that you can make sure your channels' data are going to the right place and you get it properly when you read a channel.
05-12-2020 06:16 PM
Hi crossrulz,
I solved it. Tried closing and reopening the file and wirting the file with prepend to True.
Thanks
05-13-2020 02:28 PM
Hi crossrulz,
Yes I was able to solve it by forcing prepend to true. But with TDMS file I am running into memory errors with bigger fetch sizes in Ni Scope