LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware automation sequencing (switch-function inside while-loop)

Hi SJL,

 

It's been fruastrating because I spent so far 2 months trying to get this done:

if A<=5

and B is pressed

if I ask the machine to go

1->2->3

instead of

1->3

From this description I would be frustrated too - I cannot recognize the logic behind this!

There are just two IF statements, but no THEN… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 14
(1,040 Views)

Core 1-2 are proper training materials. You can learn a lot from these modules. You can go to your "My account" --> "My NI", and check if you can still access the training videos...

0 Kudos
Message 12 of 14
(1,038 Views)

The logic is:

 

Say,

LowHeight

Move(destination)

points A,B,C

 

if (A<=LowHeight && Move(C).pressed=true){

Move(B);

A=B;

}

Move(C)

}

0 Kudos
Message 13 of 14
(1,035 Views)

Hi SJLPHI,

 

if (A<=LowHeight && Move(C).pressed=true){
   Move(B);
   A=B;
}
Move(C)

So you check a condition of a Move(C) call before you even call this Move(C)?

 

But again: use a state machine. Use a shift register to store current conditions of your states (like "Move.pressed")…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 14
(1,021 Views)