LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why my "write to measurement file" did not work in my program?

hi ,
       pls kindly see the attached file that is my project. In my project, the "write to measurement file" didn't work that means didn't save in the .lvm file. Smiley SadCould you give some advices for it ? Thank you so much. I am looking forward your kindly reply.
 
With Respect,
Roxy
0 Kudos
Message 1 of 13
(5,330 Views)

Hi Roxy,

Are you trying to write to the CompactRIO locally? If so try writing to the C: drive instead of the 😧 drive, as that is the local storage for the cRIO.

Regards

Steve

 

Message 2 of 13
(5,320 Views)

hi ..

i have tried ur suggestion but it doesn't save the data yet . Do you have any other idea ? Thank you .

roxy

0 Kudos
Message 3 of 13
(5,278 Views)
Hi Roxy,
 
When you say that the file is not saving, where and how are you looking for the file that is being created?
Are any error codes being generated when you are running the host vi (create an indicator from the "error out" ternimal of the "Write to Measurement File"vi)?
Which cRIO controller are you using for your project?
 
Just to clarify that this method of creating a file will save the file to the cRIO's flash memory and not your computers 😧 drive.
 
I have attempted to replicate your issue using your original code and it worked successfully by creating a folder in the cRIO's memory called "d" and the text file was stored within this folder.
 
Regards
 
Steve
0 Kudos
Message 4 of 13
(5,253 Views)
hi
       i am using the NI 9101 chassis, NI 9012 controller and NI 9233 processor for my project.

the way i do was i creat the empty excel one file under C: or 😧 first and i change the extension to .lvm. And in the properties of the write to measurement file, i select the path where i create the .lvm file. then i run it.

when i run there shows no error except not saving in the lvm file.

what does it mean you said "by creating a folder in the cRIO's memory called "d" and the text file was stored within this folder" ? Could you explain me more details about it as i don't understand?

i will try to save in cRIO's flash memory as well.

thank you so much for your time. i am looking forward your kindly reply.

With Respect,
Roxy


0 Kudos
Message 5 of 13
(5,235 Views)

Hi Roxy,

To clarify, your cRIO controller (NI cRIO-9012) has 128MB of nonvolatile storage where it is able to store data. So when you use the "Write to Measurement File" VI within the "NI 9233 (Host)" VI it is automatically storing data to the memory within your cRIO controller.

This data can be viewed by

  1. Navigating to Start>>Run
  2. Typing ftp://ipaddressofrthost/d in the command field eg ftp://192.168.0.52/d        (This should launch Internet Explorer)
  3. Select View>>Open FTP Site in Windows Explorer

This should bring up the folder containing the data file. You should then be able to access the data file from there.

 

However, this is not an ideal way of storing data as the nonvolatile memory is used for storing the software as well as any information which may be stored during aquisition. By writing data files to this memory it could potentially fill up the controllers memory.

A much better method would be to create network communications between the "NI 9233 (Host)" and a Windows Host. This can be done by TCP, Shared Variables, UDP or VI server communication. This will allow you to write measurement files directly to your computers hard drive from the Windows host rather than the RT host. This will aid in keeping the memory free in the RT Target (cRIO).

An example of this can be found in the NI Example Finder within LabVIEW, under the headings Real-Time>>Network Communication as shown in the .jpeg file I have attached.

Hope this helps

Regards

Steve

 

 

Message 6 of 13
(5,219 Views)
hi,
    Thank you so much. It works. Now i would like to ask something about the displayed waveform. pls kindly see the two attached files. The difference between these two is with and without "build waveform". actually i want waveform to be shown from the start to the end of the running time(time'x axis') like without build waveform.vi But i need to use the "build waveform" for my project like with build waveform.vi as well. So how should i do? Thank you so much for your time.
 
With Respect,
                      Roxy
Download All
0 Kudos
Message 7 of 13
(5,197 Views)

Hi Roxy,

I've had a look at your example VIs as well as your project, and have written (and attached) two example VIs which should illustrate a solution to your query.

Hope they help

Regards

Steve

Download All
Message 8 of 13
(5,172 Views)
HI
     Thank you so much for your answers. i would like to ask you about the timing for x axis for charts. i would like to make the x axis as real time (show in second 's') just like a stop watch.
At the X-axis---- When i press the run button, i want it to start counting from 0 second and when i press stop button, the counting will be stoped at that time in the chart.
 
Secondly, In the labView programme, is the default time of the X-axis millisecond OR second ?
Is it the real time counting ? 
 
with regards,
Roxy
0 Kudos
Message 9 of 13
(5,157 Views)

Hi Roxy,

I've written another simple example VI for you and attached a few .jpeg files which should help illustrate my following explanation.

Firstly, the scaling of the x-axis will depend on the timing implemented in the code of the VI, for example if there is no timing the units of the x-axis will be milliSeconds, in the example I've written I have stated for the code to execute every 100mS so each increment on the x-axis corresponds to 0.1second.    To convert into seconds you will need to go into the chart's properties dialog box, go into the "Scaling" tab and then configure the "Multiplier" field based on the code timing (as shown in ChrtProp Dialog Box - Scales.JPG).

To format the chart to display time similar to a that of a stopwatch display you will have to go into the chart Properties dialog box and configure the scaling tab similar to that in ChrtProp Dialog Box - Display Format.JPG.

In order for the chart to display all the data from t=0 to finish just right-click on the x-axis and select "AutoScale X".

Hope this answers your questions

Regards

Steve

Message 10 of 13
(5,142 Views)