LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error messages

Hi 99,

 


@labview99 wrote:

The problem is that when I have to push one button of the phisical machine because the cylinder has been stopped in the middle of the way I need to change the "dta receive" of the first subVI, without sending again the subVI


The motors I use send response messages containing actual positions and error flags. I can react on those values in a statemachine.

 

Your device also sends responses containing actual position - atleast you are waiting until setpoint and response are equal. Why can't you react on those values in your statemachine in a determined way?

Best regards,
GerdW


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

@labview99 wrote:

The problem is that when I have to push one button of the phisical machine because the cylinder has been stopped in the middle of the way I need to change the "dta receive" of the first subVI, without sending again the subVI

 

Best regards


If you need to do this then you need to break up your first subVI to be able to do this. You have lots of states buried in that subvi. Bring those states to the top level and then you have more control. This may mean making more subvis (please do make icons that describe the subvi instead of using the generic icon - it will make your life a lot easier).

0 Kudos
Message 22 of 143
(1,470 Views)

I don´t know what you are saying to do

Sorry...

0 Kudos
Message 23 of 143
(1,467 Views)

Your recibir datos.vi has a flat sequence structure. The code in each of those frames of the flat sequence structure represents a state of your state machine. If you divide those up then you can make decisions at each state, change values, etc. You may not even need to use a subvi - just do it all in the state at the top level.

0 Kudos
Message 24 of 143
(1,463 Views)

I think I have got it.

One qyuestion how can I convert hexadecimal to binary?

 

Thank you

0 Kudos
Message 25 of 143
(1,454 Views)

Hi 99,

 


@labview99 wrote:

One qyuestion how can I convert hexadecimal to binary?


Why do you need this? You can AND/OR with U16 to test bits, too…

(There's a ToBooleanArray function.)

Best regards,
GerdW


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

@labview99 wrote:

I think I have got it.

One qyuestion how can I convert hexadecimal to binary?

 


I hope you realize that hex, bin, and decimal are all the same numbers...

Frozen_0-1584116072471.png

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 27 of 143
(1,429 Views)

Hi GerdW,

 

Sorry about all my questions... I still don´t know how you tell me to do the errors in the state machine. I use one VI to send the cylinder to one position.I send a command and it receives the data that I sent and the cylinder moves. But the problem comes when I provoke or I caused the cylinder to stop. If that situation occurs, I have to program to for the cylinder to resume its movement. To program that I have to make the next thing: I have to put the flag to 0 and then again put it to 1. But I can´t send a knew data, I have to make this change in the data I send befour,because I want  the cylinder to resume its movement and finish going to the position commanded at the beginning. So, if the cylinder stop befour arriving to the indicated position, I send to an error state in the machine but how can I do in this state the change of the flag of the data I have sent at the beginning?

 

Best regards

0 Kudos
Message 28 of 143
(1,401 Views)

Can you share what you have tried? Have you brought the states from your subvi to your top level vi? One of your states would be to check to see if the cylinder has stopped moving. If it has stopped moving then you have a state which determines if it has completed its movement (it has gone to the right location) or it needs to continue. You then take the appropriate action. This is how a state machine works. It sounds to me, though, like you're still trying to use that terrible subvi that you were using earlier. With that approach you're not going to be able to achieve what you want to achieve.

0 Kudos
Message 29 of 143
(1,389 Views)

Hi,

Thank you for helping me 

I start doing what you say and I have done the VI to see if the cylinder is moving. Now, when the cylinder stops I want to see if it has arrived to the correct position. I start doing a new VI but I need to take the datas of the data received of the Vi that I have done "detectar movimiento cilindro". How can I use this data in another VI?

Appart from using global variable is there another way to do it?

I attach the first VI

 

Best regards

0 Kudos
Message 30 of 143
(1,371 Views)