如图:
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_mc2/70136971.html?id=7693757576691466158
应该这么写,首先刷新轴状态,其次取状态字:
xAxis();
XDirP:=xAxis.NcToPlc.StateDWord.PositiveDirection;
魏正齐 2023.3.24 编辑