Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

54 righe
1.9 KiB

  1. #ifndef PLSR_SELF_TEST_H
  2. #define PLSR_SELF_TEST_H
  3. #include "plsr_types.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* 上电自测:Q0(A)/Q1(B) 输出三段 AB 正交周期,末段反向。
  8. * 用于 P3b-2 上板验证,验证完成后应关闭。 */
  9. PLSR_RESULT PlsrSelfTestQueue(void);
  10. /* P4-2 当量换算上板自测:Q0=PULSE、Y4=DIR,两段各1工程单位;
  11. * 3脉冲/2单位比例下应依次输出1、2个脉冲。 */
  12. PLSR_RESULT PlsrEquivalentSelfTestQueue(void);
  13. /* P5 protection-chain board test: Q0=PULSE, Q4=DIR. The commanded
  14. * distance is deliberately longer than the +500-pulse soft limit. */
  15. PLSR_RESULT PlsrProtectionSelfTestQueue(void);
  16. /* P6 board test: start four independent PULSE/DIR axes together. */
  17. PLSR_RESULT PlsrFourAxisSelfTestQueue(void);
  18. /* P7 board test: three segments exercise negative and positive backlash. */
  19. PLSR_RESULT PlsrBacklashSelfTestQueue(void);
  20. /* P8 board test: Q4/Q3 show positive/negative DIR logic side by side. */
  21. PLSR_RESULT PlsrDirectionLogicSelfTestQueue(void);
  22. /* P9 board test: Q0=CW and Q1=CCW, with strict channel interlock. */
  23. PLSR_RESULT PlsrCwCcwSelfTestQueue(void);
  24. /* P10 board test: Q0 uses 1ms refresh, Q1 uses 0.1ms refresh. */
  25. PLSR_RESULT PlsrFastRefreshSelfTestQueue(void);
  26. PLSR_RESULT PlsrDynamicFrequencySelfTestQueue(void);
  27. /* P12: S0=D1000, S1=D1100; D1010/D1011 is changed by a Modbus master. */
  28. PLSR_RESULT PlsrModbusDataSelfTestQueue(void);
  29. /* P13 prepares deterministic SFD K1 data; motion is commanded via Modbus. */
  30. PLSR_RESULT PlsrModbusControlSelfTestPrepare(void);
  31. void PlsrSelfTestControlTick100us(void);
  32. /* P11 board-test control. Write this signed dword from IAR Watch while the
  33. * test is running; it represents the live S0 current-segment frequency. */
  34. extern volatile int32_t PlsrSelfTestLiveFrequencyHz;
  35. extern volatile uint32_t PlsrSelfTestDynamicTick100us;
  36. extern volatile uint8_t PlsrSelfTestDynamicPhase;
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* PLSR_SELF_TEST_H */