Top Banner
1 WinCon with EzProg-I WinCon with EzProg-I 報報報 : Frank Lin 泓泓泓泓 ICP DAS
45

WinCon with EzProg-I

Jan 07, 2016

Download

Documents

mirit

WinCon with EzProg-I. 報告人 : Frank Lin. 泓格科技 ICP DAS. Agenda. Machine Automation EzProg-I EzConfig EzHMI EzGo/EzMake Case Study. MA Application. 取放. 切割. 塗佈. 點膠. 鑽孔. SI 應用開發. SDK. Real Time System. 嵌入式系統. BSP. OS 移植. Real Time Operating System. Boot Loader. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WinCon with EzProg-I

1

WinCon with EzProg-IWinCon with EzProg-IWinCon with EzProg-IWinCon with EzProg-I

報告人 : Frank Lin

泓格科技

ICP DAS

Page 2: WinCon with EzProg-I

2

Agenda

• Machine Automation

• EzProg-I

• EzConfig

• EzHMI

• EzGo/EzMake

• Case Study

Page 3: WinCon with EzProg-I

3

MA Application

切割取放 點膠塗佈 鑽孔

OS 移植

嵌入式系統

SI 應用開發

Boot Loader

SDKReal Time System

Real Time Operating System

BSP

Page 4: WinCon with EzProg-I

4

Machine Control Diagram

?

Machine Sensor

Actuator

Motion

Logic

HMI

TimerInterrupt

Panel

Display Operator

Page 5: WinCon with EzProg-I

5

Control Loop Structure

DataCollection

StatusMonitoring

LogicControl

MotionControl

MotorControl

100 uS

1~2 ms

5~10 ms

50~100 ms

1 sec

Page 6: WinCon with EzProg-I

6

Real Time Task Execution

Logic

Motion

HMI

Management

1ms 5ms 50 ms 1 s

Page 7: WinCon with EzProg-I

7

• Machine Automation • EzProg-I • EzCore• EzConfig• EzHMI• EzGo/EzMake• Case Study

Agenda

Page 8: WinCon with EzProg-I

8

EzProg-I

Real TimeTask Execution

MotionLogic

HMI

?

Real Time Programming Method & Tool

Page 9: WinCon with EzProg-I

9

EzProg-I Structure

EzCore

Interrupt

Motio

nC

on

trolLo

gic

C

on

trol

HMI Control

EzHMI ActiveXEz

Confi

g EzGoEzM

ake

Page 10: WinCon with EzProg-I

10

EzProg-I Learning Curve

T

EEzProg-I

eVC

.NET

Page 11: WinCon with EzProg-I

11

EzCore-1

• 32 processes• Multiple threads per process• 256 priority levels• Preemptive thread scheduler• Round-Robin for same priority thread schedule

0-96 Reserved for real-time above drivers

97-152 Default Windows CE-based device drivers

153-247 Reserved for real-time below drivers

248 - 255 Maps to non-real-time priorities

Real Time Scheduler of WinCE

Page 12: WinCon with EzProg-I

12

EzCore-2

InterruptInterrupt

EzCoreEzCore

RTSRRTSR USERUSER

RegisterRegisterM,T,C,DM,T,C,D

B,W,DW,F,DBB,W,DW,F,DB

Digital I/ODigital I/OIN_Xa(IN_Xa(XnoXno))

OUT_Y(OUT_Y(YnoYno,,on/offon/off))

Analog I/OAnalog I/OIN_AI(AIno)IN_AI(AIno)

OUT_AO(AOno,Vout)OUT_AO(AOno,Vout)

Priority Working thread Note

30~37i8048 thread for DI 0~7

Interrupt Above All Drivers

80~87 RTSR No 0~7Hard Real Time Above Drivers

160~164

USER RUN Thread 0~4

Soft Real Time Below Drivers

253~255

USER RUN Thread 5~7

Non Real Time

Page 13: WinCon with EzProg-I

13

EzCore-3

EzCore EzCore 初始化初始化

宣告中斷處理程序宣告中斷處理程序

啟動中斷功能啟動中斷功能

結束中斷功能結束中斷功能

EzCore EzCore 關閉關閉

宣告定時執行程序宣告定時執行程序

啟動定時執行功能啟動定時執行功能

結束定時執行功能結束定時執行功能

宣告宣告 USERUSER 執行程序執行程序

啟動 啟動 USERUSER 執行程序執行程序

結構化的實時控制的程式設計

結束 結束 USERUSER 執行程序執行程序

Page 14: WinCon with EzProg-I

14

Real Time Scan Thread

ret=SCAN_ENGINE_START(); ret=SCAN_ENGINE_START(); // EzCore Start// EzCore Startif (ret == _NO_ERROR)if (ret == _NO_ERROR){{

