LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write value to Excel once based on input

Not sure if I'm having a logjam in my head or what, but I can't figure this out... Labview newbie too.

I have a DIO card from Labjack. It samples an analog input. Everytime a digital input (a button) goes high, I want to write the current value to Excel and carriage return. I've tried For loops, case structures, etc. Problem seems to be that if the button is on, it continues to write data into my spreadsheet. I just want one value written each time the button goes on... I only want it to write on, say, the falling edge of the signal. In a PLC I would set a bit on one scan, on the next scan this bit would enable the write command and also reset the bit. Labview is confusing my ladder logic and C programming background. Any ideas? I attached what I've been working on...

Thanks...
0 Kudos
Message 1 of 3
(1,699 Views)
Hi,
From what i can get by your explanation,Do you want to write the analog value when the DIO goes ON{High},or do you want to write when ever there is a value change,if its for a value change ie high to low{ON to OFF} or low to high{OFF to ON} then we must be making use of a shift reg to keep track of the old state ,by this we can track the stste and when ever there is a change we will write the corrosponding Analog value to a excel file.
Hope this helps,else reply i shall put up a example
cheers
vicky
0 Kudos
Message 2 of 3
(1,697 Views)
Thanks, however I figured it out (or found someone else's VI that solved the problem)... this nifty one-shot VI sends a true on only one iteration, even if the input remains high. Wound up being less trivial than I thought it would be.

Thanks for the advice...
0 Kudos
Message 3 of 3
(1,679 Views)