From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay in event driven log file data writing? Please help!!!

System Information

Operating System: XP

Labview: 8.2

Force sensor data acquisition via DAQPad-6070E

Actuator: Actuator via MCS-3D controller

 

Programming Information

 

Number of events: 13

Position read: Reads the position and the force sensor data every second.

Move I &  Forward:  Moves the actuator forward with a define step size

 

 

Two actuators are made to travel certain distance. A force sensor is attached to the system. The aim here is to acquire continuous data as per the defined time wait (1 sec). The data is logged in a text file which gives the position travelled from the actuator, the force sensor data with a time stamp.

 

 

The issues I am encountering is during writing a file.

 

For ex: When even is activated ( Move actuator at defined stepsize) the event are logged into the log file but the positions are updated into the log file only when the next event is activated. So it means that the positions and the force values are updated into the logfile after the consecutive event is executed. If you see the logfile ex inside the attachment the red block explains the event executed but the position are updated in the next line (event). This file is just for example.

 

 

Please help here I am going wrong!

 

Thanks in advanced

Download All
0 Kudos
Message 1 of 6
(2,472 Views)

Hi,

I think this is because you're logging the data to soon. Before you write the Data to your File the move from the actuator has to be completed.

 

regards

0 Kudos
Message 2 of 6
(2,442 Views)

Thanks Method M!

 

Do you have an idea how can I get rid of this unwanted delay?

 

Regards

Itz

0 Kudos
Message 3 of 6
(2,391 Views)

Do you have a Time Out Case in your Event Structure?

 

Best Regards

0 Kudos
Message 4 of 6
(2,388 Views)

In your Screenshot, i can see, that you always add a "-1" to the Timeout Terminal from the Event Case. If you wire a "1000" to this input, the Event Case will get every second into the Timeout case and that means, the vlaues from the acuator will be written every second into the log file.

0 Kudos
Message 5 of 6
(2,378 Views)

Dear Method M

 

I find it out what was going on. As you mentioned that I was writing the values before the actuators achieving the final position, so I introduced a delay between the execution of two SubVI's. It isnt a clean method but it works.

 

 

thank you very much!

 

Regards

Itz

0 Kudos
Message 6 of 6
(2,342 Views)