Message Boards Message Boards

GROUPS:

Serial DeviceOpen specifying port name and options

Posted 1 year ago
1703 Views
|
2 Replies
|
1 Total Likes
|

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.

2 Replies

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

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

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract