Pepper Computer RS232, RS485 user manual RetVar = OPERATEiovar, OSTARTCOUNTER, null

Models: RS485 RS232

1 320
Download 320 pages 36.43 Kb
Page 75
Image 75

Chapter 2 SMART-BASE

SMART I/O User’s Manual

 

 

 

 

 

 

 

 

 

 

O_START_COUNTER : This call starts the counter; it’s syntax is as follows :

<RetVar> := OPERATE(<iovar>, O_START_COUNTER, <null>);

where the <iovar> is typically t_in.

O_READ_COUNTER : With this call the contents of the counter register may be read. When this call is issued, the counter is stopped, it’s register read and then restarted. If a high-frequency input exists then pulses may be lost (not counted). The same effect may also be true due to timeslicing during timer stop and start operations. Therefore it is recommended that this call be only used for low frequency inputs (<1kHz). There is no detection for counter overflow and the call should not be used for count down operations or square wave generation. It’s syntax is as follows :

<RetVar> := OPERATE(<iovar>, O_READ_COUNTER, <null>);

where the <iovar> is typically t_in.

O_STOP_COUNTER : This call stops the counter counting up or down and square-wave generation and has the following syntax :

<RetVar> := OPERATE(<iovar>, O_STOP_COUNTER, <null>);

where the <iovar> is typically t_in.

The counter/timer is configured automatically as MODE10 (refer to the ‘C’ Programming section) and from within ISaGRAF there is no ability to alter this configuration.

2

 

 

 

 

March 12, 1996

©1996 PEP Modular Computers GmbH

Page 2 - 35

 

 

Page 75
Image 75
Pepper Computer RS232, RS485 user manual RetVar = OPERATEiovar, OSTARTCOUNTER, null