User's Manual

28 485SDA103798 Manual
B&B Electronics -- 707 Dayton Rd. -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 434-7094
Read Module Configuration
The Read Module Configuration command reads the
485SDA10’s address first, then the power-up states, and finally the
turn-around delay.
The steps to reading a module’s configuration are given below:
1) Constructing the command string:
Command$ = “!” + CHR$(addr) + “RC”
Where addr is the module’s address.
2) Transmitting the command string:
Print #1, Command$
3) Receiving the address data:
Reply$ = INPUT$(1,#1)
4) Determining the address:
address = ASC(Reply$)
5) Receiving the power-up states data:
Reply$ = INPUT$(1,#1)
6) Determining the power-up states:
states = ASC(Reply$)
Refer to Read Digital I/O earlier in this chapter for the steps to
determine the status of individual output states.
7) Receiving the turn-around delay data:
Reply$ = INPUT$ (1,#1)
8) Determining the turn-around delay:
delay = ASC(Reply$)
Example 5.7 – Determining the configuration of the module with an
address of 10.
addr = 10
Command$ = “!” + CHR$(addr) + “RC”
Print #1, Command$
‘ Determine the module’s address
Reply$ = INPUT$ (1,#1)
address = ASC(Reply$)
‘ Determine the module’s power-up states
Reply$ = INPUT$ (1,#1)
states = ASC(Reply$)
‘ Determine the module’s turn-around delay
Reply$ = INPUT$ (1,#1)
delay = ASC(Reply$)