Search   
Home  Print View  

 

GP-LOGIC

Branch Content

Setup Commands

Units need to be setup to establish the direction of GPIOs (GPI or GPO) and GPO modes (PULSE or LATCH). Setup commands are issued by the gpconfig program running at the Configuration PC to which the unit must be connected via serial port (RS-422), during an initial setup session prior to put the unit in service.

The unit will not accept setup commands if its address is other than zero. Consequently, all setup commands must be issued with ADDR = 0h, causing an alarm condition otherwise.

The configuration is stored in unit FLASH. If no setup command is ever received, default values are set depending of the unit model. Some units can be designed to remain in alarm condition until the CONFIG GPIOS command is received; others can be designed to auto-discover GPIO directions.

GPO modes are the following:
        
  PULSE: When fired, activate for a short period of time, then deactivate automatically.
  LATCH: Once activated or deactivated, remain in that estate until another command estate to change.

Setup commands are the following:

SETUP_GPIOS

Establishes GPIO directions (GPI or GPO).

CMD: 'c'
DATA:    

Data is a Hex bit-map of GPIO directions (1 for GPI, 0 for GPO). The number of bytes depends on unit size; for example, it will be 4 bytes for GP-116 units because those have 16 GPIOs.

SETUP_MODES

Setup GPO modes (PULSE or LATCH).

CMD: 'm'
DATA:

Data is a Hex bit-map of GPO modes (1 for PULSE, 0 for LATCH). Bit positions represent GPIO numbers, not necessarily GPOs. Bits corresponding to GPIs will be ignored by the unit's firmware.

SET_DUR_GPO

Set activation time for given GPO in mode PULSE.

CMD:    'd'
DATA:    GPO DUR

where GPO is the GPIO number in Hex (2 bytes) and DUR is the pulse duration in Hex representing miliseconds in increments of 50 (2 bytes); for example DUR="05" means: 250ms.

If DUR is zero, default PULSE duraction time is assumed.

SET_DUR_GPO_DFLT

Overwrite firmware default activation time.

Pulse duration set by this command applies to all GPOs configured in pulse mode, overwriting the default duration established by the unit firmware.

CMD: 'D'
DATA: DUR

where DUR is the pulse duration in Hex representing miliseconds in increments of 50ms (2 bytes).

If DUR is zero, the command is ignored.

Online Manuals -- this software is based on Help Books running at melissa