LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error messages appear to late

Hi 99,

 


@labview99 wrote:

But, if somebody stop the movement, the program stops. So I want to show one message and then go back to repeat the subVI in the posicion1.

In this case, first I show a message of RESETEAR and then I want to go again to the first case which is posicion1. And in the case of posicion1,  the program has to repeat again the subVI to move the cylinder to the correct position. 


You program stops for just one reason: someone needs to press the "stop" button on the frontpanel of "Prueba…".

There is no other condition to stop this VI!

 

Your VI already does implement your required state machine: "Posicion1", followed by "Posicion2" or "Resetear". In case of "Resetear" you already call "Posicion1" again. Just "Posicion2" ends undefined…

 

 

Best regards,
GerdW


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

Hi GerdW,

 

I know that the "posicion2" ends undifined I am just doing proves. And I know that the VI is going to stop when I press the button stop. What I want is to repeat again the action of the "posicon1" after doing the case of "resetear".

 

0 Kudos
Message 12 of 32
(1,820 Views)

Hi 99,

 


@labview99 wrote:

What I want is to repeat again the action of the "posicon1" after doing the case of "resetear".


You already do so…

Best regards,
GerdW


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

Hi GerdW,

I am going to try to explain what I want to do better.

Through my state machine I am controlling the movement of the cylinder. I send him some positions to which the cylinder has to go. But I can stop that movement and to continue the movement since dodne has stopped until the indicated position I have to do two things. First send a 0 in the fourth position of the array and then a 1. That should be sent in the array of "data to set" that I use in the subVI.
My problem is that I don't know how to do that by sending a 0 and then a 1 from the state machine if it is in the "reset" state.
data to set.PNG
In this array I have to put first the 0 and then 1 to resume the movement of the cylinder.
 
Best regards
0 Kudos
Message 14 of 32
(1,794 Views)

Hi 99,

 


@labview99 wrote:
First send a 0 in the fourth position of the array and then a 1. That should be sent in the array of "data to set" that I use in the subVI.
My problem is that I don't know how to do that by sending a 0 and then a 1 from the state machine if it is in the "reset" state.

First send this data frame with "0", then send this data frame with "1". What's the problem?

Best regards,
GerdW


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

Hi GerdW,

 

The problem is that in the mainVI I am not using those data frames. For that I am using the subVI

 

Best regards

0 Kudos
Message 16 of 32
(1,776 Views)

Hi 99,

 


@labview99 wrote:

First send a 0 in the fourth position of the array and then a 1.

 

The problem is that in the mainVI I am not using those data frames.


This is no problem at all!

 

All you need to do is:

  1. create data frame (aka "message") with "0" in the right place
  2. send the message
  3. create new message (or change the existing one) with "1" in the right place
  4. send that 2nd message…
Best regards,
GerdW


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

 

But I need to change this 0 1 en the frame that I have sentat the beginning and this frame of the beginning I have sent with the subVI. So how I chane this 0 1 in the frame of the beginning from the mainVI where no frame are appear.

 

Best regards

0 Kudos
Message 18 of 32
(1,768 Views)

Hi 99,

 


@labview99 wrote:

But I need to change this 0 1 en the frame that I have sentat the beginning and this frame of the beginning I have sent with the subVI. So how I chane this 0 1 in the frame of the beginning from the mainVI where no frame are appear.


The technical answer is "Use ReplaceArraySubset"…

 

You create a data frame in your subVI. Then you send this dataframe.

Now you are asking how to change that dataframe and send it again? Use ReplaceArraySubset and send the fram again! (As said several times before…)

Best regards,
GerdW


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

Hi GerdW,

 

I know how to do this in the subVI, I have already made this  befour.

But this is not my question, my question how to do it from the mainVI?

The subVI  I have made is only to send to a position. What I am asking I want to do it from the mainVI. The one that I sent befour.

 

Best regards

0 Kudos
Message 20 of 32
(1,759 Views)