|
- #ifndef PLSR_SELF_TEST_H
- #define PLSR_SELF_TEST_H
-
- #include "plsr_types.h"
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* 上电自测:Q0(A)/Q1(B) 输出三段 AB 正交周期,末段反向。
- * 用于 P3b-2 上板验证,验证完成后应关闭。 */
- PLSR_RESULT PlsrSelfTestQueue(void);
-
- /* P4-2 当量换算上板自测:Q0=PULSE、Y4=DIR,两段各1工程单位;
- * 3脉冲/2单位比例下应依次输出1、2个脉冲。 */
- PLSR_RESULT PlsrEquivalentSelfTestQueue(void);
-
- /* P5 protection-chain board test: Q0=PULSE, Q4=DIR. The commanded
- * distance is deliberately longer than the +500-pulse soft limit. */
- PLSR_RESULT PlsrProtectionSelfTestQueue(void);
-
- /* P6 board test: start four independent PULSE/DIR axes together. */
- PLSR_RESULT PlsrFourAxisSelfTestQueue(void);
-
- /* P7 board test: three segments exercise negative and positive backlash. */
- PLSR_RESULT PlsrBacklashSelfTestQueue(void);
-
- /* P8 board test: Q4/Q3 show positive/negative DIR logic side by side. */
- PLSR_RESULT PlsrDirectionLogicSelfTestQueue(void);
-
- /* P9 board test: Q0=CW and Q1=CCW, with strict channel interlock. */
- PLSR_RESULT PlsrCwCcwSelfTestQueue(void);
-
- /* P10 board test: Q0 uses 1ms refresh, Q1 uses 0.1ms refresh. */
- PLSR_RESULT PlsrFastRefreshSelfTestQueue(void);
- PLSR_RESULT PlsrDynamicFrequencySelfTestQueue(void);
- /* P12: S0=D1000, S1=D1100; D1010/D1011 is changed by a Modbus master. */
- PLSR_RESULT PlsrModbusDataSelfTestQueue(void);
- /* P13 prepares deterministic SFD K1 data; motion is commanded via Modbus. */
- PLSR_RESULT PlsrModbusControlSelfTestPrepare(void);
- /* P14/P15/P17: P/D counter, soft-limit and dual-AB Modbus stress setup. */
- PLSR_RESULT PlsrHardwareCounterSelfTestPrepare(void);
- /* P18: K4 four-axis 100kHz P/D long-stress setup with soft limits disabled. */
- PLSR_RESULT PlsrLongStressSelfTestPrepare(void);
- void PlsrSelfTestControlTick100us(void);
-
- /* P11 board-test control. Write this signed dword from IAR Watch while the
- * test is running; it represents the live S0 current-segment frequency. */
- extern volatile int32_t PlsrSelfTestLiveFrequencyHz;
- extern volatile uint32_t PlsrSelfTestDynamicTick100us;
- extern volatile uint8_t PlsrSelfTestDynamicPhase;
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* PLSR_SELF_TEST_H */
|