LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview data logging

I want log acc data. 

please tell me what's wrong in this code.

Thank you.

0 Kudos
Message 1 of 5
(1,151 Views)

Hi DMT,

 


@DNS_MTB wrote:

please tell me what's wrong in this code.


The block diagram is too big for a FullHD screen: clean up and use more subVIs!

Documentation is missing for most of us because you use some Unicode chars for non-English languages. Please provide code comments in English!

 

Do you got any problems? What exactly do you want us to look for?

 

All I see is a big problem due to not obeying to "THINK DATAFLOW!": the logging loop will not run until the main DAQ loop has finished.

Please see the example projects for Producer-Consumer schmes coming with LabVIEW to learn how to handle such stuff…

 

Other problems:

Why are you writing stuff into a queue just the dequeue the data a nanosecond later?

Why are you trying to access the content of the very same queue in a different loop?

Why don't you use shift registers to hold all kind of references?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,145 Views)

We have succeeded in saving data using the producer-consumer functino!

 

Now we need to intergrate N sample data(acceleration-velocity), but it is difficult to set the initial velocity value of the next loop to the last velocity value of the previous loop.

 

Help me.

 

I have attached the current code.

0 Kudos
Message 3 of 5
(1,060 Views)

@DNS_MTB wrote:

but it is difficult to set the initial velocity value of the next loop to the last velocity value of the previous loop.

 


Why would it be difficult?  That is the job of a shift register or feedback node!

0 Kudos
Message 4 of 5
(1,058 Views)

Hi DMT,

 


@DNS_MTB wrote:

We have succeeded in saving data using the producer-consumer functino!


Are you sure you are saving correct values?

There are two race conditions in the consumer loop because of those two local variables! Use wires instead…

 


@DNS_MTB wrote:

Now we need to intergrate N sample data(acceleration-velocity), but it is difficult to set the initial velocity value of the next loop to the last velocity value of the previous loop.


There is no "acceleration" or "velocity" in your VI: would you mind to provide some/more English comments in your VI?

Best regards,
GerdW


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