Read/Write command that returns/sets the input/output status of general-purpose I/O ports.


Applies to: CMD-4CR, CMD-4EX-SA


ASCII/Standalone                IOCFG

Syntax:                        

Read:

IOCFG                


Write:

IOCFG=[value]                 

Where:        [value] specifies a decimal number representing a 32-bit value that identifies port and status according to the chart below.

                                      The default value for all ports is 4,294,901,760.

Reply: 

Command is accepted and executed

Read:         

Returns status of all I/O based on each a 32-bit value based on the following

Bit

Port

Status

Default*


Bit

Port

Status

Default*

0

Port 1

0  Input        1  Output

Input


16

Port 17

0  Input       1  Output

Output

1

Port 2

0  Input        1  Output

Input


17

Port 18

0  Input        1  Output

Output

2

Port 3

0  Input        1  Output

Input


18

Port 19

0  Input        1  Output

Output

3

Port 4

0  Input        1  Output

Input


19

Port 20

0  Input        1  Output

Output

4

Port 5

0  Input        1  Output

Input


20

Port 21

0  Input        1  Output

Output

5

Port 6

0  Input        1  Output

Input


21

Port 22

0  Input        1  Output

Output

6

Port 7

0  Input        1  Output

Input


22

Port 23

0  Input        1  Output

Output

7

Port 8

0  Input        1  Output

Input


23

Port 24

0  Input        1  Output

Output

8

Port 9

0  Input        1  Output

Input


24

Port 25

0  Input        1  Output

Output

9

Port 10

0  Input        1  Output

Input


25

Port 26

0  Input        1  Output

Output

10

Port 11

0  Input        1  Output

Input


26

Port 27

0  Input        1  Output

Output

11

Port 12

0  Input        1  Output

Input


27

Port 28

0  Input        1  Output

Output

12

Port 13

0  Input        1  Output

Input


28

Port 29

0  Input        1  Output

Output

13

Port 14

0  Input        1  Output

Input


39

Port 30

0  Input        1  Output

Output

14

Port 15

0  Input        1  Output

Input


30

Port 31

0  Input        1  Output

Output

15

Port 16

0  Input        1  Output

Input


31

Port 32

0  Input        1  Output

Output

*NOTE: Default status is reference only, as the controller may have been set up in a different configuration


Write:           

OK


Command cannot be processed

       An error message is returned. See Error Codes

Example: 

Read:        

IOCFG                        * Returns decimal value for all general-purpose I/O

Ex. Return a value of 54, or binary …. 0011 0110, indicates port 2, 3, 5, and 6 are changed to outputs, all other ports are at default settings.



Write:        

IO=265,256,960        * 265,256,960 in binary is 0000 1111 1100 1111 1000 0000 0000 0000, Ports 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28 are set as outputs. All other ports are set as inputs.


Notes:

  • To write the value to the device’s flash memory, use the STORE command.

See also:

I/O Setup

AI, DI, DIP, DO, DOBOOT, DOP, IO, IOBOOT, IOP

Commander Manual

2.1.3.3.1 Configurable Digital I/O