03-12-2020 08:56 AM
Example in LabVIEW 14
03-12-2020 09:00 AM
Hi GerdW,
I have on the same VI, the function of send command and read answer I have on the same VI, so I can,t divide them. The error can be the message of Rearmar that appears in the subVI but how can I detect this and send to the state of errors?
Best regards
03-12-2020 09:03 AM
Hi 99,
@labview99 wrote:
I have on the same VI, the function of send command and read answer I have on the same VI, so I can,t divide them.
Why can't you divide them into their own subVIs?
03-12-2020 09:44 AM
Hi GerdW,
I try to divide in different subVI but the cilinder doesn´t move
03-12-2020 09:56 AM - edited 03-12-2020 09:57 AM
Hi 99,
why is there a loop inside "recibir datos"?
When do you even handle the data you receive from your device?
Why is there no output from "recibir…" subVI?
Why do you still need to convert values from DBL to hex-formatted-string to U8 (well, U16) values in "mandar…"?
Why is there no error handling AT ALL?
Did you examine the state machine example project coming with LabVIEW?
03-13-2020 03:58 AM
Hi GerdW,
Every time I send a position I have to send to the subVi "recibir datos" and I have to receive the data.
I need to convert to hex-formatted because the manual of the cylinder specifies like this.
I have corrected the subVI "recibir datos".
But how I can send to the 3 position ? Because from the 1 position I send to the state "leer datos" and if it is okey I send to the next position, the position2. But when I send the 2 position to "leer datos" and if it is okey how can I send to the 3 posiiton and to the 4 to the 5....?
Best regards
03-13-2020 04:05 AM - edited 03-13-2020 04:09 AM
Hi 99,
@labview99 wrote:
I need to convert to hex-formatted because the manual of the cylinder specifies like this.
:facepalm:
@labview99 wrote:
But how I can send to the 3 position ? Because from the 1 position I send to the state "leer datos" and if it is okey I send to the next position, the position2. But when I send the 2 position to "leer datos" and if it is okey how can I send to the 3 posiiton and to the 4 to the 5....?
Did you draw your state machine on a sheet of paper? Did you visualize the states you need? Did you define the conditions when/how to change from one state to another one?
You need to define conditions when to change a state and you need to define conditions which state to call next…
Example:
(blurred due to certain reasons)
03-13-2020 05:13 AM
Yes, I do it in a paper. I tryed a lot of different posibilities but I can´t do it, because when I have to solve a problem I need to use de "data receive" of the subVi to make changes and the subVI of send to a position, the input parameters depends on the pòsition and the speed, which changes with each position.
Best regards
03-13-2020 05:17 AM
03-13-2020 06:15 AM
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