From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-08-2014 08:13 AM
Hi,
I have a program written to take a torque reading from a transducer. the transducer has an offfset error when starting, ie it thinks it is at -2, when it should be zero.
to solve this the program currently takes the initial reading, and uses this as an offset for the rest of the readings, which are acquired in a for loop.
I need to develop a way of doing this manually, ie the user can press a button, and whatever value has just been read is the used as the zero point offset.
I have tried to do this using a simple case structure within the loop, where the initial value is used, until the button is pressed and the current value is used. however this does not work, as it keep using the updated value of the output array.
I have next tried to index the array so it is at the point the button is clicked, however the index is also counting up so the offset follows the output value still.
Any thoughts on how to solve this?
Thanks,
JM
08-08-2014 08:33 AM
Hi Jon
My Name is Jonathan & I work with NI UK in the Applications Engineering Department.
Im not 100% with what you need to achieve, however I have created an example of using Event Structures and property nodes to reset an input value to 0 which may give you some inspiration to adapt to your application,
Please find it attached to this post as well as a screenshot, if you need this VI adapting to a different version of labVIEW other than 2013 then please let me know and i'd be happy to convert it for you.
I hope this gives you something to go on.
Cheers
J
08-08-2014 08:54 AM
I dont need to reset the value to 0, i need to reset it to whatever value the for loop holds at that time.
I have now solved this problem with a shift register built into the case structure. thanks for you help anyway
08-08-2014 03:55 PM