Altinex CP7317RS Programing Commands, SETIp,b,n, Input/Output Port Pin Configuration, Controllers

Models: CP7317RS

1 16
Download 16 pages 39.35 Kb
Page 7
Image 7
4.7 PROGRAMING COMMANDS

CONTROLLERS

4.7 PROGRAMING COMMANDS

The commands below are used for presetting the default status of the unit.

Note: AFTER USING THE PROGRAMMING COMMANDS LISTED BELOW, THE CP7317RS SHOULD BE POWERED OFF AND THEN ON.

[SETIp,b,n]

This command sets individual pins of each I/O port to input or output status. It is a programming command and needs to be issued only once during the configuration of the CP7317RS. Once issued, it is stored in the non-volatile memory

and is maintained during the “Power ON/OFF”.

The factory preset for the CP7317RS is that all pins on I/O ports are set as output pins.

When the pin is set as input, then an RS-232 code is produced whenever the pin changes from high to low or from low to high. When the pin is set as an output, then the RS-232 command is sent through the RS-232 port can change the specified pin to high or low. (The RS-232 code cannot be produced when the pin is set to the output status and the pin set to the input status cannot be set to low with the [SETD] command as all the pins with input status are always high).

pThis letter designates a port number. It is an ASCII character ranging from 1 to 4 and matching the port number on the rear panel of the CP7317RS Controller. The acceptable values are 1, 2, 3 or 4. Any other value will cause an error as a feedback code.

bBit number. This bit number relates to the pin number on the 9-pin connector on the back of the CP7317RS according to the following table. A valid range of numbers is from 1 to 8, inclusive. Any other numbers will cause an error as a feedback code.

Bit No.

Connector pin No.

1

1

2

6

3

2

4

7

5

3

Bit No.

Connector pin No.

6

8

7

4

8

9

FIGURE 5: Input/Output Port Pin Configuration

nThis letter designates the status of the pin on that particular port as either input or output.

when n = 1 the pin is set as input when n = 0 the pin is set as output.

Example: [SETI1, 6,1] – this would set

port 1, pin 6, to an input status.

[SETIp,b1b6b2b7b3b8b4b9]

This sets all the pins in an I/O port to either input or output status. It is a programming command and needs to be issued only once during the configuration of the CP7317RS. Once issued, it is stored in the non-volatile memory and is maintained during the “Power ON-OFF”.

The factory preset for the CP7317RS is that all pins are set as output pins.

When the pin is set as the input, then an RS-232 code is produced whenever the pin changes from high to low or from low to high. When the pin is set as an output, then RS-232 commands sent to the RS-232 port can change a specified pin to high or low. (The RS-232 code cannot be produced when the pin is set to an output status and the pin set to an input status can not be set low with [SETD] command as all pins with input status are always high).

pThis letter designates a port number. This is an ASCII character from 1 to 4 that matches the I/O port number on the rear panel of the CP7317RS. The acceptable values are 1,2,3 or 4. Any other value will cause an error as a feedback code.

6

Page 7
Image 7
Altinex CP7317RS Programing Commands, SETIp,b,n, Input/Output Port Pin Configuration, Example SETI1, 6,1 - this would set