
Commands - 102
PULSE
Tasking Statement
SYNTAX: PULSE n,a ddress, bit,tim e,p olarity
PURPOSE: To configure a digital output line as a timed, or pulsed o utput.
REMARK S: You may configure up to eight digital I/O lines as independent pulse output. The lines may be on
any digital I/O port. This command allows you to pulse a line for a period of time while executing
other BASIC commands.
n is a pulse reference number and has a range from 0 to 7. This number is used for CL EAR PULSE
and PULSE functions to reference this pulse timer.
The address is the I/O address of an 8– bit port. The range is 0 to 65535 (&FFFF).
The bit parameter is the particular bit of the port. The value ranges from 0 to 7.
The time parameter is the time in seconds that the specified bit is active. You may specify a time
from 0. 005 to 327.67 seconds.
The polarity parameter determines whether the specified bit is active high or low. When polarity is
“1” , the bit goes high during the active time. If the polarity is “0” it goes low during the active
time.
For more information see the Multitasking Chapter.
RELATED: CLEAR PU LSE, PULSE function
EXAMPLE: PULSE 5,0,2,2.55,1
Pulse number 5 is configured to output bit 2 at address 0 so the bit will go high for 2.55 seconds and
then return low. This sequence will execute only once.
ERROR: < Data > 255> - for address
< Data negative> – for n,addr ess,bit,w ait,active
< Time > 327.67 sec> - for t
< Data > 65,535> – for address
< Data out of range> – if bit or bit > 7
Comentarios a estos manuales