Sign in to follow this  
jaresing

Sending a parentheses in a ddp

Recommended Posts

I am trying to send this command over a serial channel using a ddp protocol

Set_rack(variable1,variable2)

This command requires (), and I cant figure out how to write the serial port

For the command "position=variable,variable2"

I would go

function position(variable,variable2)

private string out

purge()

out = format("position=%d-%d",variable,variable2)

write(out + chr(13))

What do I do for the parentheses?

Thanks

 

 

 

Share this post


Link to post
Share on other sites

Got it, my error was the hyphen instead of the comma

out = format(" Set_rack(%d,%d)",variable,variable2) 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this