Barcode Component encoding

Does anyone know if the Barcode Component automatically starts the Code128 with the FNC1 or would one have to put that in their code? Using 7.8.5.
Also how do you encode the functions in an Expression or script. I have to piece together several pieces of information and am wondering how to put in the ENTER function.

I can’t guarantee, but it likely doesn’t; the component is purely a symbology representation - FNC1 is used to specify that a generic Code 128 barcode is specifically a GS1-128 barcode, so you would have to add the function code yourself.

An enter key would likely be represented by a carriage return, line feed, or both - in both scripting and expressions, use the backslash character to start an ‘escape sequence’:
{something} + "\n" + {somethingElse}
{something} + "\r\n"

"%s\n%s" % (event.source.something, event.source.somethingElse}
event.source.something + "\r\n" + event.source.somethingElse

Thanks for the reply however the expression doesn’t seem to like the escape character. I’m getting Scan Error: Illegal escape sequence “\x” (Line1, Char 9)

Here is the expression.
\x1e is the Record Seperator. Does ignition not like hex in the expression. I also tried the OCT \036, and Unicode u001e.

Expressions don’t like escape sequences for hex characters (TIL) and there’s no chr() function in expressions (yet), so your option to do it in an expression…is to use a script:
"test" + runScript("chr(0x1E)", 0) + "test"
Or, much more simply, just do it all directly in a script:

fields = ["<!>1", "ACCEPT", "123456789", "ACCEPT", "ACCEPT"]
s = "\x1E".join(fields)
print repr(s)