Sensoray 2600 User Manual
Page 79

2600 Family Instruction Manual
74
Chapter 12 : Model 2653 SSR Module
response to a SetModes action) or
unexpectedly (e.g., all channel operating modes
revert to the default when a module reset occurs).
12.6.6 SetPwmRatio
Function
Programs the PWM timing attributes for one SSR
channel.
Opcode
0x05
Command
(Channel),(OnTime),(OffTime)
Response
none
Notes
SetPwmRatio
applies only to channels that
have previously been configured for the PWM
operating mode. This action has no effect on
channels that are configured for the Standard
operating mode.
The CERR status flag will be set if an illegal
channel number is specified.
Two values are specified to establish the duty
cycle: OnTime and OffTime. Each of these
values specifies a time interval, expressed in 2
millisecond increments. For example, by
programming OnTime to 1 and OffTime to 4,
the duty cycle will be set to 20% with a period of
10 milliseconds (2 milliseconds active and 8
milliseconds inactive per output cycle).
The output duty cycle can be set to zero by
declaring the OnTime value to be zero. It is not
possible to set the duty cycle to 100% as the
OffTime
parameter must be at least 1. The
OffTime
value will automatically default to 1 if
the client attempts to set it to zero.
After this action executes, the present channel
output state will continue to be asserted for the
duration of its previously programmed time, and
then the new OnTime and OffTime will take
effect.
12.6.7 GetPwmRatio
Function
Returns the PWM timing attributes of one SSR
channel.
Opcode
0x06
Command (Channel)
Response
(OnTime),(OffTime)
Notes
GetPwmRatio
applies only to channels that
have previously been configured for the PWM
operating mode. The two returned byte values
are meaningful only if the specified channel is
configured for the PWM operating mode.
The CERR status flag will be set if an illegal
channel number is specified.
Two values are returned: OnTime and
OffTime
. Each of these values specifies a time
interval, expressed in 2 millisecond increments,
that are currently in effect. These values will be
the values programmed by the most recent
SetPwmRatio
action, or the default values if
no SetPwmRatio action has executed since the
channel’s operating mode was switched to PWM.
Parameter
Function
Channel
Byte value that specifies the SSR
channel that is to be configured. Value
may range from 0 to 15.
OnTime
On-time (output active) for each PWM
cycle, expressed in 2 millisecond
increments. Value may range from 0 to
255.
OffTime
Off-time (output inactive) for each
PWM cycle, expressed in 2 millisecond
increments. Value may range from 1 to
255.
Parameter
Function
Channel
Byte value that specifies the SSR
channel to be addressed. Value may
range from 0 to 15.
Parameter
Function
OnTime
On-time (output active) for each PWM
cycle, expressed in 2 millisecond
increments.
OffTime
Off-time (output inactive) for each
PWM cycle, expressed in 2 millisecond
increments.