Loading…
Loading…
Method Name: pulse_width
Method ID: 0x4060
Method Label: Pulse width
Method Help: The pulse width must be set to a value within the range of 0.3ms to 500ms. The pulse width must be set to 40% or less of the period of pulse frequency at 100% output. If the pulse width is set to 0, it will be automatically set to 40% of the period of pulse frequency at 100% output. In this case, the pulse width setting mode remains in the Manual mode. If the calculation result exceeds 100ms, it will be forcibly set to 100ms.
- {
- long ids[2];
- int pulse_width10;
- float pulse_width11;
- int pulse_width20;
- float pulse_width21;
- char status[3];
- send(135,status);
- do {
- pulse_width10 = _ivar_value(resolve_record_ref(16598,16450));
- pulse_width10 = (pulse_width10 & 0xff00) / 0x0100 | (pulse_width10 & 0x00ff) * 0x0100;
- pulse_width21 = pulse_width11 = (pulse_width10 >> 8 & 0x00ff | pulse_width10 << 8 & 0xff00) / 100.0;
- _get_local_var_value(literal_string(525),ids,literal_string(526));
- pulse_width20 = pulse_width21 * 100;
- if (pulse_width20 < 0)
- {
- ACKNOWLEDGE(literal_string(527));
- status[0] = 1;
Please login for more