Loading…

方法名称: pulse_width

方法ID: 0x4060

方法标签: Pulse width

方法描述: 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(517),ids,literal_string(518));
  • pulse_width20 = pulse_width21 * 100;
  • if (pulse_width20 < 0)
  • {
  • ACKNOWLEDGE(literal_string(519));
  • status[0] = 1;


请登录以获得完整内容