SET_M(200,true); SET_M(200,true); //System initial ok//System initial okSET_RTSR(0,&(ptTSRFunc)TSR_RUN,1000);SET_RTSR(0,&(ptTSRFunc)TSR_RUN,1000);START_RTSR(0); START_RTSR(0); // Start real time scan thread// Start real time scan threadSET_MSG(0,TEXT("start RTSR OK !!"));SET_MSG(0,TEXT("start RTSR OK !!"));

}}

宣告定時執行程序宣告定時執行程序

啟動定時執行功能啟動定時執行功能結束定時執行功能結束定時執行功能

Page 15: WinCon with EzProg-I

15

AES Encryption

硬體硬體 IDID 序序號號

SISI 系統金鑰系統金鑰

AES AES 加密加密

註冊碼產生註冊碼產生

A x B=C

C / B=A

EzCore-4

Page 16: WinCon with EzProg-I

16

AES EncryptionM6212ButtonST

MSG249ColorEdit

EzConfig->Edit->Encrypt

MSG245Label

Page 17: WinCon with EzProg-I

17

Project Development Flow

I/O 初始規劃 -> EzConfig

I/O 配置表、 Device Initial

IO 配線及測試應用功能程式設計Scan-Time Loop

I/O 、 HMI 綜合試機

功能修改配線調整

人機畫面規劃 -> EzHMI

Page 18: WinCon with EzProg-I

18

• Machine Automation • EzProg-I • EzConfig• EzHMI• EzGo/EzMake• Case Study

Agenda

Page 19: WinCon with EzProg-I

19

EzConfig Positioning

InterruptInterrupt

EzCoreEzCore

RTSRRTSR USERUSER

RegisterRegisterM,T,C,DM,T,C,D

B,W,DW,F,DBB,W,DW,F,DB

Digital I/ODigital I/OIN_Xa(IN_Xa(XnoXno))

OUT_Y(OUT_Y(YnoYno,,on/offon/off))

Analog I/OAnalog I/OIN_AI(AIno)IN_AI(AIno)

OUT_AO(AOno,Vout)OUT_AO(AOno,Vout)

EzConfig AES EncryptionAES Encryption Message EditMessage Edit

Page 20: WinCon with EzProg-I

20

EzConfig-2

• Slot Operation• Scan slot1~slot7 • Load .INI and .NOT files• Save .INI and .NOT files

• Module Operation•Read IO_TABLE.XML• Write IO_TABLE.XML • Edit all registers

EzConfigEzConfig for Wincon for Wincon

EzCore.DLLEzCore.DLL

IO_Table.XMLIO_Table.TXT

Device.INIXXX.NOT

Page 21: WinCon with EzProg-I

21

DIO Configuration

接點編號自動按

順序 , 以八進制產

生 .

備註欄 ,可清楚說明各接點

的應用

Y 接點 (DO),按下立即輸出

X 接點(DI), 立即反應

狀態

設定中的模組

Page 22: WinCon with EzProg-I

22

DIO Configuration Result

Page 23: WinCon with EzProg-I

23

9 Types of Variable

可供編寫文字字串 , 長度 30

個字元和 PLC 相同的

變數設定M Var. Edit

輸入編號及相關註解

Page 24: WinCon with EzProg-I

24

Variable Map ListRegister Specification Remarks

Register Specification Remarks

XLocal DI X0000 ~ X0777

DGeneral D0 ~ D4095

Remote DI X1000 ~ X7777 Retain D4096 ~ D8191

YLocal DO Y0000 ~ Y0777

BGeneral B0 ~ B1023

Remote DO Y1000 ~ Y7777 Retain B1024 ~ B2047

AO Local AO AO000 ~ AO511W

General W0 ~ W1023

AI Local AI AI000 ~ AI511 Retain W1024 ~ W2047

T General T0 ~ T299DW

General DW0 ~ DW4095

CGeneral C0 ~ C511 Retain DW4096 ~ DW8191

Retain C512 ~ C1023F

General F0 ~ F2047

MGeneral M0 ~ M8191 Retain F2048 ~ F4095

Retain M8192 ~ M16383 DB General DB0 ~ DB49

MSG Retain MSG0 ~ MSG249

Retain: 設定在此範圍的變數 , 斷電仍會

保持原值

MSG249 為特別的字串輸入 , 所有文字皆以星號表

示 , 適合保密性資料 .

Page 25: WinCon with EzProg-I

25

EzConfig & EzCorePLC Style Programming in eVC 1. 讀取 AI/ DI IN_AI(01); IN_Xa(01)

2. 輸出 AO / DO OUT_AO(01,1.5); OUT_Y(01,true)

3. 讀取 AO / DO GET_AO(01); GET_Y(01);

4. 設定 M 變數 SET_M(01);

5. 讀取 M 變數 GET_Ma(01); GET_Mb(01);

if (GET_Ma(5013) && IN_Xa(04) && IN_Xa(05)) // 拍板量測基板寬度 OK{ SET_F(2901,GET_F(3000)-I8094MF.GET_LP(cardNo, AXIS_X)*GET_F(2500));// 存板寬值 X_STOP(); SET_T(200,false,100); SET_T(200,true,300); SET_M(5013,false); SET_M(5014,true);}

