Difference between revisions of "Firmware-820 Command-048"

From I-CubeX Wiki
Jump to: navigation, search
(SET OUTPUT (48, 30h))
 
(One intermediate revision by the same user not shown)
Line 27: Line 27:
 
|wwwwwww = [0..127]; actuator method LSB or not used
 
|wwwwwww = [0..127]; actuator method LSB or not used
 
|}
 
|}
 +
 +
If the actuator is an I2C device, zzzzzzz and wwwwwww are the actuator method MSB and LSB. If the actuator is a PWM device, zzzzzzz represents the repeating pulse width and wwwwwww is ignored. If the actuator is a binary DC device, zzzzzzz (if it is greater than zero) represents the single pulse duration.
  
 
When disabling continuous control, the actuator method MSB value or repeating pulse width value is, if greater than zero, used to set the single pulse duration, ie. the delay after which to switch the actuator output status. The single pulse duration range is 0.1-12.7 s (ie. in steps of approx. 0.1 s)
 
When disabling continuous control, the actuator method MSB value or repeating pulse width value is, if greater than zero, used to set the single pulse duration, ie. the delay after which to switch the actuator output status. The single pulse duration range is 0.1-12.7 s (ie. in steps of approx. 0.1 s)
  
The repeating pulse width range is 1-2 ms (ie. steps of approx. 8 microseconds) by default. Use the SET OUTPUT PULSE command to configure a repeating pulse with a different interval and pulse width range.
+
If the actuator is not an I2C device, the repeating pulse width range is 1-2 ms (ie. steps of approx. 8 microseconds) by default. Use the SET OUTPUT PULSE command to configure a repeating pulse with a different interval and pulse width range.
  
 
Example:
 
Example:

Latest revision as of 23:21, 7 March 2022

SET OUTPUT (48, 30h)

The SET OUTPUT command can be used to turn any of the 8 available actuator outputs on or off. Enabling continuous control overrides the output on/off setting. The command can be used in both stand-alone and host modes of operation. After a RESET of the WiDig, all outputs’ continuous control statuses are retrieved from non-volatile memory as set by the SET OUTPUT INIT command. Upon completion of the command the digitizer sends out the same command. To get the values stored in non-volatile memory, use the DUMP OUTPUT command.

The [BODY] of the SET OUTPUT command consists of two 7-bit bytes with the following format:

0xp00yyy: x = 1; output on
x = 0; output off
p = 1; enable continuous control, in the form of actuator method or repeating pulse width variation
p = 0; disable continuous control, in the form of actuator method or repeating pulse width variation, and use zzzzzzz as single pulse duration if it is greater than zero
yyy = [0..7]; actuator output number, where the first actuator output number = 0, and the last (8th) actuator output number = 7
0zzzzzzz: zzzzzzz = [0..127]; actuator method MSB or repeating pulse width, or single pulse duration
0wwwwwww: wwwwwww = [0..127]; actuator method LSB or not used

If the actuator is an I2C device, zzzzzzz and wwwwwww are the actuator method MSB and LSB. If the actuator is a PWM device, zzzzzzz represents the repeating pulse width and wwwwwww is ignored. If the actuator is a binary DC device, zzzzzzz (if it is greater than zero) represents the single pulse duration.

When disabling continuous control, the actuator method MSB value or repeating pulse width value is, if greater than zero, used to set the single pulse duration, ie. the delay after which to switch the actuator output status. The single pulse duration range is 0.1-12.7 s (ie. in steps of approx. 0.1 s)

If the actuator is not an I2C device, the repeating pulse width range is 1-2 ms (ie. steps of approx. 8 microseconds) by default. Use the SET OUTPUT PULSE command to configure a repeating pulse with a different interval and pulse width range.

Example:

In order to set the 2nd actuator output repeating pulse width to 2.0ms, the following message is sent:

240, 125, 0 {DEV}, 48 {SET OUTPUT}, 97 {x = 1, p = 1, yyy = 1}, 127 {repeating pulse width}, 0, 247 (F0h, 7Dh, 00h, 30h, 61h, 7Fh, 00h, F7h)

The repeating pulse width is 1 + 127 * 0.008 = 2.0ms

In order to turn the same actuator output on but disable continuous control, the following message is sent:

240, 125, 0 {DEV}, 48 {SET OUTPUT}, 65 {x = 1, p = 0, yyy = 1}, 0, 0, 247 (F0h, 7Dh, 00h, 30h, 41h, 00h, 00h, F7h)