LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Match True/False String help

Solved!
Go to solution

So I kind of got the timer thing figured out. Now I want the robot to not start moving until I hit "Step". Right now, as soon as it is connected it will start moving. I don't want it to start moving until I hit the "step" button, and then it will automatically keep going after that. Any idea on how to do this? Also my "Arrived at Position" and "Laser On" lights are staying on constantly, with the "Laser On" light flickering off for a split second whenever it receives a string from the robot. And my timer is counting even while the robot is moving. I don't want it to start counting until it receives "TRUE" from the robot. Is it possible that my "Arrived at Position" is staying True once it's set to true, and never returning False?

 

Thanks,
SM

0 Kudos
Message 11 of 15
(1,502 Views)
It sounds like you would benefit from a basic state machine architecture, with some event-driven signalling. Then your main loop can be doing whatever it needs to be doing but an event fired at the end of the timeout period could reset your Boolean so LabVIEW can initiate the next send operation.

The timer could be a separate VI that your code launches dynamically and which does nothing but wait for a timeout to expire. When the timeout is up, the VI fires the Boolean reset event and stops itself.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 15
(1,490 Views)

Do you have any simple examples of this? Like I said I am new to LV and programming in general...

 

Thanks,
SM

0 Kudos
Message 13 of 15
(1,485 Views)
Check the link to my blog in my signature.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 14 of 15
(1,471 Views)
Another advantage of using the match pattern function is that you can easily make the match case insensitive if you want. Just change the pattern to:

[Tt][Rr][Uu][Re]

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 15
(1,446 Views)