LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a specific time for measurement file?

Hello,

I am trying to get a sampling from a milling machine via RS-232 as shown in the VI (milling machine). This communication is set at  4800 baud rate; however I would like to save this data to file with a specific time (let says every second).

Can anyone  please tell me  how  I can deal with this?

kind regards,

tao-ncl
0 Kudos
Message 1 of 4
(3,092 Views)

Hi Taoncl,

It is very hard to work out what you want to do here, but I have looked at your code, and in your SubVI Milling Machine Get Motion [SUB] you write to an LVM file, this should put timing information in for you. I noticed you were using a .txt file as your file type, please rename this to .lvm

Can you post the files you are creating, both txt and LVM versions so I can see what is going on.

Regards
JamesC
NIUK AE
0 Kudos
Message 2 of 4
(3,062 Views)
Hi JamesC

This is a file that I got from that code. As you can see, in this file a number of sampling is relate to an execution time of the machine. However I need to do a sampling with a specific time, like every second.

Regards,

taoncl
0 Kudos
Message 3 of 4
(3,029 Views)
Hi Taoncl,

I don't see how you got the data file from the milling machine.llb you posted earlier.
In the llb, your LVM files are set to overwrite, so you should only get one data point in the LVM file.

you need to set your LVM files to "append".
Also about the timing, just before you write the data, use a get date/time, convert to dbl, and build into an array, you might need to build array and use Concatenate inputs. then write this to an LVM, that would make the 4th channel time, which you can pull out with an index array function.

Regards
James

0 Kudos
Message 4 of 4
(3,006 Views)