>ECI1000 Motion Control Card (Pulse)
>ECI2000 Motion Control Card (Pulse / EtherCAT)
>ECI3000 Motion Control Card (Pulse / EtherCAT)
>PCI EtherCAT PC-Based Motion Control Card
>PCIe EtherCAT PC-Based Motion Control Card
>Free Vision & Motion Development RTSys
>VPLC532E Vision Motion Controller
XPCIE1032H is one EtherCAT PCI Express motion control card developed by Zmotion Technology.
*XPCIE1032H Introduction Video*: https://youtu.be/B1ktSxIRa44
*XPCIIE1032H Learning Videos*: https://www.youtube.com/watch?v=0C96S5_hVf0&list=PLvzEuQVKptq7aDErj5Q46hYGUYZODWHkW&pp=gAQB
*XPCIE1032H Lesson 9 Video: https://youtu.be/gGJ2H3UdSeg

And one software kernel is built.
--XPCIE1032H Card & MotionRT7 Soft Kernel--
P 1D/2D/3D PSO (high-speed hardware position comparison output): suit to vision fly-shooting, precise dispensing, laser energy control, etc.
P in PC Windows development, it can achieve real-time, and the instruction interaction speed is faster 10 times than traditional PCI / PCIe.
Average Value | C++ LOCAL | C# LOCAL | Traditional PCI / PCIe | PLC EtherNET |
Period of one command reading with 1W times | 4.70us | 5.3us | 64us | 500us-10ms |
Period of one command reading with 10W times | 3.90us | 5.7us | 65us | 500us-10ms |
Period of multi-command reading with 1W times | 6.20us | 8.85us | 472us | 500us-10ms |
Period of multi-command reading with 10W times | 5.50us | 8.37us | 471us | 500us-10ms |
Today, mainly for PSO function of “multi-axis 2D & 3D” for vision fly-shooting and precision output.
Review:
“For PSO function introduction, please refer to Lesson 7 ”
“For single-axis PSO, please refer to Lesson 8 ”.
Content of Now Lesson:
Take lesson 7 C# routines as example, showing PSO 2D & 3D modes operations for you.

