Crimson Left() Function Explanation

20 Oct 2026

The Left(string,count) function can be used to determine the characters in a string, starting from the left side of the string and returning the characters based on the count in the function.

 

APPLICABLE PRODUCTS

Crimson 2.0

Crimson 3.0

Crimson 3.1

Crimson 3.2

 

ISSUE / QUESTION / SYMPTOM

How to use the Left(string,count) function in Crimson programming.

Use Case: 

To determine the first three characters in a string tag starting from the left of the string.

String=the string of characters you want to extract the characters from. A string tag can be used or characters inside quotations ex:”Test1234”

Count=the number of characters to return from the extraction.

 

Application: 

When you scan a barcode/input a long string of characters in a text box.

You can extract the characters from the left of the string to use as a verification to setup a machine.

 

Example Programming:

LeftStringExtract=Left(String,3);//This will extract the first three characters from the tag called string and put them in tag called LeftStringExtract

If the tag labeled String=ABCDEFG when this function is run, the characters that will show in tag LeftStringExtract will be ABC.

You can use this in other programming for example to choose setting for a machine.

Example:

LeftStringExtract=Left(String,3);

MachineSpindleLeft=0;

MachineSpindleRight=0;

if(LeftStringExtract == ”ABC”)

{MachineSpindleLeft=1;}

else if( LeftStringExtract != “ABC”)

{MachineSpindleRight=1;};

 

Explanation:

This function will extract the number of characters starting at the Left of the string and put them in a string tag.

 

POSSIBLE CAUSES / ANSWER

Using the Left() function can extract characters from a string tag or value starting from the left first character. It returns the number of characters in the count value.

 

Need Further assistance? Submit a support ticket here.

https://support.hms-networks.com/

© HMS Networks AB 2026