Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Zmotion EtherCAT PCIE Card XPCIE1032H for You (8) | C# Single-Axis Vision Fly-Shooting PSO

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 8 Video: https://youtu.be/LyzzxW5807w

1.jpg

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

In lesson 7, PSO and encoder latch knowledge were shown.

Today, let’s see some details of 1D PSO: how to do single-axis PSO for vision fly-shooting?

Take last lesson’s C# routines as example, showing PSO modes operations for you.

2.jpg

[What is PSO & Related C# Commands]

[PSO Modes Description & Running Effect]



( ZMOTION )
What is PSO Function?

A.    PSO Introduction

PSO: position synchronized output.

3.jpg

4.jpg

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 function 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 No.   to compare output

Mode

Compare modes:  

l    Mode 1 – open comparator

l    Mode 2 – stop and delete uncompleted   comparison points

l    Mode 3 – vector comparison

l    Mode 4 – vector comparison,   single-point

l    Mode 5 – vector comparison, period   pulse mode

l    Mode 6 – vector comparison, period   pulse mode, used together with ZAux_Direct_HwTimer command.

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.





( ZMOTION )
PSO Modes Description & Running Effect

(1)    Mode 1: Single-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, enter t he first point (absolute position) TABLE No. for modepara1, enter the last point (absolute position) TABLE No. for modepara2 (OUT will be inverted after meeting set comparison point).

Step 5: set comparison motion direction (direction of point 1: 0 = inverse, 1 = forward, - = no direction).

Step 6: open comparison.

Step 7: move axis.

5.png

B.       C# Operation

--C# Configurations--

6.png

Set OUT0, the first point’s output state is 1 (ON), and the axis is 0.

4 points (100, 200, 300, 400) here, that is, when the axis arrives 100, 200, 300, 400, triggering level to invert once.

--SCOPE Data Showing--

7.png

RTSys is Zmotion own free IDE debugging tool. It can help debug C# programs. You can check corresponding article (lesson 6).


(2)    Mode 2: Clear Comparison Modes

For mode 2, no need modepara1~modepara4 parameters and opstate.

Set 2 for mode. Then, before using, use this mode to clear uncompleted data. At the same time, while moving, it also can be called to stop comparison.


(3)    Mode 3: Single-Axis Vector Comparison

A.       How to Set

Please set 3 for mode.

Steps are same as mode 1. The difference is the needed parameters in step 4: here, mainly for  vector distance, not the absolute distance. And no need modepara3 and modepara4.

8.png

B.       C# Operation

--C# Configurations--

9.png

Also, same as mode 1: OUT 0, ON state, axis 0, 4 points (100, 200, 300, 400).

When the axis 0 arrives vector distance 100, 200, 300, 400, triggering level to invert once

--SCOPE Data Showing--

10.png


(4)    Mode 4: Single-Axis Vector Comparison with One Point

A.       How to Set

Please set 4 for mode.

Steps are same as mode 3. And here  is only for one single point, only modepara1 (vector distance of the point = the current motion distance) should be filled in.

11.png

B.       C# Operation

--C# Configurations--

12.png

OUT 0, ON state, axis 0, 1 point 100.

When it arrives vector distance 100, triggering level to invert once, the comparison ends.

--SCOPE Data Showing--

13.png


(5)    Mode 5: Period Position Comparison, Output with Valid Distance

A.       How to Set

Please set 5 for mode.

Steps are same as mode 4. But under mode 5, 4 parameters are needed:

*ModePara1: comparison point vector distance (current motion distance)

*ModePara2: repeat period = how many valid states

*ModePara3: period distance, valid state distance each time

*ModePara4: valid state distance (<period distance)

14.png

B.       C# Operation

--C# Configurations--

15.png

OUT 0, ON state, axis 0, the point is 80, it will compare 5 times (repeat period), and the period is 100, valid distance is 20.

When it arrives the vector distance >80, then each 100 space, it will output pulses at configured position.

--SCOPE Data Showing--

16.png

This is one interpolation motion (300 & 400) of axis0 0 and axis 1, when it is at vector 80, 180, 280, 380, 480, corresponding period position pulses are ou

Copyright © 2013-2024 Shenzhen Zmotion Technology Co.,Ltd Design by Zmotion    粤ICP备13037187号 Motion Controller-Motion Control Card

Contact Us-Youtube