Tia Portal 17 Split instruction

steu

Member
Join Date
Aug 2006
Location
Milan
Posts
17
Good morning


I have a 1500 CPU with a RS232 card.
I receive fom serial card a string like:


123.45 1457.23 456.34 892.34


I need to split the string in array of string with a value for each string of the array.


To do this I thought to use a split instruction using a space like separator, I'm not able to use this instruction the Help on line is not well explained.
Can someone write down an example with the parameter of FC?
thank you in advance
 
... To do this I thought to use a split instruction using a space like separator, I'm not able to use this instruction the Help on line is not well explained.
Can someone write down an example with the parameter of FC?
Yes; see below.

OP will need to adapt this example, i.e. use the delimiting (SPLIT.RecSeparator) and terminating (SPLIT.EndSeparator) character suited for their own process.

An alternative to the Equals comparison instruction (-]==[-) would be to always write a 0 into the [SPLIT.Position] parameter (misc.start_pos in the example) just before the SPLIT instruction on each scan, so the SPLIT instruction will perform the splitting on every scan.
splitter_01.png
 

Similar Topics

Im trying to create a level indicator for water Tank i have used the ADD function while the pump is on and level increasing everything works...
Replies
23
Views
237
My PLC (S7-1200 with CPU-1212C) has now been delivered to customer site. They've asked me to do some updates to the software. I can do that on my...
Replies
21
Views
337
Does anyone know why the connection interface is greyed out and says why I can only use Teleservice instead of the other options like PN/IE? I am...
Replies
0
Views
44
Hi guys I after a bit of advice on Tia portal graphics, I would like to add a conveyor belt graphic to a hmi and the conveyor in the basic...
Replies
3
Views
130
Hi I used to be able to launch PLCsim without any problem. Now it tells me " STEP 7 Professional Licence is required to simulate this PLC"...
Replies
15
Views
454
Back
Top Bottom