
I/O Model Reference 23
I/O Model Event
ontime Event occurs if the measured time has changed from the last
time.
period Event occurs if the measured time has changed from the last
time.
pulsecount Event occurs if the number of counts measured has changed
from the last count.
quadrature Event occurs if the number of counts measured has changed
from the last count.
Example: A program could use the io_changes event to detect changes in an
ioProximity input object:
when (io_changes(ioProximity)) {
. . .
}
If you were interested only in when the io_part_detector detected a part (a value
of 1 in this example), you could use the following when clause:
when (io_changes(ioProximity) to 1) {
. . .
}
io_update_occurs Event
The io_update_occurs event is TRUE when the value read from the input object
specified by
io_object_name
has an updated value.
The syntax for this event is:
io_update_occurs (
io-object-name
)
The io_update_occurs event applies only to certain timer/counter input models.
Timing for the event depends on the input model, as listed in
Table 9.
Table 9. io_update_occurs Events for Specific I/O Models
I/O Model Event
dualslope Event occurs when the conversion is complete, and the value has
changed.
ontime Event occurs at the end of the time being measured.
period Event occurs at the end of the time being measured.
pulsecount Event occurs every 0.8388608 seconds, when a new pulse count
value is available.
quadrature Event occurs as soon as at least one count is accumulated.
Komentarze do niniejszej Instrukcji