Page 26: WinCon with EzProg-I

26

• Machine Automation • EzProg-I • EzConfig• EzHMI• EzGo/EzMake• Case Study

Agenda

Page 27: WinCon with EzProg-I

27

HMI Example第一層 第二層 第三層

1 1.1

1.2

1.1.1

1.1.2

1.1.3

1.2.1

1.2.2

1.2.3

Page 28: WinCon with EzProg-I

28

EzHMI-1

How to do HMI development on WinCE ?

GWES

Message Queue 1

Message Loop

WinProc

DispatchMessage()

GetMessage()

PostMessage()

SendMessage()

Message Queue 2

Disp. DriverMS Driver KB Driver

?

Page 29: WinCon with EzProg-I

29

EzHMI-2

  DAQ Card DI/O Operation

DAQ Card AI Operations

 

VC++ with DAQ Card Library 

   

 

VB with DAQ Card Library

   

 

VB with HMI ActiveX Object

   

730 Lines

400 Lines

120 Lines

Operation

Tool

500 Lines

200 Lines

130 Lines

Page 30: WinCon with EzProg-I

30

Features

1. 可設定字型大小 . 顏色

2. 可設定八種語系

3. 可設定狀態改變時 , 對應的顏色

4. 可指定與 EzConfig 的 變數連接

EzHMI-3

Page 31: WinCon with EzProg-I

31

EzHMI-4

• LED : 提供使用者量測或工控應用上相關燈號或發光二極體 (LED) 顯示與設定功能

• SWITCH : 提供使用者量測或工控應用上相關開闢顯示與設定功能

Page 32: WinCon with EzProg-I

32

LED Property

LED 顯示的數量

LED 之間的距離

LED 排列方式

LED 形狀

LED 外框

LED 顯示方向( 上下 )

LED 顯示方向( 左右 )

LED 數值

LED 更新時間

LED 顯示項目

欲顯示在 LED 的位址

顯示文字狀態

選擇字型及語言( 八種語系 )

文字顏色 (ON)

文字顏色 (OFF)

LED 顏色 (ON)

LED 顏色 (OFF)

LED 背景顏色

Page 33: WinCon with EzProg-I

33

EzHMI & EzCore

Page 34: WinCon with EzProg-I

34

• Machine Automation • EzProg-I • EzConfig• EzHMI• PACBasic Example• EzGo/EzMake• PCB Coater Example

Agenda

Page 35: WinCon with EzProg-I

35

EzProg-I for PACBasic形狀識別

Page 36: WinCon with EzProg-I

36

• Machine Automation • EzProg-I • EzConfig• EzHMI• PACBasic Example• EzGo/EzMake• PCB Coater Example

Agenda

Page 37: WinCon with EzProg-I

37

I-8094F

• 特色:– 4 軸控制– 可接收外部手揺輪– 4 段式自動歸原點功能– 最高可達 4 Mpps Pulse 輸出頻率– 直線 /圓弧 插補功能– 位置比對功能– 雜訊數位濾波– 同步運動– FRnet 可廣充 128DI/128DO

Page 38: WinCon with EzProg-I

38

EzGo Utility

• Configuration

• Basic Operation

Page 39: WinCon with EzProg-I

39

Configuration

Show/Select Modules and Axes

Set Pulse & Encoder mode

Set Motion I/O

Set Servo I/O

Set INT Factor

Set input I/O Filter

Page 40: WinCon with EzProg-I

40

Configuration

• Show/Select Modules and Axis

• Set Motion I/O

• Set Servo I/O

• Set Pulse & Encoder mode

• Set input I/O Filter

• Set INT Factor

• Save config/Load config

Page 41: WinCon with EzProg-I

41

Basic Operation

Show/select module and Axis

Move parameter

Choose mode

Function List area

Show Motion I/O & Servo I/O &

Encoder/Pulse status

Single Axis Home

Page 42: WinCon with EzProg-I

42

I-8094H

Page 43: WinCon with EzProg-I

43

EzMake Utility

Message Window and Status Window

Main menu

Resource configuration for IT, MP, ISR, and MD

Control Button

Edit Functions and Parameters

i-8094H API List

i-8094H API Assortment

Page 44: WinCon with EzProg-I

44

拍板拍板 板寬板寬墨輪墨輪

ModbusModbus

2 AO 2 AO 控速控速++ 計數器計數器

一般一般IOIO

7520A->4227520A->422

J2S-AJ2S-A

EzProg-I for PCB Coater

Page 45: WinCon with EzProg-I

45

Conclusion

• EzProg-I 的功能定位– A set of modularized tool– A method of Real Time Programming

• EzProg-I 的目標應用– PLC with HMI + Motion Module– IPC with DOS + ISA bus cards