Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

How to Test Your IO Card Read & Write by C#?


Article Guidance
Zmotion Technology

We Zmotion Technology tested  IO reading and writing speed with C# for your reference. Specifically, the hardware we used is ECI motion control card EIO00XX series IO card, ECI0032 & ECI0064, for other models of ECI00XX series, they are with same usages and results.

Information will be shown from these aspects: 
PART ONE
  What is ECI0032 / ECI0064 IO Card?

  

PART TWO
  How to Check ECIO Control Card "IN" & "OP" Functions?


PART THREE
  How to Check Develop ECIO Card by C#?

  

PART FOUR
  Test Routine Codes: Quick to Read Multi-IO States in C#

  

PART FIVE
  Test Result



“Related”

*PC (C#) Function Library: https://www.zmotionglobal.com/download_list_21.html *

*PC (C#) Development Examples: https://www.zmotionglobal.com/download_list_15.html *

*Hardware – ECIO IO Card Cards: https://www.zmotionglobal.com/pro_list_95.html *

*Software – RTSys (one free development software, you can download to try it under simulation, please refer to user manual): https://www.zmotionglobal.com/pro_info_282.html *


01

What is ECI0032 / ECI0064 IO Card?

Zmotion Technology

ECIO control cards (ECI0032 / ECI0064) connect to PC by Ethernet / RS232, then operate according to received PC commands. From the name, it can be inferred that ECI0032 supports 16 inputs and 16 outputs, ECI0064 supports 32 inputs and 32 outputs. If you want to more, 272 inputs and 272 outputs can be expanded at most by CAN modules.

Generally, ECIO IO cards can  do real-time logic control and watch IO state when you use optimized network communication protocol.

For ECIO IO control card development, we can use VC, VB, VS, C++, C#. While running, you need to add dynamic library “zmotion.dll”, later specific usage will be shown. At the same time, connecting the controller to RTSys for debugging.

1.png

(1)    Normal Connection Configuration

A.  ECI0032 16 IN & 16 OUT IO Control Card:

2.png

B.  ECI0064 32 IN & 32 OUT IO Control Card:

3.png


(2)    Hardware IO Interfaces

ECIO IO control cards support EtherNET, RS232, CAN, Digital IN, Digital OUT interfaces, and two power interfaces.

A.  Ethernet & RS232

Ethernet and RS232 are used to connect to PC as needed.

B.  CAN & Two Power

*CAN here is mainly used to expand more hard resources.

*Main Card Power:

4.png

*IO Power:

5.png

It can be seen ECI0032/ECI0064 needs two powers (inner power + IO power) synchronously, which is different from other control cards. In addition, recommend you use two independent 24V power for inner power and IO power, in this way, interference on IO circuit won’t go to control card inner circuit by the power directly, then no influence on control card action.

C.  Digital IN “IN”

--General IN Wiring Reference--

6.png

--General IN Hardware Specification--

7.png

Above shows ECI0032 / ECI0064 general inputs are NPN leakage signals,  so please also select NPN types sensors. For other ZMC or ECI motion control boards, you’d better read the user manual at first.

D.  Digital OUT “OP”

--General OUT Wiring Reference--

8.png

--General OUT Hardware Specification--

9.png

Above shows ECI0032 / ECI0064 general inputs and outputs are NPN leakage signals, so please also select NPN types sensors for IN, and OUT outputs 0V, that is, the signal conducts with EGND.

For other ZMC or ECI motion control boards, you’d better read the user manual at first.


(3)    Controller State

In RTSys software, there is one window that shows corresponding states. Below shows ECI0032 controller basic information.

10.png



02
 How to Check ECIO Control Card “IN” & “OP” Function?
Zmotion Technology

(1)    Test Whether ECI0032 / ECI0064 IN are OK?

According to former IN wiring, it can be known the input signal can be obtained when IN and EGND are conducted.

Then you can check following below steps.

Step 1: prepare  one cable, one side connects to IO power ground “EGND”.

Step 2: open  RTSys / ZDevelop at the same time, connect to your ECIO card through Ethernet or RS232.

Step 3: open  IN window, use another side’s of cable to keep touching the corresponding IN, at the same time, watching IN window whether the related IN changes or not.

Step 4:  verify it – if the IN is OK: when conducted, corresponding IN in RTSys window shows Green, when not conducted, corresponding IN in RTSys window shows Red.

--RTSys IN Window--

11.png

--IN0 & EGND Conducted--

12.png

--IN0 & EGND Not Conducted --

13.png


(2)    Test Whether ECI0032 / ECI0064 OP (OUT) are OK?

According to former OUT wiring, it can be known when OUT and EGND are conducted, the OUT will output the signal. Sometimes the OUT voltage is 0V even though there is output, but if no output, the OUT state is in high-impedance, therefore, not recommended to use the voltage range of the multimeter for testing. Instead, use the continuity range of the multimeter.

Then you can check following below steps.

Step 1:  prepare one  multimeter, open  RTSys / ZDevelop, connect to your ECIO card through Ethernet or RS232.

Step 2: open  OP (OUT) window, operate corresponding OUT. At the same time, make the multimeter at conducted position (if conducted between red and black pens, the multimeter will sound like “didi”, different multimeters are with different sounds, you can test the sound in advance through short connect red and black pens after conducted), then use red pen of multimeter to touch corresponding OUT, use black pen to touch IO power EGND.

Step 3:  verify it – if the OP is OK: when open RTSys OP, it is conducted (whether there is didi sound), when close RTSys OP, it is not conducted.

--Multimeter Conducted--

14.png

--RTSys OP Window--

15.png

--OP0 Not Conducted--

16.png

--OP0 Conducted --

17.png




03
  How to Develop ECIO Card by C#?
Zmotion Technology

Step 1: Create One Project

In VS menu, create one project at first – click “File” – “New” – “Project”.


Step 2: Select Development Language

Please select Visual C#, .NET Framework 4, and Windows application program.


Step 3: Obtain Zmotion PC C# API Func tion Library

A.      You can download from here or contact us directly.

18.png

B.      Copy Zmotion C# library file and corresponding files into new created project.

          a. copy “zmcaux.cs” file into new created project.

          b. put “zaux.dll” and “Zmotion.dll" files into folder bin – debug.

C.    Open the new built project in VS, and in “solution resources manager”, click “show all”, then click “zacaux.cs” file, click “include in project”.

D.     Double click Form1 of Form1.cs, code editing interface appears, then write “using cszmcaux” at the beginning, and state the controller handle g_handle.

19.png


Step 4: Develop Your Project

Get Zmotion PC Programming Manual + Related Commands....

Thank you for your reading, next two parts will be shown in next article, that is "Source Codes of IO Read & Write Speed Testing For You".

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

Contact Us-Youtube