04-12-2016 07:29 PM
Hello,
My set up:
Chassis NI cRIO-9074
Card NI 9205
Labview 2011 11.0 (32 bit)
Windows 7
I’m trying to record data (time, voltage, deformation) from strain gauges. I take the voltage from the NI card that I modify in order to obtain the deformation. For that, I filter the signal in a timed loop and after I make my calculation in a while loop. And I use shared variable to pass the data between the loops.
My problem is when I want to filter the signal, in the tree view project; I have to put the VI under the NI cRIO and not My Computer in order to have the Synchronize to Scan Engine option in the configure Timed Loop and filter my signal. But at this moment, I can’t use the tool Write to Measurement File.
And if I put my VIs under My Computer I can record but I don’t have the Synchronize to Scan Engine option for my Timed Loop.
Find hereby the VIs
Thank you for your help 🙂
04-13-2016 02:13 PM
Hi,
Just to start off, I'll explain some things about how your cRIO is placed in the project. When you're in the area underneath the cRIO target, this everything that's on the Real Time side of the cRIO. If you then place VI's underneath your FPGA target, they're on the FPGA target. The scan engine specifically runs on the Real Time OS. Because of this when you place your VI underneath my computer, the VI is now not running on a Real Time system which means certain RT functions won't work or you won't be able to access them (like synchronizing the timed loop to the scan engine).
I believe you should still be able to use the Write to Measurement File express VI on your RT target though. One thing to double check is that you don't have a dialog popping up asking where to save the file as RT VIs won't support User Interface options, because when the RT VI is running it will be running headlessy where Users can't input things. Also make sure the file path is correct by using this KB Working With File Paths on Real Time Targets: http://www.ni.com/tutorial/14669/en/. You also could consider using some of the lower level File I/O functions instead of the Express VI. These are more optimzed than the express VI's and will help if you're writing a lot of data.
04-13-2016 06:54 PM
Hi Da_Parrot,
Thank you for your help 🙂
So exactly, when I use the Write to Measurement File express VI on my RT target though, one window pop up (see below)
But it's like if I canceled the saving. I don't have before this window the one where I can choose the file path and the file name.
Then when I want to use lower level File I/O functions instead of the Express VI, I have an error 43:
Error 43 occurred at an unidentified location
Possible reason(s):
LabVIEW: Operation cancelled by user.
See hereby the VI.
So do you know how can I solve this problem, please.
Thank you again for your help!
04-13-2016 11:44 PM
My lower level VI didn't work because it needed a dialog box that I can have under the NI cRIO.
Then apparently I have to use absolute path but even with that I don't have any record.
The VI doesn't create the file and if I create the file before and I refer to its path, the VI doesn't write on the file
Find hereby the VI
Thank you again for any help 🙂
04-14-2016 11:42 AM
Are you trying to run this VI on the RT side? If so it looks like the file path your're pointing to is actually on the PC and not on the RT target. You'll have to point to path that's actually on the RT target. You can try /C and this should just write the file in the C directory.
04-14-2016 06:31 PM
Hi Da_Parrot,
Thank you again for your help 🙂
I'm still trying to run my VI on the RT side.
But with /C is still not working this time I have a error 1430
Again I must use absolute path.
Just to be sure, this is an absolute path below, for windows ?
C:\Users\s2976407\Desktop\test123.txt
Or do you know another way to record data on the RT side ?
04-14-2016 07:17 PM
I just thought maybe I can take the values on the RT side and use its on the Computer side, do you think is possible and how ?
Like this I filter my signal on the RT side and after I record it on the computer side.
04-14-2016 07:38 PM
@GriffUni wrote:Just to be sure, this is an absolute path below, for windows ?
C:\Users\s2976407\Desktop\test123.txt
Or do you know another way to record data on the RT side ?
You might want to give this a quick read: Working with File Paths on Real-Time Targets
04-14-2016 07:38 PM
@GriffUni wrote:I just thought maybe I can take the values on the RT side and use its on the Computer side, do you think is possible and how ?
Like this I filter my signal on the RT side and after I record it on the computer side.
Use Network Streams to send the data from the RT to the Windows. They are pretty simple to use.