LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for a minimum doesn't work

Please attach the latest code (without event). Most of it is obscured in your picture.

0 Kudos
Message 11 of 16
(1,439 Views)

Create an indicator on the equals ouputSmiley Wink The Probes Should show the same value most of the time while running!  Smiley Surprised

 

What did I Say!:

Lets look:

  • The xyz data is dequeued and processed and the result placed on the SR
  • a simple calc finds the value for probe 9
  • The loop iterates and while waiting for new data.... which won't be there for 500 ms - the value for probe 10 is calculated

To put it simply: you proved conclusively that the passed to the output SR of one iteration it the value on the input SR of the next iterationSmiley Very Happy Hey, isn't that how it is supposed to work?

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 16
(1,437 Views)

@JÞB wrote:

Create an indicator on the equals ouputSmiley Wink The Probes Should show the same value most of the time while running!  Smiley Surprised

 

What did I Say!:

Lets look:

  • The xyz data is dequeued and processed and the result placed on the SR
  • a simple calc finds the value for probe 9
  • The loop iterates and while waiting for new data.... which won't be there for 500 ms - the value for probe 10 is calculated

To put it simply: you proved conclusively that the passed to the output SR of one iteration it the value on the input SR of the next iterationSmiley Very Happy Hey, isn't that how it is supposed to work?

 


My consideration is as follows: the data that is going to output SR (right side) is actual iteration data, the data that is processed, whereas the data coming from input (left side) SR is data from previous iteration ... so these 2 values cannot be the same, isnt it ? But they are the same.

 

Well it seems I've found the block that do the job: time derivative.

But in anyway - is it possible in somehow to calculate incoming slope using ordinary staff (e.g. shift register) ?

 

Regards.

 

P.S. Altenbach, here is actual VI

 

time derivative.JPG

 

 

0 Kudos
Message 13 of 16
(1,410 Views)

 

Pavel,

 

In your previous post :  Lets assume i=n  Probe 10 is updated with the new data at the beginning of iteration n whereas probe 9 cannot be updated until new data becomes available (500mSec after the iterartion start) so probe 9 shows a value from i=n-1 for most of the time the loop is iterating.  As soon as probe 9 is updated the loop iterates again and probe 10 is nearly instantly updated again.  Thats why you see the same value in the probe watch window.

 

Turn on execution hightlighting to see what I mean or watch the Jing above


"Should be" isn't "Is" -Jay
Message 14 of 16
(1,389 Views)

Clear.

Thanks Jeff.

0 Kudos
Message 15 of 16
(1,360 Views)

@JÞB wrote:

 

Pavel,

 

In your previous post :  Lets assume i=n  Probe 10 is updated with the new data at the beginning of iteration n whereas probe 9 cannot be updated until new data becomes available (500mSec after the iterartion start) so probe 9 shows a value from i=n-1 for most of the time the loop is iterating.  As soon as probe 9 is updated the loop iterates again and probe 10 is nearly instantly updated again.  Thats why you see the same value in the probe watch window.

 

Turn on execution hightlighting to see what I mean or watch the Jing above


Jeff,

 

Finally I've found a solution that works ... I mean find extremum "min" and keep it until next iteration of the external loop. Here it is:

 

shift_register_to _find_minimum_issue_working_solution.JPG

0 Kudos
Message 16 of 16
(1,344 Views)