LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Share data outside the event?

 

I am using an event to calibrate a force sensor by manually inputting data into a multicolumn listbox and getting a linear graph model. The slope and the intercept value I want to use outside the event structure where the DAQ is running parallel.

 

The methods I tried are to use shift register and data tunnel. If the event is active I get a value and in inactive its gives out zero. So the calibrated force value is always zero.

 

How can I get rid of this issue? Is my logic correct? Is there any other way to do it?

 

Thanks in advance

 

Regards

Download All
0 Kudos
Message 1 of 5
(2,492 Views)

Do you have any code in the timeout event case?

 

You have a shift register for the event structure timeout that is initialized to -1 meaning that the timeout will not occur.

 

But you have the output tunnel for the timeout shift register set to use default if unwired. So after the Calibrate event is fired the timeout value is set to zero meaning that the timeout event will continuously execute.

 

If there is nothing wired to the DBL shift register in the timeout case the value will be the default which is zero each time the timeout case is executed.

 

If you don't have any code in the timeout case just delete that case and disconnect the timeout value.

 

An easy way to use the Slope value outside of the event structure is to remove the shift register and use a local variable. But that is not the best architecture and is just a bandaid.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 5
(2,457 Views)

A shift regsiter is pretty useless unless you actually use a wire from the left terminal. Right? 😄

 

Currently anything placed in the shift register is never seen again. In order to retain the data, you need to wire from the left shift terminal across all event cases until the output tunnel of the event structure is a filled square.

0 Kudos
Message 3 of 5
(2,444 Views)

Dear All

 

SteveChandler: I have a code inside the Timeout which reads the force value continously. So I cant delete it.

:  True what you have said. I did the screen shots when i was experimenting with the shift register.

 

So can I have a simple idea how can I solve the issue here, so that i calibrate once and get the value stored and use this value to linearize the read out force values continously?

 

thanking you in advanced1

Regards

0 Kudos
Message 4 of 5
(2,408 Views)

You have the tunnels through the event structure set to use default if not wired. I can tell from the image that there are cases where they are not wired because the tunnel is not a solid box. Whenever one of those event cases executes the value coming out the tunnel will be the default value.

 

Like altenbach said you have to wire through the cases where the value on the shift register is not modified otherwise the modification will be that you get the default value.

 

There is no way anyone can tell you exactly where the problem is unless you attach your vi.

=====================
LabVIEW 2012


0 Kudos
Message 5 of 5
(2,389 Views)