hello
I like to use my own constant to open a port for serial comminications. First I tried to use a string constant, but the compiler requested a numeric constant.
Based on the list of alphanumeric com ports for SerialOpen I assume that for Com1 I can use a value of 9.
e.g.
Const Modem_Com=9
SerialOpen (Modem_Com,9600,0,0,10000)
Is this correct?
Does this work for other com ports too (e.g. ComME = 2)?
Does this work for all serial instructions? (SerialIn, SerialOut...)
Thanks for your help
Manuel
* Last updated by: Monte on 4/27/2010 @ 10:59 AM *
Manuel
If you are defining constants and want to refererence a given port it is much better to use the built-in predefined constants to refer to them. So in your example:
Const Modem_Com = Com1
The following are all predefined constants in CRBasic, a full list can be found in the CRBasic help.
Com1
Com2
Com3
Com4
ComME
ComRS232
ComSDC10
ComSDC11
ComSDC7
ComSDC8
I hope that helps
Simon
Yes, this works fine!
Thank you.