Message Boards Message Boards

Serial DeviceOpen specifying port name and options

GROUPS:

I'm trying to open a Serial device connection, specifying both the port name and connection options (baud rate, handshake method, etc.). Here's a screenshot from the Serial documentation:

Serial DeviceOpen documentation

This suggests that you can either specify a port name or specify connection options when opening a port, not both. If I try to use both, I get an ::argt message:

DeviceOpen called with 3 arguments; 1 or 2 arguments are expected.

I figure I must be missing something here.

POSTED BY: Jesse Friedman
Answer
2 months ago

Hi Jesse,

You specify it like so :

port = DeviceOpen["Serial",{"COM4","Handshake"->"XOnXOff"}]

I agree that this particular bit is confusing to determine from the documentation.

Thanks,

Ian

POSTED BY: Ian Johnson
Answer
2 months ago

That works great, Ian! Thanks for the prompt response.

POSTED BY: Jesse Friedman
Answer
2 months ago

Group Abstract Group Abstract