B&B Electronics 232D4SS8 manual Four Character Command String

Page 16

To turn any selected port off, the first and second character of the command control string must be the user-defined character. The third character must be the ASCII EOT character (decimal 4).

Example 2: To turn off all ports, with ASCII STX (decimal 2) set as the user defined character.

Send to the Master Port: STX STX EOT (2 2 4 decimal)

It is recommended that the user-defined character be a non- printable character. The turn off command will then consist of three characters that will not show up on the current port device.

If you were writing a program in GWBASIC to select port E of the 232D4SS8 (address zero) you would form a string like this:

SW0E$ = CHR$(2) + "0" + "E"

You could then send SW0E$ to select port E. Similar strings could be used for turning on the other ports. To turn off the ports the string might look like this:

TOFF$ = CHR$(2) + CHR$(2) + CHR$(4)

NOTE: There is no delay through the Smart Switch and the data is not buffered.

Four Character Command String

The four-character command adds additional security to port selection. The only difference between the four-character command and the three-character command is the addition of the ASCII ESCape character in front of the three-character command.

The first character is the ASCII ESC character (decimal 27). The second character is user-defined character. The third character is the desired port address (0). The fourth character is the ASCII upper case letter of the desired port. Refer to the "Three Character Command String" section for more information regarding the last three characters.

Example 1: To turn on port E of the 232D4SS8 (address zero) with ASCII STX set as the user defined character.

Send to Master port: ESC STX 0 E

(27 2 48 69 decimal)

14

Documentation Number 232D4SS84502 Manual

B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 B&B Electronics Ltd – Westlink Comm. Pk – Oranmore, Galway, Ireland – Ph +353 91-792444 – Fax +353 91-792445

Image 16
Contents Port Smart Switch CE Table of Contents Hardware IntroductionFront View Switching Baud Rate From 300 to 38.4 KbpsRear View Simplified Functional Diagram Checklist Serial Data ConfigurationPort Configuration Communication & Configuration Switch DIP Switch SettingMaster Port Printed Circuit Board Outline Master Port DCE/DTE Jumpers DCE Master Port Chart Signal Direction Pin # Description PortDTE Master Port Chart Signal Direction Pin # Description Data Set Ready Input Signal Ground Carrier Detect RS-232 ConfigurationRequest to Send Output Clear to Send InputSimplified RS-232 Schematic RS-422/485 Slave Port Option RS-422/485 Ports a H Signal Pin # Description DirectionSimplified RS-422/485 Schematic RS-422/RS-485 Mode600 12002400 4800Smart Switch Mode Smart Switch OperationThree Character Command String Four Character Command String Programming the User Defined Character SW2 Weight Chart DIP Switch Smart Switch/Port Combiner ModeBinary File Transfer Port Select Test232D4SS8 Users SoftwareMethod One Smart Switch Setup Default ValuesDescription Default Value Method TwoUninstalling Windows Smart Switch Selector Program Selecting PortsAppendix a Ascii Character Codes Decimal to HEX to Ascii Conversion TableAppendix B Cable Charts Chart 3. Modem DB25 Connector to Master Port Chart 4. DCE Device w/DB25 Connector to Ports a H DTEAsync Modem 232D4SS8 Master Port DTEChart 5. IBM PC DB25 Connector to Ports a H DTE Chart 6. IBM PC DB9 Connector to Ports a H DTEChart 7. IBM PC DB25 Connector to Ports a H DTE Chart 8. IBM PC DB9 Connector to Ports a H DTEPorts a H Appendix C Declaration of Conformity Declaration of Conformity