LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text based sequence

Hi. Have you ever done the text-based sequence to control the sequence of the built Application by labview so that we dun have to go into edit mode to change? Instead we can change the sequence by editing  thwe lines in the notepad easier.
 
regards,
Clement
0 Kudos
Message 1 of 7
(3,265 Views)

Your request is unclear.

You can set various options by using text files (for examples INI files - look at the File I/O>>Configuration File VIs palette), but you will have to handle the various cases inside your code.

If this isn't what you want, write some more details about what you're trying to accomplish. In any case, you will have to write code which will handle the data you are reading from the file.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,251 Views)

Do you mean that you want to list the steps, or vi's to call, in a text file?  If so, you can do so by using a queue in Labview.  First, read the text file lines and insert each line one at a time into the queue.  Then create a state machine.  Do this by creating a loop to dequeue an element and use a case structure to call the vi's or execute the code depending on the dequeued element.  Put an exit state at the end of the list and create an exit case in the state machine to exit the program.  See attached code.  To try it, create a text file with the lines:

State1

State2

exit

 

  Point to that file in the Path control on the front panel.  Run it.

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 7
(3,233 Views)
Hi, Thob 
 
thanks.
 
Could you pls save it as 7.0 version as I do not have it? Thanks
 
Clement
0 Kudos
Message 4 of 7
(3,222 Views)
Here it is in 7.0.  In the future, please post what version of LV you are using so that we can post vi's in the same version.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 7
(3,205 Views)
If all the LV programs are executables and it is just a matter of sequencing you might be able to do a simple batch file (just a suggestion, I haven't tried this with labview but have sequenced c in the past)  I am not sure if you can pass arguments to and from the executable however. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 7
(3,196 Views)

A batch file sounds like what you are looking for...with the editing of lines to control the order of .EXE execution.  This could also be done in an entire LV program using VI server to dynamically load the VIs.  The advantage to this would be a self contained EXE rather than several separate exe's and you would be able to communicate between the two of them programatically.  The down side is more work on your part as it sounds as if you already have the apps built.

A note on communicating between exe's.  There are a couple of ways to communicate between built applications..such as globals, queues, or tcp/ip.  This probably goes beyond what you are looking for but just thought I would throw it out there.

 

cheers,

Brett Burger

 

0 Kudos
Message 7 of 7
(3,178 Views)