04-30-2020 06:43 AM
Sorry, would you do the verification in that same state or in a different one?
Thank you
04-30-2020 06:57 AM
I have made some changes.
Now I reset the machine in the "REARM" state and then I took it to the "Comprobar rearme" state. In this state with the first function I receive what is written in the array and in that array I do the check. That is, I check if in the second position of that array it is number 2
Now it is okey?
I attach the new program
Best regards
04-30-2020 07:18 AM
Hi 99,
@labview99 wrote:
Now it is okey?
It okay, when it works for you…
(I didn't check the VI, but you can do some debugging with your real hardware on your own!)
05-06-2020 11:10 AM
Hi,
I HAVE A PROBLEM WITH THE PROGRAM I HAVE MADE.
THE PROGRAM CONSISTS OF MOVING A CYLINDER. WHEN THE CYLINDER IS MOVING IF SOMEBODY ENCROACH THE SECURITY BARRIER I HAVE TO SEND THE PROGRAM TO THE STATE CALLED "REARMAR". THEN I SEND TO THE STATE CALLED "vOLVER A MANDAR A POSICON" TO RESUME THE MOVEMENT.
MY PROBLEM COMES WHEN THE CYLINDER IS MOVING TO ITS SECOND, THIRD, FOURTH OR FIFTH POSITION. THERE IF THE SECURITY BARRIER IS INVADED INSTEAD OF RESUMING THE MOVEMENT AND TAKING THE POSITION TO WHICH THE CYLINDER SHOULD HAVE GONE, IT SENDS IT BACK TO THE FIRST POSITION AND I DON'T UNDERSTAND WHY.
COULD YOU HELP ME PLEASE
BESTE REGARDS
05-06-2020 01:06 PM
Please check your CAPS LOCK key. It seems to be stuck on.
I highly recommend you get rid of the Default case. That way if you add a state to your enum, the VI will show up as broken until you create the case that handles that new valuje. Right now, a new value would execute the Default case which is also the "Energizar motor" case. This sounds like a dangerous thing to have happen when you don't intend to.
I can't read your VI well enough to know what all the cases do, or know which one executes if the security screen is tripped.
But your state machine should keep track of what step it was on in a shift register, then know to return back to that state rather than the first state when it resumes.
05-06-2020 01:53 PM
05-07-2020 06:04 AM
I attach all the VI I have used, to see if someone can help me.
05-07-2020 06:11 AM
Sorry, I attach again the main VI with the default case eliminated