Hi,
I got a string from the RS232 Com-Port1 of the CR1000 and the values are not seperated with a delimter
The string is like
I00..013500180000-,(8970;
where
I00 -> hardware-adress
0135 -> first value
0018 -> second value
0000 -> third value
the number of digits are allways fixed to 4.
Now I have to separate the strin into the 3 values! But I could´nt found any solution with the splitstr-command.
Does anyone have an idea how to solve this problem. In MATLAB it´s easy, bit I will do this withn the Loggerprogram of the CR1000
thanks in advance!!
You will need to chop the string up using one of the standard strings functions, such as Mid, Left or Right. If you assign the result directly to a numeric variable the logger should do the conversion automatically.
Example:
Public StringIn As String * 31 = "013500180000"
Public Values(3)
Dim I, Point
BeginProg
Scan (1,Sec,0,0)
Point = 1
For I = 1 To 3
Values(I) = Mid (StringIn,Point,3)
Point = Point + 3
Next I
NextScan
EndProg
Thanks!!
I used 'Mid' and it´s working.