LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

start /stop time; write to same spreadsheet

I have created a VI that a switch will start a timer and another switch will stop the timer. My setup which contains six inderpendant switches. I am trying to write this data (the difference between the start and stop times for each switch set) to a spreadsheet. All the starting switches go into a different port than the stoping switches.

 

My first attachment below is the program working correctly without any attempts to write to spreadsheet. The second attachment is my attempt to write the data to a spreadsheet. It results in 6 zeros everytime...

 

Every set of switches has a different start time which may be my problem...? And I also need to make the file an absolute reference...?

 

I also know that I need to take the resulting start and stop times from my working model and subtract them... 

Is there an eaiser way than what I have tried to subtract the two values (find the resulting time) and write those six values to a spreadsheet?

 

I truly appreciate your help!

Download All
0 Kudos
Message 1 of 4
(2,953 Views)

You have some basic misunderstandings of dataflow. Easiest would be to keep the start times and stop times in an array and in a shift register.

 

Since I don't have your hardware, I turned your boolean indicator into controls so you can play with the logic.

 

See if it makes sense.

 

 

0 Kudos
Message 2 of 4
(2,909 Views)

Wow! Thank you so much!

 

I am still fairly new to labview and therefore am still confused on changing from control to indicator. Using this similar logic, what would I need to change on the block diagram to make it work for my boolean indicator?

 

Thanks so much!

0 Kudos
Message 3 of 4
(2,885 Views)

Just right-click...change to indicator. This will break the wires because there is not data source. Ignore the black bad wires but don't remove them. 

 

Now they need a data source, which is the boolean array from your DAQ in this case. Just hook it up and the wires will turn green again. 😄

0 Kudos
Message 4 of 4
(2,881 Views)