RIGHT

From the right ends of strings, yields the number of characters defined.
lrsf_ri1_cam5
Arguments
IN
IN
MESSAGE
Any non-empty string
NbC
NbC
DINT
Number of characters to be extracted. This number cannot be greater than the length of the IN string.
RIGHT
Q
MESSAGE
Right part of the string (length = NbC)
empty string if NbC <= 0
complete string if NbC >= string length
Example
(* FBD Program using "LEFT" and "RIGHT" Functions *)
lrsf_le2_cam5
(* ST Equivalence: *)
complete_string := INSERT (RIGHT ('12345678', 4), LEFT ('12345678', 4),5); (* complete_string is '56781234' the value issued from RIGHT call is '5678' the value issued from LEFT call is '1234' *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal