25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
2.2 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. /* P14/P15/P17: P/D counter, soft-limit and dual-AB Modbus stress setup. */
  32. PLSR_RESULT PlsrHardwareCounterSelfTestPrepare(void);
  33. /* P18: K4 four-axis 100kHz P/D long-stress setup with soft limits disabled. */
  34. PLSR_RESULT PlsrLongStressSelfTestPrepare(void);
  35. void PlsrSelfTestControlTick100us(void);
  36. /* P11 board-test control. Write this signed dword from IAR Watch while the
  37. * test is running; it represents the live S0 current-segment frequency. */
  38. extern volatile int32_t PlsrSelfTestLiveFrequencyHz;
  39. extern volatile uint32_t PlsrSelfTestDynamicTick100us;
  40. extern volatile uint8_t PlsrSelfTestDynamicPhase;
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /* PLSR_SELF_TEST_H */