LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the data that is in the table is from excel, so the data to be read can changed?

for example the data before is EXEC 1,how if i'll changed the value to 1 how can i read those data if he changed the EXEC 1 to 1. that's why i said the data is changeable.

can you give me a simple example about this?

Thank You
0 Kudos
Message 1 of 4
(2,871 Views)
Julro:

The "scan from string" will simply ignore the EXEC word and then process "1" or whatever other variable you have. (I assume your commands will all have the form: EXEC 1, EXEC 2, EXEC 3, etc.) See the string parse examples in the help file. You can also parse simply by setting the offset...if you always have EXEC followed by a single space, simply set the offset to 5.

Hope this helps!

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 2 of 4
(2,871 Views)
thank you for your help, but how if EXEC 1 can
be EXECUTE 1 of EXE 1. I use the scan from string and it only reads EXEC, EXECUTE and EXE not 1 and space. Either EXECUTE 1, EXEC 1, EXE 1 and 1 can be the value that can get from excel.

The string parse example is working at LV 7.0, I'm using LV 6.1.
0 Kudos
Message 3 of 4
(2,871 Views)
You need to some extend what will the data be. If you know that it is either a string+space+number or just a number, than you can use match pattern function to look for the space character.
If there is a space character, you will read the string after the space, which in your case is a number. If there is no space character, and you are only passing a numeric string, then just read the whole string.
I create an example that does that.
Zvezdana S.
0 Kudos
Message 4 of 4
(2,871 Views)