← Strings and Text

Split a CSV Reply

hard

Splits a comma-separated reply from a weld controller into five REAL values.

What it teaches

Each field is taken out of the text and converted, as the second number was in Two Numbers From a Reply, and the same step repeats for every field, starting where the last one ended: '182.5,24.1,7.6,14.0,3.25' has five. The last field, 3.25, has no comma after it, so it runs to the end of the text. A shorter reply leaves old values behind: '1.5,2' after that reply leaves 7.6, 14.0 and 3.25 in the last three elements unless they are cleared first.

Parameters

TagDirectionTypeDefaultDescription
Out_CountOutputDINT0How many fields the reply has
Ref_ReplyInOutSTRING—A weld controller reply such as '182.5,24.1,7.6,14.0,3.25'
Ref_ValuesInOutREAL[5]—Current, voltage, wire speed, gas flow and arc time

Required behavior