LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logging data with LabView and FP-DI-330

Hi,
I have a problem.
I am monitoring 6 ports of the FP-DI-330, via LabView.
I have it runing in a while loop that desides the update frequency. It then get stored in a txt file with the time in Hours, Minutes and Seconds. I need the time in milli seconds to skill betwen the diferent input times. Because the different input´s can come in the same second.

i have added the vi file

Enyone have an sugestion?
0 Kudos
Message 1 of 8
(3,324 Views)
I would throw out the display stuff if you want to log the changing pattern. So don't display the boolean array and the spreadsheet string.
Further in your vi, you forgot to connect the current time to the Get Date/Time string. Can't you use the millisecond values for building the time-values? Absolute time can be calculated using the file-info of the log-file.
This VI will create a big logfile, why don't you add an extra line to your file when the boolean array changes. You could use XY graph afterwards for viewing purposes?
Just some ideas.
0 Kudos
Message 2 of 8
(3,324 Views)
First of all...
i will throw away the boolean display. But the Spreadsheet is the formation of the logfile is it not?
I will need that to get the data nicely organized.
I dont know how to get milli seconds displayed enywhere. If i use for example the tick count (MS) it starts with a number around 3287101, should it not start with 1 and then count up?

"Further in your vi, you forgot to connect the current time to the Get Date/Time string. Can't you use the millisecond values for building the time-values?"

How can i connect the current time to the Get Date/Time String? And how should i use the ms timer values for building time-values.

file-info of the log-file? What?

Thanks for the ideas but i could really use some help.

I would think th
at it could not be that dificult making a simple ms count to add to the time for every line of the logfile. But i cant get it to work.
0 Kudos
Message 3 of 8
(3,324 Views)
You do not have to display data in order to use it.
Displaying data is expensive in terms of processing-time (you wanted a fast response) aspecially on every loop.
I modified your code a bit to get the idea.
I don't have the poly FP vis' and the HW so was unable to test.
You understand my ideas now?
0 Kudos
Message 4 of 8
(3,324 Views)
Your nodified code dos not work properly. It only runs one time then the case goes on false.

It doesnt count rigth either.
0 Kudos
Message 5 of 8
(3,324 Views)
In this code, the case should go on false most of the time.
When the DI from the FP-330 CHANGES, one extra line is added to the log-file. I told you about that in my first reply.
And if there is something wrong in my code, it is the intention of these kind of fora to exchange ideas, not given somebody else a pre-cooked solution. In that way one gaines more knowledge, which should be the overall purpose of this forum.
If you want a tested vi, you can hire me.
0 Kudos
Message 6 of 8
(3,324 Views)
It was just a kind of a statement that i cant se enything about your VI that could be the answer to my problem. The VI you gave me says me absolute nothing.
0 Kudos
Message 7 of 8
(3,324 Views)
The Vi you gave me is totaly stript of any time making. And exactly how am i gonna make the ms timer and and the clock syncronize so they start the same time?
0 Kudos
Message 8 of 8
(3,324 Views)