LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help a Newbie with writing time and date to Measurement File

I need help with taking data and showing current time and date on both a chart and writing it to a measurement file.

Essentially I am taking in data from an encoder that outputs data in amps. From here I taking that output current and converting it to a position value in inches. Then calculating velocity which would be outputted on a chart. However, I can't seem to show the current date and time. This VI is running separately over the network. I am using a NI 9207 module on a CompactRIO-9045

I have attached the Vi I am using which is on LabVIEW 2020.

Any assistance would be appreciated and since I am a newbie I might not have given you all the information you might need to help me but I can provide more if needed.

 

Thanks 

0 Kudos
Message 1 of 9
(1,223 Views)

Your VI is missing.

0 Kudos
Message 2 of 9
(1,210 Views)

Sorry I thought I attached it.

0 Kudos
Message 3 of 9
(1,184 Views)

Hi AverageJoe,

 


@YourAverageJoe wrote:

Then calculating velocity which would be outputted on a chart. However, I can't seem to show the current date and time.


Technical solution to your question: convert the scalar FeedRate value into a waveform, then display the waveform in your chart. The chart will now allow to display timestamps on the x axis…

 

Your really should cleanup the VI:

  • no sequence structure needed
  • no need for ExpressVIs just to calculate some simple formulas
  • why do you set a sample rate in your DAQmx task, when you limit the iteration speed of the while loop using a wait function?
  • why do you read "N samples" when you only use one single sample per iteration???
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(1,157 Views)

Thank you for the help.

 

Do you know a good way to save this information to the measurement file. I've been trying to find a way for it to save the time stamps as well as the data in like lets say 2 columns and have it presented nicely.

 

Any assistance would be great

0 Kudos
Message 5 of 9
(1,116 Views)

'Get Date/Time String' or 'Format into string' (if you want more control) will convert a timestamp to a string that you can write.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 9
(1,108 Views)

How is that parameter pass through the write to measurement file express VI. Any help would be appreciated

 

Thanks

0 Kudos
Message 7 of 9
(1,095 Views)

Hi Joe,

 


@YourAverageJoe wrote:

I've been trying to find a way for it to save the time stamps as well as the data in like lets say 2 columns and have it presented nicely.


Then you need to provide your data as two columns (aka 2D array). Right now you only save a 1D array, resulting in just one columns…

 

Judging from your VI you should take the "Training resources" to learn LabVIEW basics (like data handling with correct datatypes)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(1,089 Views)

Yes again I'm still learning and I believe I found some way of making it play nice. Thanks for the training resources.

Here is what I have after some time making my own revisions.

 

Let me know what you think.

0 Kudos
Message 9 of 9
(1,066 Views)