Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Zmotion Ethernet IO Control Card | C# Writing & Reading Test

Zmotion focus on motion control and automation solutions. There are motion controller, vision motion controller, also motion control card, and each has several series. Today, motion control card is the "main character", that is, Zmotion motion control card -- ECIO series IO card. Specifically, through C# language, develop ECI IO card and test interaction speed of multiple IO reading and writing.

Let's begin!



01
ECI0032/ECI0064 IO Card Hardware Introduction

(1) IO Card Function

For, ECI0032/ECI0064 ECIO series motion control card, it can be connected to the PC through Ethernet, RS232 communication interface for receiving commands from PC to execute. In addition, each expansion module can be linked through CAN bus to expand inputs and outputs.  

1.png

ECI0032 IO Control Card

2.png

ECI0064 IO Control Card

ECIO series motion control cards (ECI0032/ECI0064) uses optimized network communication protocol to watch logic control and IO status in real-time.

As for the application program, VC, VB, C++, C# can be used to develop. While the program is running, it is necessary to use dynamical library zmotion.dll. During debugging, it can connect to ZDevelop and controller at the same time, in this way, easy to debug and convenient to observe.  

3.png

4.png

ECI0032

5.png

ECI0064


(2) IO Card Hardware Interface

6.png

general input wiring reference

7.png

general output wiring reference

For more specific information, please refer to each user manual from "download".


(3) IO Control Card Basic Information

8.png





0 2
ECI IO Card C# Development

(1) New build WinForm project & Add function library

In VS2015 menu, click "file" -- "new build" -- "project".

9.png

Select "Visual C#", .NET Framework 4 and Windows app.

10.png

Obtain C# function library from the manufacturer, or c ontact us directly.

Copy obtained C# library files and relevant files into new-built project.

--copy zmcaux.cs file to new created project--

11.png

--put zaux.dll and zmotion.dll file into bin\debug folder--

12.png

Now, use vs to open new-built project file, click "show all files" in the right "solution resource manager". Then, right-click zmcaux.cs file -- included in project.

13.png

Double click Form1 in Form1.cs, when code editing interface appeared, write " using cszmcaux" in the beginning of the file, and declare controller handle "g_handle".

14.png

Here, project was created, it is time to do C# project development.


(2) PC Function Introduction

Get PC manual firstly from Zmotion website -- download -- software manual, or contact us directly.

--link with controller to get link handle--

15.png

--rapidly read multiple inputs' current status--

16.png

--rapidly read multiple outputs' current status--

17.png




03
Test Routine: C# Reads Multi-IO Status Rapidly

(1) Routine Interface

18.png


(2) Relevant Codes

--call the interface function ZAux_OpenEth() that is used to link with controller in event processing function of link button to connect to controller, then open timer 1 to watch controller IO states when linked--

19.png

--watch controller IO status through timer 1--

20.png

--test function: multiple inputs' state reading speed--

21.png

--test function: multiple outputs' state reading speed--

22.png

--test function: multiple outputs' state configuration--

23.png


(3) Test Result of Interaction Speed Between Multi-IO And Upper Computer

32 inputs and 32 outputs.

Reading and writing times: 1000

Interaction speed test result:

24.png

32 inputs and 32 outputs.

Reading and writing times: 10000

Interaction speed test result:

25.png

32 inputs and 32 outputs.

Reading and writing times: 100000

Interaction speed test result:

26.png





04
Analysis & Conclusion

The above is to test the reading speed of 32 inputs, the reading speed of 32 outputs and the writing speed of 32 outputs. From the data display of the above operation effect diagram, whether it is an input port or an output port, their interaction speed is maintained at around 200us.

When the number of tests increases from 1000 to 1W or even 10W, the interaction speed remains at around 200us. That is, the test results are very stable.

Then, the test data is shown in the table below:

27.png






ABOUT ZMOTION

That's all, thank you for your reading -- Zmotion Ethernet IO Control Card | C# Writing and Reading Test

For more information, please pay close attention to "Support"  and   "Download" , and there are other platforms about Zmotion - Youtube   &   LinkedIn   &   Twitter    &   Tiktok    &   Facebook including technical information (development environment, routine code), product showing, company development, etc.

Hope to meet you, talk with you and be friends with you.  Welcome!

This article is edited by ZMOTION, here, share with you, let's learn together.

ZMOTION: DO THE BEST TO USE MOTION CONTROL.

Note: Copyright belongs to Zmotion Technology, if there is reproduction, please indicate article source. Thank you.

Zmotion Technology focuses on development of motion control technology and general motion control products, it is a national high and new technology enterprise. Due to its concentration and hard work in motion control technology, ZMOTION already become one of the fastest growing industrial motion control companies in China, and is also the rare company who has managed core technologies of motion control and real time industrial control software completely. Here, Zmotion provides motion controller, motion control card, vision motion controller, expansion module and HMI. In addition, there is one program software developed by Zmotion -- ZDevelop. It is a good choice for you to program and compile. And program through upper computer, there is PC manual.

Zmotion Technology   provides motion control card, motion controller, vision motion controller, expansion module and HMI. ( more keywords   for Zmotion: EtherCAT motion control card, EtherCAT motion controller, motion control system, vision controller, motion control PLC, robot controller, vision positioning...)

Have a good day, best wishes, see you next time.


2013-2023 版权所有 Zmotion Corp. Copyright Reserved 粤ICP备13037187号-1