ComSend with Escape-Sequence

Hendrik R.
Bad Sassendorf,

Jun 11, 2024
26 Posts

0  |  0  

Re: ComSend with Escape-Sequence

Hello everyone!
I would like to send a string chain to a terminal device using the procedure. The current call looks like this:

ComSend(Address, “”, 1000,, “\x01\xCE\x00\x00\x27\x60”)

This also works. Now I would like to use the \xCE (CE is a command) as a variable. In other words:

Variable1 = “0xCE”

ComSend(Address, “”, 1000,, “\x01” + Variable1 + “\x00\x00\x27\x60”)

However, I then have the problem that the \x00 is no longer sent. With the second command, I only see the following above the USB sniffer: 01 CE
However, I would like to see the following string in the USB sniffer:
01 CE 00 00 27 60
I also get this when I use the first ComSend command.

Does anyone have a tip or an alternative procedure that I can use?

Many thanks in advance!

Translated with (free version)

Paul T.
Maennedorf, Zurich

Jun 11, 2024
64 Posts

0  |  0  

Re: ComSend with Escape-Sequence

Hi Hendrik

I think you need the chr() command.
Try the to use „… + chr(Variable1)+ …“.


Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]