[What is PSO & Related C# Commands]
[PSO 2D Modes Description & Running Effect]
[PSO 3D Modes Description & Running Effect]
[PSO 2D / 3D PSO Core C# Codes]
A. PSO Introduction
PSO: position synchronized output -- stably, rapidly, accurately.


The right-one uses PSO: line motions are fast, even in corner deceleration, stable output is also achieved. Corner processing is just one small part of the whole trajectory. When it is processed well by PSO, increasing the production capacity.
For details, please check Lesson 7 PSO & Encoder Latch .
B. How to Achieve PSO
For Zmotion Technology, use ZAux_Direct_HwPswitch2 functi on to do PSO in C# (and other PC languages). It makes controller’s high-speed IO output the signal, the respond speed can be up to us level.
ZAux_Direct_HwPswitch2 (handle, axisnum, mode, opnum, opstate) | |
Handle | Connection handle |
Axisnum | The axis N. to compare output |
Mode | Compare modes: l mode 1 – mode 6: single-axis PSO (lesson 8). l mode 25 & mode 26: multi-axis 2D PSO l mode 35 & mode 36: multi-axis 3D PSO |
Opnum | The output No. of PSO. |
Opstate | The first comparison point’s output state: 0—FF, 1-ON. |
ModePara1~4 | Each modes need different parameters. |
ZAux_Direct_HwTimer (handle, mode, cyclonetime, optime, reptim, opstate, opnum) | |
Mode | 0 – stop, 2 – start |
cyclonetime | The period type, the unit is us |
optime | The valid type, the unit is us |
reptime | Repeat times |
Opstate | Start timing when the OUT state becomes not this state. |
Opnum | The output that supports PSO |
For details, please refer to Zmotion PC Programming Manual. Download Add.: https://www.zmotionglobal.com/download_list_17.html Contact Us: https://www.zmotionglobal.com/contactus.html Including the C# library file. How to call the PC library file, please review lesson 2 . | |
(1) Mode 25: 2D Multi-Axis Comparison
A. How to Set
Step 1: specify controller’s high-speed output port.
Step 2: set the first comparison point’s output state.
Step 3: set which axis to do comparison.
Step 4: set comparison points into TABLE register.
Step 5: set comparison points’ pulse max error .
Step 6: open comparison.
Step 7: move axis.

B. C# Operation
--C# Configurations--

Set OUT0, the first point’s output state is 1 (ON), and comparison axes are 0 and 1.
2 comparison points (100, 50), and (160, 80) here.
That is, when the axis arrives these two positions, and when the error range is within ±10 pulses, triggering level to invert once.
--SCOPE Data Showing--

It can be seen it outputs 1 (open the output) when at (100, 50), then resumes as 0 (close the output) when at (160, 80).
*RTSys is Zmotion own free IDE debugging tool. It can help debug C# programs. You can check corresponding article ( lesson 6 )*
(2) Mode 26: 2D Multi-Axis Comparison with Timer
A. How to Set
Steps are basically same as mode 25.
The difference is this mode is used together with HW_TIMER timer command, after setting 2D comparison points (step 4 in mode 25), then:
Step 5: set pulse valid time, pulse period time, and pulses (repeat times),
Step 6: set comparison points’ pulse max error.
……

B. C# Operation
--C# Configurations--

Set OUT0, the first point’s output state is 1 (ON), and comparison axes are 0 and 1.
2 comparison points (100, 100), and (200, 200) here.
That is, when the axis arrives these two positions, and when the error range is within ±10 pulses, it will trigger pulses with time of 20ms, whose the period is 60ms.
--SCOPE Data Showing--

(1) Mode 35: 3D Multi-Axis Comparison
A. How to Set
Steps are totally same as mode 25 2D comparison.
But please note 3 comparison axes should be set, and comparison points should be 3D coordinates.

B. C# Operation
--C# Configurations--

Set OUT0, the first point’s output state is 1 (ON), and comparison axes are 0, 1, 2.
4 comparison points (80, 40. 20), (160, 80, 40), (240, 120, 60), and (320, 160, 80).
That is, when the axis arrives these 4 positions, and when the error range is within ±10 pulses, triggering level to invert once.
--SCOPE Data Showing--

(2) Mode 36: 3D Multi-Axis Comparison with Timer
A. How to Set
Steps are totally same as mode 26 2D comparison.
But please note 3 comparison axes should be set, and comparison points should be 3D coordinates.

B. C# Operation
--C# Configurations--

Set OUT0, the first point’s output state is 1 (ON), and comparison axes are 0, 1, 2.
4 comparison points (80, 40. 20), (160, 80, 40), (240, 120, 60), and (320, 160, 80).
That is, when the axis arrives these 4 positions, and when the error range is within ±10 pulses, it will trigger pulses with time of 20ms, whose the period is 60ms.
--SCOPE Data Showing--

int ZAux_Direct_HwPswitch2_2D()
{
string cmdbuff="";
string tempbuff = "";
StringBuilder cmdbuffAck = new StringBuilder();
//generate the command
switch (PsoMode)
{
case 7:
tempbuff = String.Format("HW_PSWITCH2({0},{1},{2},{3},{4},{5},{6},{7})", PsoMode, ModePara1, ModePara2, ModePara3, ModePara4, ModePara5, ModePara6, ModePara7);
break;
case 25:
tempbuff = String.Format("HW_PSWITCH2({0},{1},{2},{3},{4},{5})", PsoMode, ModePara1, ModePara2, ModePara3, ModePara4, ModePara5); break;
case 26:
tempbuff = String.Format("HW_PSWITCH2({0},{1},{2},{3},{4},{5},{6},{7},{8})", PsoMode, ModePara1, ModePara2, ModePara3, ModePara4, ModePara5, ModePara6, ModePara7, ModePara8);
break;
case 35:
tempbuff = String.Format("HW_PSWITCH2({0},{1},{2},{3},{4},{5})", PsoMode, ModePara1, ModePara2, ModePara3, ModePara4, ModePara5); break;
case 36:
tempbuff = String.Format("HW_PSWITCH2({0},{1},{2},{3},{4},{5},{6},{7},{8})", PsoMode, ModePara1, ModePara2, ModePara3, ModePara4, ModePara5, ModePara6, ModePara7, ModePara8);
break;
}
//call command to execute the function
int ret = zmcaux.ZAux_Execute(g_handle, tempbuff, cmdbuffAck, 2048);
if (cmdbuffAck.Length != 0)
MessageBox.Show(cmdbuff, "Note");
return ret;
}