Message Boards Message Boards

0
|
13770 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Serial DeviceOpen specifying port name and options

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
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

POSTED BY: Ian Johnson

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

POSTED BY: Jesse Friedman
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