Omron CS CJ1W-ETN21 инструкция обслуживания

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

Идти на страницу of

Хорошее руководство по эксплуатации

Законодательство обязывает продавца передать покупателю, вместе с товаром, руководство по эксплуатации Omron CS CJ1W-ETN21. Отсутствие инструкции либо неправильная информация, переданная потребителю, составляют основание для рекламации в связи с несоответствием устройства с договором. В законодательстве допускается предоставлении руководства в другой, чем бумажная форме, что, в последнее время, часто используется, предоставляя графическую или электронную форму инструкции Omron CS CJ1W-ETN21 или обучающее видео для пользователей. Условием остается четкая и понятная форма.

Что такое руководство?

Слово происходит от латинского "instructio", тоесть привести в порядок. Следовательно в инструкции Omron CS CJ1W-ETN21 можно найти описание этапов поведения. Цель инструкции заключается в облегчении запуска, использования оборудования либо выполнения определенной деятельности. Инструкция является набором информации о предмете/услуге, подсказкой.

К сожалению немного пользователей находит время для чтения инструкций Omron CS CJ1W-ETN21, и хорошая инструкция позволяет не только узнать ряд дополнительных функций приобретенного устройства, но и позволяет избежать возникновения большинства поломок.

Из чего должно состоять идеальное руководство по эксплуатации?

Прежде всего в инструкции Omron CS CJ1W-ETN21 должна находится:
- информация относительно технических данных устройства Omron CS CJ1W-ETN21
- название производителя и год производства оборудования Omron CS CJ1W-ETN21
- правила обслуживания, настройки и ухода за оборудованием Omron CS CJ1W-ETN21
- знаки безопасности и сертификаты, подтверждающие соответствие стандартам

Почему мы не читаем инструкций?

Как правило из-за нехватки времени и уверенности в отдельных функциональностях приобретенных устройств. К сожалению само подсоединение и запуск Omron CS CJ1W-ETN21 это слишком мало. Инструкция заключает ряд отдельных указаний, касающихся функциональности, принципов безопасности, способов ухода (даже то, какие средства стоит использовать), возможных поломок Omron CS CJ1W-ETN21 и способов решения проблем, возникающих во время использования. И наконец то, в инструкции можно найти адресные данные сайта Omron, в случае отсутствия эффективности предлагаемых решений. Сейчас очень большой популярностью пользуются инструкции в форме интересных анимаций или видео материалов, которое лучше, чем брошюра воспринимаются пользователем. Такой вид инструкции позволяет пользователю просмотреть весь фильм, не пропуская спецификацию и сложные технические описания Omron CS CJ1W-ETN21, как это часто бывает в случае бумажной версии.

Почему стоит читать инструкции?

Прежде всего здесь мы найдем ответы касательно конструкции, возможностей устройства Omron CS CJ1W-ETN21, использования отдельных аксессуаров и ряд информации, позволяющей вполне использовать все функции и упрощения.

После удачной покупки оборудования/устройства стоит посвятить несколько минут для ознакомления с каждой частью инструкции Omron CS CJ1W-ETN21. Сейчас их старательно готовят или переводят, чтобы они были не только понятными для пользователя, но и чтобы выполняли свою основную информационно-поддерживающую функцию.

Содержание руководства

  • Страница 1

    OPERA TION MANUAL Ethernet Units Construction of Applications SYSMAC CS and CJ Series CS1W -ETN21 (100Base-TX) CJ1W -ETN21 (100Base-TX) Cat. No. W421-E1-03[...]

  • Страница 2

    CS1W-ETN21 (100Base-TX) CJ1W-ETN21 (100Base-TX) Ethernet Units Construction of Applications Operation Manual Revised Novembe r 2005[...]

  • Страница 3

    v Notice: OMRON products are manufactured for use acc ording to proper procedu res by a qualifi ed ope rator and only f or the pur pos es desc ribe d in this manual. The following conventions are us ed to indicate and cla ssify precaution s in this manual. A lwa ys hee d the informat ion provided wi th them. F ailur e to heed preca utions can resul[...]

  • Страница 4

    vi[...]

  • Страница 5

    vii TABLE OF CONTENTS PRECAUTION S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi 1 Intended Aud ience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii 2 General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 6

    viii TABLE OF CONTENTS SECTION 4 FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4-1 Ove rview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4-2 FTP Server Function Details . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Страница 7

    ix TABLE OF CONTENTS Appendices A Ethernet Network Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 B Buf fer Conf iguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 C TCP Status T ransitions . . . . . . . . . . . .[...]

  • Страница 8

    x TABLE OF CONTENTS[...]

  • Страница 9

    xi About this Manual: This ma nual descr ibes the operation of th e CS1W-ETN21 and CJ1W-ETN21 Ethe rn et Units (1 00Base- TX) for constr ucting a pplicati ons and i ncludes the sec tions descr ibed be low . Please rea d this manual c arefully and be sure you unders tand the infor mation provided before attempt ing to ins tall or operate the E ther [...]

  • Страница 10

    xii Relevant Manuals The following table lists CS- and CJ-s erie s manuals that co ntain infor mation relev ant to Eth er net Units. Man ual numbe r Model Nam e Contents W420 CS1 W -ETN21 CJ1W -ETN21 Ethernet Units O per- atio n Manu al Cons tr uc tio n of Net- wor ks Provi des inf or mation o n operat ing and in stalling 100Base -TX Ethernet Units[...]

  • Страница 11

    xiii W394 CS1 G/H-CPU @@ H CS1G/H-CPU- @@ V1 CJ1G/H-CPU @@ H CJ1G-CPU @@ Progr ammab le Con- trollers Prog ram- ming Ma nual Describes pr ogramm ing, tasks , file mem or y , and other function s for the CS -series and CJ-series PLCs . Use toget her with the Programmab le Controllers Oper a- tion Man ual (W339 f or CS-series PLCs and W3 93 f or CJ- [...]

  • Страница 12

    xiv[...]

  • Страница 13

    xv Read and Understa nd this Manual Please read and u ndersta nd this ma nual before using the produc t. Pleas e consu lt your OMRON represent ative if you hav e any questi ons or comm ents. Warranty and L imitation s of Liability WARRANTY OMRON's exclusive warranty is tha t the prod ucts a re free fro m defects in m ater ials and workma nship[...]

  • Страница 14

    xvi Application Considerations SUITABILITY FOR USE OMRON shall no t be re sponsible for conformi ty with any s tandards, c odes, or reg ulations tha t apply to the combina tion of products in th e custome r's appl ication or use of the pr oducts. At the cu stomer 's reque st, OMRON wil l provide a pplicable thi rd par ty ce r tifi cation [...]

  • Страница 15

    xvii Disclaimers CHANGE IN SPECIFICATIONS Produc t specif ications and acc essor ies m a y be changed at any time based on im prov emen ts and other reasons. It is our pra ctice to change model numbe rs when p ublished ratings or features are c hanged, or when signifi cant con stru ction ch anges are made. Howev e r , so me spe cificat ions of the [...]

  • Страница 16

    xviii[...]

  • Страница 17

    xix Unit Versions o f CS/CJ-series Unit V ersions A “unit version” has been introd uced to mana ge Units in the CS/ CJ Seri es accord ing to differences in functiona lity accom panying Unit upgrades. Notation of Unit V ersions on Pr oducts The unit version is gi v en to the r ight of the lot number on the namepl ate of the product s for which u[...]

  • Страница 18

    xx Using Unit V ersion Label The f ollowing unit version label is provided with the Ether net Unit. This label can be attac hed to th e front of the E ther net Unit to differentiate between Ether ne t Units with different unit versions. Unit V ersion Notation In this manual , the unit version of a Eth er net Unit i s given as shown in the fol- low [...]

  • Страница 19

    xxi PRECA UTIONS This section pro v ides general precaution s for using the CS1W -ETN21 and CJ1W -ETN21 Eth ernet Units (100Base- TX). The information contained in this s ection is impo rtant for the safe and reliable a pplication o f Ethernet Units. Y o u must read this section an d understand the information cont ained bef ore attempting to set u[...]

  • Страница 20

    xxii Intend ed A udience 1 1 Intende d A u dience This manual is intend ed for the f ol lowing person nel, who must als o hav e knowledge of electr ic al syst ems (an electr ical engine er or the equivalent). • P ers onnel in charge of ins talling F A sy stems. • P ers onnel in char ge of de sign ing F A sys tems. • P ers onnel in char ge of [...]

  • Страница 21

    xxiii Safety Precaution s 3 !WARNING Provide s afety measures in extern al cir cuits (i .e., not in the Pro grammable Controll er), includ ing the following item s, to ensure safety in the system if an abnor ma lity oc curs du e to ma lfunctio n of the PLC or another external factor affecting the PLC o peration. Not doing so may result in se riou s[...]

  • Страница 22

    xxiv Operating En vironment Precautions 4 4 Operating En vironment Precautions !Caution Do not operate the c ontrol s ystem i n the following locations : • Loc ation s subje ct to direc t sunligh t. • Loc ation s subj ect to tempe ratures o r humid ity o utside t he range speci fied in the specifi catio ns. • Loc ation s subje ct to conde nsa[...]

  • Страница 23

    xxv Application Precaut ions 5 • Al wa ys use the power supply voltages specifie d in the operati on manuals. An in correct voltage may result in malfun ction or bur ning. • T ake appro pria te meas ures to en sure that the specif ied power with th e rated voltage and frequenc y is s upplied. Be par ticula rly carefu l in plac es where the powe[...]

  • Страница 24

    xxvi Conf ormance to EC Direct ives 6 • Wh en transpo r tin g the Un it, use s pecia l packing box es a nd protec t it fro m being exposed to excessive vibration or i mpact s dur ing tran spor ta tion. • CP U Bus Uni ts will be res tar te d when routing tables are transferred fro m a Programming Device to the CPU Unit. Restar ting thes e Units [...]

  • Страница 25

    1 SECTION 1 Intr oduction This section introduces the fun ctions and protocols used in Ethernet Uni t communications services. 1-1 Ethernet Unit Communications Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1-2 Functions Listed by Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1-3 T able o [...]

  • Страница 26

    2 Etherne t Unit Commun ications Se rvices Section 1-1 1-1 Ethernet U nit Communications Serv ices Note When tran sferring d ata thro ugh the inter net, a glo bal IP a ddress must be acquired for the Et her net Unit. 1-2 Functions Listed by Purpose Service Main func tions Counterpart dev ice Reference Mail s end function Through intranet or interne[...]

  • Страница 27

    3 T able of Protocols Section 1-3 Note Any one of the following conditi ons can be specifie d to send e-m ail automa ti- call y: A per iodic time r times o ut, the Ma il Send S witch is tur ned fr om OFF to ON, a specifi ed word contai ns a par ticular v a lue, a spec ifie d bit tu r ns from O FF t o ON, the CP U Unit 's operat ing mode chang [...]

  • Страница 28

    4 Common Pr otocol Settings Section 1-4 1-4 Common Protocol Settings 1-4-1 SMTP The SMTP ser ver settin gs must be made in order to use the Mail S end Fun c- ti on or Mail Recei v e Func tion. Mail R eceive Fu nct ion SMTP Requ ired SMTP SECTION 3 Recei ve Ma il Function POP Requi red PO P DNS When sp ecifying the SMTP server an d POP server b y ho[...]

  • Страница 29

    5 Common Pr otocol Settings Section 1-4 Note The “PO P before SMTP” is a n authen tication function r equire d when sen ding mail (u sing t he SMTP ser ver). Nor ma lly , ac count na me and p assword authen- tication is perfor med w ith the PO P se r v er because there is n't an au thentica- tion p rocess i n the S MTP ser ver . Most ISPs [...]

  • Страница 30

    6 Common Pr otocol Settings Section 1-4 1-4-3 DNS The DNS ser ver's sett ings must be e ntered wh en the PO P3 ser ver , SMTP ser ver , and SNTP ser ver are sp ecified w ith hos t names. Item Contents Default Server spe cification type Select whe ther the POP3 s er ver us ed f or receivi ng mail is to be s pecified b y IP address or the host&a[...]

  • Страница 31

    7 Common Pr otocol Settings Section 1-4 The DNS ser ver manage s the IP address es and host nam es of the nodes tha t communica te in th e networ k. The Ether net U nit automat ically acquire s each ser ver's IP addres s from the DNS ser ver and uses those ac quired IP address es. Item Contents Default IP Address Set the IP address f or the DN[...]

  • Страница 32

    8 Common Pr otocol Settings Section 1-4[...]

  • Страница 33

    9 SECTION 2 Mail Send Function This section pro v ides an o vervie w and describes ho w to use the Ethernet Unit’ s Mail Send Fu nction, including applicati on examples and troubleshooting inf ormation. 2-1 Mail Send Function Overvie w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2-1-1 Introduction. . . . . . . . . .[...]

  • Страница 34

    10 Mail Send Function Ov erv iew Section 2-1 2-1 Mail Send Funct ion Over view 2-1-1 Intr o duction The Mail Sen d Functi on send s an e-ma il from the Ethe rnet Unit to a sp ecifi ed e-mail address when a predeter mi ned cond ition o ccurs in the PL C . Data in t he CPU Unit's I/O memor y areas ( or any file in the Memor y Card) can be sent a[...]

  • Страница 35

    11 Mail Send F unction Details Section 2-2 ■ Attached Files An I/O m emor y data file crea ted automati cally by the Ether n et Unit (a spec i- fied range of the CPU Uni t's I/O memor y data co n ver ted to a .IOM, .TX T , or .CSV file ) or any file in fil e memor y (in the CPU Uni t's Memor y Card) can be sent a s an attac hed file. ?[...]

  • Страница 36

    12 Mail Send F unction Details Section 2-2 2-2-1 Contents of E-mail Bod y Date and time Ethernet Unit's e-mail address Destination e-mail address Title (depends on trigger condition) Content-Type (fixed) Trigger number (required) Trigger information (required) Ethernet Unit model (required) Unit version (required) Ethernet Unit IP address (req[...]

  • Страница 37

    13 Mail Send F unction Details Section 2-2 2-2-2 Contents of E-mail Body Ethernet Unit 's Status Information Header The following header i nforma tion is i ncluded. • Subject: OMRON Ethernet Unit Mail Service (Indicates trigger condition. See note.) • Content-Type: text/plain;charset=US-ASCII • Content-Transfer-Encoding:7bit Note The fol[...]

  • Страница 38

    14 Mail Send F unction Details Section 2-2 Note Another sentence wil l be attached indicating how the spe cified word's value has ch anged: “Cha nnel da ta has chang ed from XX to XX. ” Ethernet Unit Information The Eth er net Unit inform ation is alwa ys include d in the e-mail . • Model • V ersion • IP address (deci mal notati on) [...]

  • Страница 39

    15 Mail Send F unction Details Section 2-2 ■ Erro r Log Information The error l og informat ion inc ludes al l of the data store d in the E ther net Un it's error log . The erro r log can contai n up to 64 r ecords. For details on th e error log, refer to 8-3 Er ror Log in the Operatio n Manual Co nstr uctio n of N etwor ks (W420). ■ Statu[...]

  • Страница 40

    16 Mail Send F unction Details Section 2-2 • Si nce the Ethe r net Unit c reates the data file autom atica lly , the Accessin g Memor y/S endin g Mai l Flag ( bit 01 of n+ 17 in the all ocated C PU Bu s Uni t Area) wil l be ON wh ile th e CPU Unit's I/O memo r y is being ac cessed . • T o mainta in the inte grity of the data, wr ite-pro te[...]

  • Страница 41

    17 Mail Send F unction Spec ifications Section 2-3 2-3 Mail Send Funct ion Sp ecifications 2-3-1 Function Specifications Item Specific ations Desti nation e-mail addre ss Up to 2 addresses can be regis tered in t he Unit Setu p (CPU Bus Unit System Setup) and the addre sses can b e up to 50 charac ters long. Subject Fix ed te xt (Depends on the tri[...]

  • Страница 42

    18 Using th e Mail Send Func tion Section 2-4 2-3-2 Detail s of the A v ailabl e Mail T riggers 2-4 Using the Mail Send F unction 2-4-1 Pr ocedure Note The Et her net Un it will be r estar t ed when the settin gs data is trans f erred to th e CPU Bus Un it Syste m Setup Area, s o that the new settings are r ead an d Classification T rigger type Use[...]

  • Страница 43

    19 Using th e Mail Send Func tion Section 2-4 become e ff ecti ve. V er ify that it is safe for the Ether ne t Unit to restar t before transferring th e settings d ata. 2-4-2 Settings Requir ed for the Mail Send Functio n The f oll owing Unit setting s must be made when using the Mai l Send Function . CX- Pr ogrammer Unit Setup Ta b Setting Setting[...]

  • Страница 44

    20 Using th e Mail Send Func tion Section 2-4 Note (1) Mak e POP se ttin gs when t he Use POP before SMTP O ptio n was selec t- ed in the SMTP Ta b . (2) M ak e DNS set tings when t he Ser ver specifi cation t ype i s set to Host name in th e SMTP or POP Ta b . Send Mail (Send mail conditi ons 1 to 8) T rigger typ e One type mu st be sel ected. •[...]

  • Страница 45

    21 Using th e Mail Send Functi on Section 2-4 2-4-3 Mail Ad dress Set up to 2 desti nation mail add resses. 2-4-4 Send Mail Set the following sett ings for send ma il condi tions 1 to 8. When a se nd mail cond ition or multip le conditi ons are met, the correspon ding e-mail (s) will be sent au tomatic ally . Item Contents Default Mail ad dress 1 S[...]

  • Страница 46

    22 Using th e Mail Send Func tion Section 2-4 Send Mail Condit ion Settings Mail Address Specif ication (Required) Data Sent b y Mail (When Required) ■ Data Se nt in E-mail Body Select wh ether th e user-se t ASCII infor mation , Ether net Unit's er ror lo g, and/ or Ether ne t Unit's s tatus infor matio n will be sent in the e-ma il bo[...]

  • Страница 47

    23 Using th e Mail Send Func tion Section 2-4 ■ Attached File Name Send Mail T rigger T ype Setting (Required) Specifi es the typ e send mail cond ition that will be us ed by the Ether net Un it to automa tically send e- mail. When the Mail Send Funct ion is not be ing use d, dis able the s end mail upo n trig ger sett ing. Note The same tr igg e[...]

  • Страница 48

    24 Mail Send F unction Status Section 2-5 Note The Area and Address s etting ranges are a s follows: CIO Area: 0 to 6143 ; Work Area: W 000 to W5 11; Hold ing A rea: H000 t o H511; Auxiliar y Area: A 000 to A4 47; Timer PV s: T0 000 to T4095 ; Counter PVs: C000 0 to C409 5; DM Area : D00000 t o D32767; EM Area : 0 to 32767 i n each bank Interval Ti[...]

  • Страница 49

    25 Mail Send F unction Status Section 2-5 ■ Send Mail Statu s 2 The transmi ssion status of each send conditio n is indicate d by the conte nt of the co rrespondi ng 3 b its in S end Mail Status 1 or S end Mail Status 2, as sh own in t he foll owi n g t abl e. 0: OFF , 1: ON While m ail is bein g sent, the status of the three bit s for the send c[...]

  • Страница 50

    26 I/O Memory Data F ormats Section 2-6 ■ Accessin g Memory /Sendin g Mail Flag (Bit 01 of n+1 7) When a data file ( IOM, TXT , or CS V) is be ing atta ched to the e-mai l, the Ether ne t Unit will access the CPU U nit's I/O m emor y and a utomati cally c reate the data file when the e-mail is being sent. T he Acces sing Memor y/Sending Mail[...]

  • Страница 51

    27 Attac hed F ile T ransfer T imes Section 2-7 Note The TXT file f or ma t is compatible with the CPU Unit's READ D A T A FILE and WRITE DA T A FILE instr uct ions (F READ and F WRIT) set to tab- delim ited word format w ith a c arria ge ret ur n ev er y 10 words. CSV Format When hexadecimal I/O memor y data (1234, 5678 , 9ABC, etc.) is being[...]

  • Страница 52

    28 Mail Send Fun ction Errors Section 2-8 ■ Access T imes for CS1 and CJ1 CP U Units ■ Access T imes for CS1-H and CJ1- H CPU Units Note (1) The a ccess times for file data indicate Memor y Card acc ess time s. (2) T he acces s times i n the table above are standard ti mes when th e PLC Setup's “ Fixed P er iphera l Ser vic ing Time” s[...]

  • Страница 53

    29 Mail Send Fun ction Errors Section 2-8 2-8-2 T r oubleshooting Mai l Send Error s with LED Indicators Note F or mor e details on the erro r log, ref er t o 8-3 Erro r Log in th e Operation Man- ual Const ruc tion of Networks ( W420). 2-8-3 Error Log Err or C odes for the Mail Send Function When an error occurs while the Ether ne t Unit is operat[...]

  • Страница 54

    30 Example Application Section 2-9 Note F or mor e details on the erro r log, ref er t o 8-3 Erro r Log in th e Operation Man- ual Const ruc tion of Networks ( W420). 2-9 Example Application 2-9-1 Step 1. Create the I/ O T able Mount the Et her net Unit in the CPU Rack or Expansion Rack, connect onl ine with the CX -Programmer or Programmin g Cons [...]

  • Страница 55

    31 Example Application Section 2-9 2. Desti nation Mail Ad dress Setup 3. Send Condition Setting 1 Contents of E-mail Body • Inclu ding User- set Data i n E-mail B ody • Inc ludi ng Erro r Log Infor matio n in E-m ail B ody • Inc ludi ng Statu s Informa tion in E-ma il Body Attached File Information Ex ample: Sending th e 10 words of da ta fr[...]

  • Страница 56

    32 Example Application Section 2-9 Exampl e: Send e- mail when W300 bit 00 g oes from OFF to O N. • Se nd when an Event is Recor ded in the Ether ne t Unit's Er ror Log • Se nd when there is a Change i n the CP U Unit's St atus • Se nd E-mai ls per iodic ally at Fixed Inter vals Exampl e: Send an e-mail every 10 minutes. 2-9-3 Step [...]

  • Страница 57

    33 SECTION 3 Receive Mail Function This section des cribes ho w to use the Ethernet Unit’ s Mail Recei ve Function, inclu ding specifications, status d etails, I/O memory data formats, file transfer timing, application examples, and troubleshooting informatio n. 3-1 Mail Recei ve Function Ov erview . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Страница 58

    34 Mail Rec eive Functio n Overview Section 3-1 3-1 Mail Receive Function Over view 3-1-1 Intr o duction The mai l rece ive function p erforms the following func tions u sing e- mails sent to the Ethe r net U nit. 1,2,3. .. 1. The user can enter a command in the e- mail and send that e- mail to the Ether ne t Unit. 2. A command writte n in the e-m [...]

  • Страница 59

    35 Mail Rec eive Functio n Overview Section 3-1 ■ Remote Mail Commands Enter the re mote comm and (for e xample, FileRe ad) in ASCI I in the e-mail subjec t line. ■ Command P arameters Enter the p arameters (for e xampl e, P ara1 :Overwrite=O K) in ASC II in the e- mail bod y . ■ Attached File Dat a With rem ote wr ite com mands, a singl e fi[...]

  • Страница 60

    36 Mail Rec eive Fun cti on Sp ecif ica tion s Section 3-2 3-2 Mail Receive Function Specificatio ns 3-2-1 Function Specifications Received E- mail File me mory opera- tions P erf orming file op erations on a Memor y Card in the CPU Unit or EM fil e memory A file ca n be attac hed to read / write data in a ny file i n EM file memory or a Memory Car[...]

  • Страница 61

    37 Mail Rec eive Fun cti on Sp ecif ica tion s Section 3-2 Response E-mail Attached file Data f or mat • IOM Write command: Writes an I/O m emor y data fi le (IOM, TXT , or CSV) to the CPU Uni t. • File W ri te comm and : Any t ype of fil e (a file with a ny fil ename e xtension) can b e written to EM fi le memo r y or a Memor y Card mounted in[...]

  • Страница 62

    38 Using the Mai l Receiv e Function Section 3-3 3-3 Using the Mail Re ceive Function 3-3-1 Pr ocedure Note The Et her net Un it will be r estar t ed when the settin gs data is trans f erred to th e CPU Bus Un it Syste m Setup Area, s o that the new settings are r ead an d become e ff ecti ve. V er ify that it is safe for the Ether ne t Unit to res[...]

  • Страница 63

    39 Using the Mai l Receiv e Function Section 3-3 3-3-2 Settings Required f or the Mail Receive Function The following Unit setti ngs must b e made when u sing the Mail Rec eive Func- tion. Note Make DNS settin gs when t he Ser ver spec ificatio n type is s et to Host na me in the SM TP or POP Ta b . CX-Pr ogrammer Unit Setup T ab Setting Setti ng r[...]

  • Страница 64

    40 Using the Mai l Receiv e Function Section 3-3 3-3-3 Receive Mai l T ab The CPU Bus Unit setting s f or the mai l receive function c an be set in the CX- Programmer's CPU Bus Unit Setup Win dow . P osting Ma il Address Pr otection Setting Item Contents Defau lt Protect us ing mail address Select t his option whe n yo u do not wa nt to receiv[...]

  • Страница 65

    41 Using the Mai l Receiv e Function Section 3-3 Rece ive A ttac hed File Settin g Receive Command Setting Item Content s Default Rece ive file with specif ied e xtensi on only Select t his option whe n yo u do not wa nt to receiv e attached files other t han the sp ecified file ty pes (filen ame e xtensio ns). Multi ple e xten- sions c an be selec[...]

  • Страница 66

    42 Remote Mail Com mand Details Section 3-4 3-4 Remote Mail Com mand Details 3-4-1 Format Command Format Response Format MailLo gClear Select w hen you wan t to e xec ute the Mail Log Clear com mand. Selected T est Select when y ou want to ex ecute the Mail T est comm and . Selected FinsSend Select when y ou wan t to e xec ute the FINS Comm and Sen[...]

  • Страница 67

    43 Remote Mail Com mand Details Section 3-4 FileWrite (File W rite) Function Writes the attac hed file to the CPU Unit's EM file me mor y or a Memor y Card mounted i n the CPU Uni t. Command Format Response Format Subject: FileW rite Notation De scr iption Om issi on Body: Para1: Destination folder name Example ) Specify ing subd irectory OMRO[...]

  • Страница 68

    44 Remote Mail Com mand Details Section 3-4 FileRead (File Read) Function Reads any file from the CPU Uni t's EM file me mor y or a Mem or y Card mounted i n the CPU Uni t and retu r ns the file as an at tachme nt. Command Format Response Format Subject: FileR ead Not atio n Desc ript ion Omissio n Body: Para1: Source folder name Example ) Spe[...]

  • Страница 69

    45 Remote Mail Com mand Details Section 3-4 FileDelete (File Dele te) Function Deletes the sp ecified file fro m the CPU Unit's EM file memor y or a Memory Card mounted in the CPU Unit. Command Format Response Format Subject: FileD elete Not atio n Desc ript ion Omissio n Body: Para1: Folder name Example ) Specify ing subd irectory OMRON in th[...]

  • Страница 70

    46 Remote Mail Com mand Details Section 3-4 FileList (File List Read) Function Retur ns a list of the fil es cont ained in t he spe cified folder in the CP U Unit's EM file memor y or a Mem or y Card mounted in the CPU Unit. Command Format Response Format Details Subject: FileL ist Not atio n Desc ript ion Omissio n Body: Para1: Source folder [...]

  • Страница 71

    47 Remote Mail Com mand Details Section 3-4 UMBackup (User Memory Backup) Function Back s up (sav es) the CPU Unit's user program in the CPU Unit's EM file memor y o r a Memor y Card mounte d in the CP U Unit. Command Format Details Response Format Subject: UMBac kup Not atio n Desc ript ion Omissio n Body: Para1: Destination folder name [...]

  • Страница 72

    48 Remote Mail Com mand Details Section 3-4 P ARAMBa c kup (Parameter Area Backup) Function Bac ks up (sa ve s) the pa ram eter ar ea data in t he CPU Unit' s EM file memory or a Memor y Card mounted in the CPU Unit. Command Format Response Format Subject: PARAM Backup Not atio n Desc ript ion Omissio n Body: Para1: Destination folder name Exa[...]

  • Страница 73

    49 Remote Mail Com mand Details Section 3-4 IOMWrite (I/O Memory Write) Function Writes the contents of the attach ed file to the spe cified data area in the CPU Unit's I/O me mor y . The data is wr itten in word units. Command Format Subject: IOMWrite Notation Description Omission Body: Para1: File format Example) Specifying a file of comma-d[...]

  • Страница 74

    50 Remote Mail Com mand Details Section 3-4 Response Format Attach ed f ile: Yes Attach an I/O data file (I OM, CSV , or TXT format). Note Up to 6,000 words can be writ ten from the data file. Attach a file with 6,000 or fe wer words of data. Note Only a file with t he IOM, CSV , or TXT can be written to I/O memory . Files with any other file- name[...]

  • Страница 75

    51 Remote Mail Com mand Details Section 3-4 IOMRead (I/O Memory Read) Function Reads the conte nts of the spe cified rang e of words from th e CPU Unit's I/O memor y and retur ns the data in an attach ed file. The data is read in word units. Command Format Subject: IOMRead Notation Description Omission Body: Para1: File format Example) Specify[...]

  • Страница 76

    52 Remote Mail Com mand Details Section 3-4 Response Format Para4: File name Example) Specifying MEMORY .TXT: Para4:MEMORY.TXT Specifies the nam e of the file (including the file- name extension) in which the read data will be stored. Note Only filename e xtensions IOM, CSV , and TXT can be used. Other filename e xten- sions cannot be specified. No[...]

  • Страница 77

    53 Remote Mail Com mand Details Section 3-4 ChangeMode (Operating Mod e Change) Function Changes th e CPU Unit's operating mod e. Command Format Response Format Subject: Chang eMode Not atio n Desc ript ion Omissio n Body: Para1:RUN (or MON or P RG) Example ) Chan gin g to RUN mode : Para1:RUN Change s the CPU Unit's ope rating mode . •[...]

  • Страница 78

    54 Remote Mail Com mand Details Section 3-4 Err orLogRead (Error Log Read) Function Reads the entir e error log fr om the CPU Uni t or a specifie d Spec ial Unit (CP U Bus U nit or Spec ial I/ O Unit ). Command Format Response Format Subject: Error LogRead Not atio n Desc ript ion Omissio n Body: Para1: Unit address Example ) Specify ing a CPU B us[...]

  • Страница 79

    55 Remote Mail Com mand Details Section 3-4 Err orLogClear (Error Log Clear) Function Clears the enti re error log fr om the CPU Uni t or a specifie d Speci al Unit (CP U Bus U nit or Spec ial I/ O Unit ). Command Format Response Format Subject: Error LogClear Not atio n Desc ript ion Omissio n Body: Para1: Unit address Example ) Specify ing a CPU [...]

  • Страница 80

    56 Remote Mail Com mand Details Section 3-4 MailLogRead (Mail Log Read) Function Reads the mail log, which c ontains in f or mati on on mai l received by the Ether- net Unit. (T he mail log c ontain s basic in f or mati on on all of the mail received since p ower was tur ned ON or the ma il log was cleared.) Command Format Response Format Subject: [...]

  • Страница 81

    57 Remote Mail Com mand Details Section 3-4 MailLogClear (Mail Log Clear) Function Clears the mai l log, which c ontains in f or m ation on mai l received by the Ether- net Unit. Command Format Response Format Subject: MailL ogClear Not atio n Desc ript ion Omissio n Body: None --- --- Attached file: None Subject: Re:Ma ilLogClear Resp onse cont en[...]

  • Страница 82

    58 Remote Mail Com mand Details Section 3-4 T est (Ma il T est) Function P erforms an e-ma il send/ rece ive test with the Ether net Unit. When thi s remote mail comm and is ex ecut ed, the Ether net Unit retu rn s a response to the ad dress that se nt the rem ote mail c omman d. Command Format Response Format Subject: Test Not atio n Desc ript ion[...]

  • Страница 83

    59 Remote Mail Com mand Details Section 3-4 FinsSend (FINS Command Send) Function Requests ex ecution o f the s pecified FINS co mmand by the Et her ne t Unit. Command Format Response Format 3-4-2 Response List Subject: FinsS end Not atio n Desc ript ion Omissio n Body: Para1: FINS header Example ) Specify ing DNA=01 , D A1=02, and D A2=00: Para1:0[...]

  • Страница 84

    60 Mail Rece ive Fu nction Status Section 3-5 3-5 Mail Receive Function Status 3-5-1 Accessing Memory/Receivi ng Mail Flag The Ac cessin g Memo r y/Rec eiving M ail Fl ag is loc ated i n CIO Ar ea words allocat ed to the Ether ne t Unit as a CPU Bu s Unit. The lead ing add ress (n) of the allo cated C IO area i s deter m ined by the E ther- net Uni[...]

  • Страница 85

    61 I/O Memory Data F ormats Section 3-6 TXT Format When hexadecimal I/O memo r y data (1234 , 5678, 9AB C , etc.) is being co pied to an at tached fil e in TXT f or mat, the data is conver ted to A SCII in one -word fields or two -word fields. The fiel ds (one- word or two-word) a re delim ited by tabs ([HT]: 09 ) and a retur n an d line feed ([CR][...]

  • Страница 86

    62 Attac hed F ile T ransfer T imes Section 3-7 3-7 Attached File T ransfer Time s When se nding an attach ed file with the Mail Rece ive Function, the ac cess time ca n be as long as 30 or 40 minute s f or a ver y larg e file. The f oll owing tables show how long the CPU Un it's memor y will be a ccessed by the Ether- net Unit ( how long the [...]

  • Страница 87

    63 Mail Receiv e Function Errors Section 3-8 3-8 Mail Receive Function Err ors 3-8-1 Identifying and Correcting Mail Receive Function Error s The following table shows the pr imar y cau ses of e-ma il transmi ssion e rrors and cor respond ing so lution . 3-8-2 T r oubleshooting Mail Receive Error s with LED Indicators Note F or mor e details on the[...]

  • Страница 88

    64 Mail Receiv e Function Errors Section 3-8 3-8-3 Error Log Codes Related to the Mai l Receive Function If an error o ccurs whi le the Ether ne t Unit is operating, the main er ror code, detailed error code, and t ime stamp will be recorde d in th e error l og. The con tents o f the erro r log ca n be read by sending a F INS comm and to th e Ether[...]

  • Страница 89

    65 Example Application Section 3-9 3-9 Example Application 3-9-1 Step 1. Create the I/ O T able Mount the Et her net Unit in the CPU Rack or Expansion Rack, connect onl ine with the CX -Programmer or Programmin g Cons ole, and cre ate the I /O table. 3-9-2 Step 2. Make the Unit Setup Settings fr om the CX-Pr ogrammer With the CX-Pr ogrammer con nec[...]

  • Страница 90

    66 Example Application Section 3-9 3-9-3 Step 3. T ransfer the CPU Bus Uni t Setup Settings Select T ransfer t o PLC fr om the Option s Menu and click the Ye s Button . The settings will be transferred to the CPU Bus Unit Setup Ar ea in the CP U Unit. 3-9-4 Step 4. Send Remote Mail Commands Send e- mails c ontaining remote m ail comm ands t o the E[...]

  • Страница 91

    67 SECTION 4 FTP Server This section describes the f unctions provided by the FTP server . 4-1 Ove rview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4-1-1 Specif ications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 8 4-2 FTP Server Function De[...]

  • Страница 92

    68 Overview Section 4-1 4-1 Over view The Ether net Unit has a built-in FTP (Fi le T rans f er Proto col) ser ver function , so other co mputer s on the Ether net c an read or wr ite (up load/download) large files in the EM fi le memor y by e x ecuti ng FTP co mmands from the F TP cl ient software. Note Only o ne FTP cl ient c an co nnect at th e s[...]

  • Страница 93

    69 FTP Serv er Function Details Section 4-2 4-2 FTP Se rver Fu nction Details 4-2-1 File T ypes The file system in th e CPU Uni t that can be a ccesse d by the Ether net Uni t include s file s in any Memor y Card mounted in the CP U Unit and f iles in the EM file memor y . The dir ector y tree is s hown below . A connec tion w ill be i nitially ma [...]

  • Страница 94

    70 Using the FTP Serv er Function Section 4-3 • If a log in name is not set or co ntains il legal characters, the d efault login name, CONFID ENTIAL, must be use d. No pa ssword is requir ed and any password that is set wil l be igno red. FTP File T ransf er Mode FTP has two fi le transfer modes: ASCI I mode an d binar y mo de. Before star t- ing[...]

  • Страница 95

    71 Using the FTP S erver Fun ction Section 4-3 become e ff e ctive. V er ify that it is safe for the Ether ne t Unit to rest ar t b efore transferring th e settings d ata. 4-3-2 List of Settings Req uired for the FTP Ser ver Function Make the f oll owing setting s for the unit setu p when t he ser ver func tion is u sed. 4-3-3 Setup T a b The CP U [...]

  • Страница 96

    72 FTP Serv er Application Example Section 4-4 4-4 FTP Ser ver Application Exampl e The following proced ure show s how to use t he FTP ser ver by conne ction wit h the default login name, CONFIDE NTIAL. No passw ord is req uired. Note The lo gin n ame an d a p assw ord must be set in th e CPU Bu s Se tup for the Ether ne t Unit in the CPU Unit to [...]

  • Страница 97

    73 Using FTP Commands Section 4-5 4-5 Using FTP Com mands This sec tion des cri bes t he FTP c ommands which the host c omput er (FTP client) can sen d to the Ether net Unit’ s FT P ser ver . T he desc rip tions shoul d also apply to most UNIX wor kstati ons, b ut sli ght differences may arise. Refer to your wor kstation ’ s ope ration m anuals[...]

  • Страница 98

    74 Using FTP Commands Section 4-5 user Format user [ user_name ] Function Specifi es the u ser nam e. Speci fy the FTP log in na me se t in the Ether net Unit system setup. The default FTP lo gin nam e is “CON FIDENT IAL. ” If a non-de f ault logi n name i s used, it must be f oll owed b y the p assw ord. In this case, ente r the FTP password s[...]

  • Страница 99

    75 Using FTP Commands Section 4-5 mkdir Format mkdir DIRECTORY_NAME Function Creates a dire ctor y of the spec ified name at the remote host (Memor y Card or EM Fil e Memo r y). An err or will occ ur if a fi le or di rector y of the sam e name already ex ist s in the worki ng director y . rmdir Format rmdir DIRECTORY_NAME Function Deletes the dir e[...]

  • Страница 100

    76 Using FTP Commands Section 4-5 type Format type data_type Function Specifi es the fil e data type. The following data t ypes are s uppor ted: ascii: Files ar e transferred as A SCII data binar y ( image) : Files ar e transferred as binar y data. All fil es are t reated by the P LC as binar y fi les. Before reading or wr iting any files, always u[...]

  • Страница 101

    77 Using FTP Commands Section 4-5 Any e xis ting file with th e same nam e in th e remote h ost (Mem or y Ca rd or E M File Memo r y) will be overwritte n by the conten ts of th e transferred file. If a n erro r oc curs du ring fi le tr ans fe r , the file being tran sf erred w ill be dele ted and the tra nsmiss ion of tha t file will en d in an er[...]

  • Страница 102

    78 Using FTP Commands Section 4-5 4-5-3 Err or Messages and FTP Status Error Mess ages The error messages r etur ned by the Ethe rn et Unit ar e listed in the f oll owing tabl e. Messag e Mea ning PPP is a d irectory . The path name indic ated at PPP is a directory . PPP is not a directory . The path name ind icated at PPP is not a direct or y . An[...]

  • Страница 103

    79 Checking FTP Status Section 4-6 PPP: P ath na me XXX: IP add ress YY : P or t n umber MM: FINS error code NN: Sock et error code 4-6 Checking FTP Status 4-6-1 FTP Status Flag The curre nt status of the FTP ser ver can be ob tained from the ser vice status in the words al located to the Ether net Unit in the CPU Bus Unit Area in th e CIO Area . T[...]

  • Страница 104

    80 Usin g File Memo ry Section 4-7 4-7 Using File Memo ry The re are t wo m edia th at ca n be us ed to st ore fi les in m emory f or CS/CJ - serie s PLCs: •M e m o r y C a r d s • EM File Memory 4-7-1 File Memory 4-7-2 File T ypes ■ File Names Files are dis tingu ished by assigning fil e names and e xtens ions. The f oll owing characters can[...]

  • Страница 105

    81 Using F ile Memory Section 4-7 File Names Handled by CPU Unit The fil es desc rib ed in the following table can b e rea d or wr itten by the CPU Unit. Note 1. Refer to informat ion on file me mor y in the CS/CJ-ser ies P rogrammable Controll ers Operation Manual (W339). 2. A ll fi les t ransf erre d autom atica lly at startup m ust ha ve t he na[...]

  • Страница 106

    82 Usin g File Memo ry Section 4-7 4-7-3 Initial izing File Memory 4-7-4 I/O Memory Data Format ■ IOM Format The IOM for mat is a data for mat us ed for binar y da ta speci fied by the lad der instr uct ions, READ DA T A FIL E (FREAD (700)) and WRITE DA T A FILE (FWRIT(701)) , in the CPU Unit. If five w ords of data from the I/O memor y (1234 hex[...]

  • Страница 107

    83 Using F ile Memory Section 4-7 ■ CSV Format The CSV form at is a da ta format (using com ma deli miters ) that is spec ified by ladder instr uctions, RE AD D A T A FILE (FREAD (700)) a nd WRITE D A T A FILE (FWRIT(70 1)), in the CP U Unit. The CSV format i s confi gured ac cordin g to the spec ified FREAD(700 ) and FW RIT(70 1) parameters, as [...]

  • Страница 108

    84 Usin g File Memo ry Section 4-7 Note FREAD(700 ) wi ll not be able to r ead the las t byte in a file that ha s been wr itten to the Memor y Card if the fil e contain s an odd number of bytes. Add 00 hexa- decimal to the end of the file if necessa r y to wr ite an e ven number of bytes to the Memor y Card. Note The UM and DM Areas contain b inar [...]

  • Страница 109

    85 FTP F ile T ransfer T ime Section 4-8 4-8 FTP File T ransfer Time File trans f ers using FT P can requir e 30 or 40 m inutes depe nding on the capaci ty of the fil e. Appro xim ate file transf er ti me are provided in the following table for refere nce. All tim es ar e in sec onds u nless o therwise spec ified. ■ CS1 CPU Units/ CJ1 CPU Units ?[...]

  • Страница 110

    86 UNIX Application Exam ple Section 4-9 4-9 UNIX Application Examp le The following proced ure provides an example of FT P operation s from a UNIX works tation. In t his example, the following as sumpt ions are made. • T he IP add ress of the Et her net Un it is r egister ed in /etc /hosts o n the workst ation as [cs1]. • T he default FTP log [...]

  • Страница 111

    87 UNIX Application Exampl e Section 4-9 4. Change to th e MEM CARD direc tor y . 5. Change data type t o binar y . 6. T ransfer the fil e RESUL T .IOM t o the work station . 7. Wri te the f ile PLAN .IOM to the Memor y Card. 8. End FT P . Change to MEMCARD directory . Binary data type set. File read. File written FTP ended.[...]

  • Страница 112

    88 UNIX Application Exam ple Section 4-9[...]

  • Страница 113

    89 SECTION 5 A utomatic Clock Adjustment Function This section provides an ov erview of the automatic clock adjustment functi on, including details on specifications, required settin gs, operations fr om CX-Prog rammer , and tro ubleshooti ng. 5-1 Ove rview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Страница 114

    90 Overview Section 5-1 5-1 Over view 5-1-1 Overvie w The Ether net Uni t can obtain the clock inf or mation from the SNTP ser ver (see note 1) at a par t icular time or when a designa ted bit tur ns O N and then refresh the in ter nal clock informati on of the CPU Unit to which it is mounted (ref erre d to as the loca l CPU Un it). Note (1) T he S[...]

  • Страница 115

    91 Using the A utomatic Cloc k Adjustment Function Section 5-2 5-1-2 Specifi cations 5-2 Using the A utom atic Clock Adjustment Funct ion 5-2-1 Pr ocedure Item S pec ific at ion Protocol SNTP P o r t nu mber 12 3 (U DP) Can also be set fro m the CX-Progr ammer in the Unit Set up. Adjustm ent timin g A utomatic (fix ed time) and manua l (manual only[...]

  • Страница 116

    92 Using the A utomatic Cloc k Adjustment Function Section 5-2 5-2-2 Settings Required f or A uto matic Cloc k Adjustment Function The following settings must be set in the Unit Se tup when us ing the aut omatic clock adjustm ent func tion. Note When the S er ver spec ificatio n type fiel d in Auto Adjust Tim e T ab i s set to Hos t name . CX- Prog[...]

  • Страница 117

    93 Using the A utomatic Cloc k Adjustment Function Section 5-2 5-2-3 A uto Adjust Time The cont ents in the CP U Bus Unit S ystem Set up that ar e set f or using mail send and rece ive functions are shown in the CX-Programmer ’ s Un it Set up . Item Contents Defaul t Get the time infor mat ion f rom the SNTP ser ver Enab le to set the CPU Unit&ap[...]

  • Страница 118

    94 A utomatic Clock Adju stment Switch Section 5-3 5-3 A ut omatic Clock Adjustm ent Switch The Automati c Clock Adjust ment Swi tch is allocat ed in th e CIO Are a as shown below . The first wo rd n of the CIO Area is calcula ted usi ng the follow- ing eq uation. n = CIO 1 500 + (25 × unit numb er) A utomatic Cloc k Adjustment S witch (Bit 04 of [...]

  • Страница 119

    95 A utomatic Clock Adjustme nt Error Processing Section 5-4 Note F or d etails on othe r erro r log informa tion, refer to the Oper ation Man ual, Con- str uctio n of Networ ks: SE CTION 8 T r oubleshooting . 5-4-3 Err or Log Err or Codes for the A utomatic Cloc k Adjustment Function When an error occurs while the Ether ne t Unit is operati ng, th[...]

  • Страница 120

    96 A utomatic Clock Adjustme nt Error Processing Section 5-4 Note (1) For details on other error log informati on, refer to the Operatio n Manual, Constru ction of Ne tworks : SECTION 8 T roublesh ooting . (2) An error will oc cur in the f ollo wing CPU Unit s when t he au tomati c cloc k adjustme nt functio n is ex ecuted under the condi tions sho[...]

  • Страница 121

    97 SECTION 6 Sock et S ervi ces This section describes th e functionality provided by the Ethernet Unit via the so cket services. 6-1 Overvie w of Socket Communications from Ethern et Units . . . . . . . . . . . . . . 99 6-1-1 What are Sock ets? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6-1-2 Socket Port Numb [...]

  • Страница 122

    98 6-8 Using Sock et Services with CMND(490) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 6-8-1 Using Sock et Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 6-8-2 Socket Services an d Socket Status . . . . . . . . . . . . . . . . . . . . . . . . . . 137 6-8-3 Basic FINS Command F ormat . . . . . .[...]

  • Страница 123

    99 Overview of Soc k et Communications from Ethernet Uni ts Section 6-1 6-1 Overv iew of Soc ke t Communications from Ethernet Unit s 6-1-1 What are Soc kets? Sockets are interfaces that allow TC P and UD P protoc ols to be u sed di rectly from the u ser program. W ith person al co mputers, socket are provided as C language i nterface librar ies, w[...]

  • Страница 124

    100 Protocol Ov erview Section 6-2 6-2 Pr otocol Over view 6-2-1 Diff erences between TCP and U DP There ar e differences in the sock et ser vices between TCP and UDP . ■ TCP Communication s The following proc edure i s followed each tim e data is trans mitted to ens ure that the dat a arr ives nor mally at the remote no de: 1,2,3. .. 1. The remo[...]

  • Страница 125

    101 Protocol Overview Section 6-2 ■ P assiv e OPEN and Ac tive OPEN An open comm and is ex ec uted for a node to establish a connectio n. The ope n method d iffers dependi ng on wh ether the node is a client or s er ver . A passive open method i s used to open the node as a s er ver and the active open method is used to open the node as a clie nt[...]

  • Страница 126

    102 Protocol Ov erview Section 6-2 6-2-3 Fragmentation of Send Data The Ether n et Unit fragmen ts data for TCP tran smissi on into uni ts of 1,02 4 bytes and dat a for UDP transmissio n into units of 1,472 b ytes. TC P requ ires one rec eption r equest to recei ve each unit of da ta. UDP , howev er , r estores th e ori ginal dat a before pass ing [...]

  • Страница 127

    103 Overview Section 6-3 3. Data A and Data B a re sent conse cutively . 4. When t he receivi ng user p rogram sends a r equest to receive 1,984 bytes of data, Da ta A a nd Data B are l inked to resto re the or igi nal data, which is passed to the user program. As shown ab ov e, th e UDP protoc ol handles data commu nication s as datagrams, so t ha[...]

  • Страница 128

    104 Overview Section 6-3 The two meth ods of using the socket serv ices a re as follows: • Ded icated Contr ol Bits (Socket Ser vice Re quest S witch es) Requests can be made to a s ock et s er vice by s etting pa rameters an d then mere ly mani pulating s pecific Socket Ser vice Re quest Sw itches. • CMND(490) Requests can be made to a sock et[...]

  • Страница 129

    105 Overview Section 6-3 reception, data is rec eived to the s end/rec eive data add resses set in the parameter ar ea. 6-3-3 Using Soc ket Services with CMND(490) Ser vic e request comman ds can be sent to the Ethe r net Unit by ex ec uting the CMND(490) instr uctio n in th e ladder diagram. CS/CJ Ether ne t Units su ppor t the same fun ctionali t[...]

  • Страница 130

    106 Sock et Serv ice Fu nctio n Guid e Section 6-4 6-3-5 Diff erences with Pre vious Models Compared with t he socket ser vice function s of previous models (CS1W- ETN01/11 and CJ1 W - ETN11 Et her net Uni ts), the Nu mber of Bytes Recei ved at the T CP Socket that s tores the size of received data accumula ted in the reception buffer and a related[...]

  • Страница 131

    107 Using Soc k et Service Fu nctions Section 6-5 6-5 Using Socket Service Function s 6-5-1 Pr ocedure 6-5-2 Settings Required f or Soc ket Service Function The following settings must be made in the Unit Setup when using so ck et ser- vice s. 1. Mak e the basic settings . Ref er to SECTION 2 Startup Proce dure in the Operation Manual Const r ucti [...]

  • Страница 132

    108 Using Sock et Service Functions Section 6-5 6-5-3 Setup T a b The CPU B us Unit S yste m Setup, which is set when us ing socket ser v ices, is shown in t he CX-Programm er's Unit Se tup Window . . ■ Setup Item Details Default v alue Broadcas t Set the metho d f or specifyi ng IP address when broadcasting with FINS/UDP . • All 1 (4.3BS [...]

  • Страница 133

    109 Using Soc k et Service Fu nctions Section 6-5 IP Rou ter T able Set when the Ethe r net Unit will commun i- cate with nodes in oth er IP netw ork seg- ments v ia an IP ro uter . None TCP/IP k eep-aliv e Set the live ness chec king interval (k eep- aliv e). When using FI NS/TCP or TCP/IP soc ket se rv ices , if the re mote node (server or client[...]

  • Страница 134

    110 Sock et Serv ice S tatu s Section 6-6 6-6 Socket Service Status 6-6-1 CIO Area Allocations The following CIO Area wo rds are a lloca ted in th e CPU B us Unit Area in the CIO Area star ting at word n+ 1. The value of n can be calcula ted from the unit num ber as f ollow s: Begin ning word n = CIO 150 0 + ( 25 x unit number) ■ UDP/TCP Socket S[...]

  • Страница 135

    111 Socket Service Stat us Section 6-6 6-6-2 DM Area All ocations The following DM Area words are al located in the CPU Bus Unit A rea in the DM Area. The begi nning word m is cal culated by the f ollowin g equation . Beginni ng word m = D30000 + (100 x unit number ) ■ Number of Bytes Rece ived at T CP Socket (Ether net Unit t o CPU Unit) The num[...]

  • Страница 136

    112 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 Up to 4, 096 bytes of da ta are stored in the recepti on buff er , but the value stored i s within the range ( maximum: 1,9 84 bytes) that ca n be set by manipu- lati ng th e cont rol bi ts or sendin g the receiv e requ est in the CM ND(490 ) instr u ction . 0000 hexade[...]

  • Страница 137

    113 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Section 6-7 2. T ur n ON the Socket Serv ice Reque st Switche s i n the CPU Bus Un it Area in th e CIO Ar ea. 3. When a send or r eceive reques t is made, the data wi ll be au tomatic ally sent or re ceived accordin g to the sen d/recei v e da ta address in the So c ket Ser vic e P[...]

  • Страница 138

    114 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 Check TCP Connection/UDP Open Flag. The specified UDP sock et is already open. T ur n ON UDP Open Request Switch. Star t UDP Open. OFF? Program Flo w Is Bit 15 (Open Flag) in the sock et status word f or the sock et being used OFF? (Checks to see if the soc ket is open [...]

  • Страница 139

    115 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 6-7-3 Soc ket Service Pa rameter s The Socket Ser vice Parameter Areas in which pa rameters are set to req uest socket ser vices are in the CPU B us Un it Area in th e DM Are a of the C PU Uni t. The So ck et Ser vice Parameter Ar eas are alloca ted as shown i n the f [...]

  • Страница 140

    116 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 P arameter Settings The following table shows the pa rameters that a re requi red for each se r vic e and the us e of the parameter s by the socket ser vice. UDP Socket Serv ices Note W: Wr itten by user R W: Wr itten by user at ex e cution an d then r ead for results a[...]

  • Страница 141

    117 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 R: Rea d by user for results at co mpletion ---: Not used. 6-7-4 P arameter s ■ Socket Opt ion F or the TCP OP EN REQUES T (ACTIVE or P ASSIV E) com mand, spec ifies whether o r not the keep- alive function is to be used. Whe n the keep-al ive function is used , bit [...]

  • Страница 142

    118 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 If the R emote IP A ddress is set to 0, a conne ction can be m ade to a ny remot e node and the remot e IP address of the node that is connected wil l be stored as the R emote I P Add ress in the So ck et Ser vice P arame ter Area. If a s pecific remote I/O addres s is [...]

  • Страница 143

    119 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 6-7-5 Soc ket Service Request Switches Dedicated contr ol bits c an be man ipula ted to reque st socket ser v ices. Thes e bits are called S ocket Serv ice Reque st Swi tches, and a re tur ned ON in the CPU Unit to request sock et ser vic es thro ugh the Eth er net Uni[...]

  • Страница 144

    120 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 As shown in the ab ov e table, the R equest S witches are tur ne d OFF by the Ether ne t Unit when t he req uested pr ocesse s has be en com pleted. Note There is a lso a Socket F orce-cl ose Switc h in bit 2 of the firs t word alloca ted to the Ether net Unit in th e C[...]

  • Страница 145

    121 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 UDP Socket Send Request UDP Socket Close Re quest 1103 The b it number i n the Send/ Receiv e Data Ad dress is not 00. 110C Request Switch turned ON during oth er processin g. 220F Speci fied soc ket is al ready proces sing a re ceive request. 2210 The s pecified sock [...]

  • Страница 146

    122 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 TCP So cket P assiv e Open Re quest Note The se resp onse cod es will be returned only on large , mu ltile vel netw or ks. TCP Socket Ac tive Open Request Response code Meaning 0000 Normal end 0105 Loca l IP addres s setting erro r . 0302 CPU Un it error; cannot e xecut[...]

  • Страница 147

    123 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 Note The se resp onse cod es will be returned only on large , mu ltile vel netw or ks. TCP Socket Re ceive Re quest 000D Remote IP address p arameter error (EA CCES). 003E Internal b uffe r cannot be o btained d ue to high rec eption tr affic (ENOBUFS). 0042 (See note [...]

  • Страница 148

    124 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 Note The se resp onse cod es will be returned only on large , mu ltile vel netw or ks. TCP Socke t Send Request Note The se resp onse cod es will be returned only on large , mu ltile vel netw or ks. 004F (See note .) ICMP data receiv ed (EHO STDO WN). 0051 (See note .) [...]

  • Страница 149

    125 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Section 6-7 TCP Socket Clos e Reque st 6-7-7 Timing Charts The timin g of flags for sock et ser vic es (Open ing, Receiv ing, Se nding, or Clo s- ing Fla g) when the R eques t Switches ar e used and the cha nges in th e respons e code a re sh own in the following ch ar t. Closing d[...]

  • Страница 150

    126 Using Sock et Service s by Mani pulating Dedicated Control Bi ts Section 6-7 Close Request Switch The proce ssing res ults ar e stored as the re sponse c ode when th e Close Request Swi tch is use d. There will alwa ys be one PL C cycle ti me between tur ning O FF the Request S witch for the ca nceled p rocess and tur ning of the Close Req uest[...]

  • Страница 151

    127 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Section 6-7 Note The Open Fl ag will not tur n O N at all if a f orc e-close requ est is made durin g open proc essing . 6-7-8 TCP/IP Comm unications Pr ogramming Example The f oll owing programming example il lustrates transf err ing 100 bytes of data between an E ther net Unit an[...]

  • Страница 152

    128 Using Sock et Service s by Mani pulating Dedicated Control Bi ts Section 6-7 Program Memor y Map The send an d receive data and b its (flags ) used by the pro gram are shown i n the following diagram. DM Area CIO Area Send data, 100 bytes (100 = 0064 He x) Receive data, 100 b ytes (100 = 0064 Hex) 7 6 54321 0 CIO 0000 CIO 0001 15 to 8 CIO 0002 [...]

  • Страница 153

    129 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 Pr ogramming Example When the TCP Closing Flag (CIO 000201) turns ON, the follo wing parameter is written to the parameter area f or sock et number 1. D30018: 0001 He x = UDP/TCP socket No . 1 TCP Close When the TCP Close Bit (CIO 000001) turns ON, the TCP Close Error [...]

  • Страница 154

    130 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 TCP Receive If the Send Request Switch (CIO 151903) turns OFF while the TCP Sending Flag (CIO 000202) is OFF , the contents of the response code (D30027) in the Sock et Ser vice P a- rameter Area is check ed, and if it is not 0000 Hex (normal end), the TCP Send Error Fl[...]

  • Страница 155

    131 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Section 6-7 Note When usin g the above programming e xample, chan ge the bit and word address es as necessa r y to av oid using the sa me areas used by other par t s of the user pr ogram or the CPU Bus Un it. 6-7-9 UDP/IP Comm u nicati ons Progra mming Example The f oll owing progr[...]

  • Страница 156

    132 Using Sock et Service s by Mani pulating Dedicated Control Bi ts Section 6-7 Basic Oper ations • CIO 000000 is tur ned ON to req uest ope ning a UDP so ck et from the Ether ne t Unit. • CIO 00000 1 is tur ned O N to requ est closi ng the UDP sock et fro m the Ether ne t Unit. • CIO 00000 2 is tur ned ON to req uest sen ding d ata from th [...]

  • Страница 157

    133 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 Pr ogramming Example If the Close Request Switch (CIO 151905) turns OFF while the UDP Opening Flag (CIO 000201) is OFF , the contents of the response code (D30027) in the Sock et Service Parameter Area is chec ked, and if it is not 0000 Hex (normal end), the UDP Close [...]

  • Страница 158

    134 Using Sock et Service s by Mani pulating Dedicated Control Bits Section 6-7 UDP Receive When the UDP Receive Bit (CIO 000003) turns ON, the UDP Receive Error Flag (CIO 000103) is turned OFF and the UDP Receiving Flag (CIO 000203) is turned ON to initialize processing. If the Send Request Switch (CIO 151903) turns OFF while the UDP Sending Flag [...]

  • Страница 159

    135 Using Sock et Services by Mani pulating Dedicated Contr ol Bits Sect ion 6-7 Note When usin g the above programming e xample, chan ge the bit and word address es as necessa r y to av oid using the sa me areas used by other par ts of the user pr ogram or the CPU Bus Un it. MO V(21) 000003 000203 MO V(21) MO V(21) MO V(21) SET 000003 RSET 000203 [...]

  • Страница 160

    136 Using Sock et Service s with CMND(490) Section 6-8 6-8 Using Socket Services with CMND(490) 6-8-1 Using Soc ket Service Each Ether n et Unit has eight TCP sockets and eig ht UD P sockets. Open, close, send, and recei v e pro cesses are av aila ble f o r communic ations wit h sockets. Open Enables communi cations on a specif ied socket. A socket[...]

  • Страница 161

    137 Using Sock et Services with CMND(490) Section 6-8 4. When th e process has bee n complet ed, the r esult is stored i n the resu lts storage a rea d efined i n the socket ser vic e reques t co mmand and th e sock- et st atus wi ll indi cate c omple tion of proces sing. 6-8-2 Soc ket Services and Soc ket Status When usi ng socket ser vices, it is[...]

  • Страница 162

    138 Using Sock et Service s with CMND(490) Section 6-8 6-8-3 Basic FINS Command Format The basi c f or m at for FI NS comm ands used f or so ck et ser vices is shown in th e f oll owing diagram. Command Code: Specifi es the process code r equested from the socket. Socket Opt ion F or the TCP OP EN REQUES T (ACTIVE or P ASSIV E) com mand, spec ifies[...]

  • Страница 163

    139 Using Sock et Services with CMND(490) Section 6-8 Note If there is more than one Communic ations Uni t mounted to th e PLC, the FINS network addres s must be s et as a param eter for CMND(490) and a loca l net- work ta ble must be created in the ro uting tables from the CX -Programmer . 6-8-4 Response Codes in the Command Respo nse A resp onse [...]

  • Страница 164

    140 Using Sock et Service s with CMND(490) Section 6-8 ■ CLOSE REQUEST ■ SEND REQUEST ■ RECEIVE REQUEST CLOSE REQUEST command received Error end CLOSE REQUEST command received Normal end Close complete (normal end) 1 0 1 0 1 0 Normal response code Running Running CMND(490) response code Close Flag Closing Flag Results storage area P or t Enab[...]

  • Страница 165

    141 Using Sock et Services with CMND(490) Section 6-8 ■ CLOSE REQUEST during RECEIVE REQUEST Note The tim ing shown in the above diagram occ urs if a CLOSE REQUEST c om- mand is ex ecuted duri ng SEND REQUEST co mmand ex ecution . The timin g shown in the diagram also applie s if a CL OSE REQUE ST com mand is ex e- cuted dur ing OPEN REQUEST c om[...]

  • Страница 166

    142 Using Sock et Service s with CMND(490) Section 6-8 Data Flow The data wi ll flow between the C PU Unit, E ther net Un it, and hos t compu ter as shown in t he follo wing diagram. Note Here, “e xecution bits” refer to CIO 000000 to CIO 000 003, which are used in the ladder di agram to control ex ecution of co mmunica tions an d are not sys- [...]

  • Страница 167

    143 Using Sock et Services with CMND(490) Section 6-8 Pr ogram Memory Maps The se nd an d receive data and b its (flags ) used by the pro gram are shown i n the follo wing di agrams. The f oll owing e xam ple shows how the memo r y maps are str uctu red. Legend DM Area 0012H 0004H 0001H 012 D0000 CMND(490) control data 00 7 6543210 CIO 0000 15 to 8[...]

  • Страница 168

    144 Using Sock et Service s with CMND(490) Section 6-8 Number bytes to receiv e: 4 bytes 000CH 0004H 0001H 0110H 0000H 0032H 0123456789 D00030 CMND(490) control data for TCP RECEIVE REQUEST Number of bytes receiv ed specified in command data. Number of TCP RECEIVE REQUEST command data bytes: 12 bytes (000C he x ) 2710H 0001H 8203H FC00H 1000H 0000H[...]

  • Страница 169

    145 Using Sock et Services with CMND(490) Section 6-8 2713H 0001H 820BH C200H 0123456789 D02000 2714H 0123456789 D01040 D01050 0064H TCP CLOSE REQUEST response Re- sponse code TCP CLOSE REQUEST results storage area TCP SEND REQUEST command data Send data: 100 bytes (0064 hex ) Command code TCP sock et number Results storage area: set to D03010 (0BC[...]

  • Страница 170

    146 Using Sock et Service s with CMND(490) Section 6-8 CIO Area 7 6 54321 0 CIO 0000 CIO 0001 15 to 8 CIO 0002 TCP Send Bit TCP Close Bit TCP Open Bit TCP Receive Error Flag TCP Send Error Flag TCP Close Error Flag TCP Open Error Flag TCP Receiving Flag TCP Sending Flag TCP Closing Flag TCP Opening Flag TCP Receive Bit[...]

  • Страница 171

    147 Using Sock et Services with CMND(490) Section 6-8 Pr ogramming Example If the P or t Enabled Flag (A20200) turns ON and the Clos- ing Flag (CIO 150903) turns OFF while the TCP Closing Flag (CIO 000201) is OFF , checks are made and if any of the follo wing are true, the TCP Close Error Flag (CIO 000101) is turned ON. The Results Storage Error Fl[...]

  • Страница 172

    148 Using Sock et Service s with CMND(490) Section 6-8 Note When usin g the above programming e xample, chan ge the bit and word address es as necessa r y to av oid using the sa me areas used by other par ts of the user pr ogram or the CPU Bus Un it. When the TCP Receiving Flag (CIO 000203) turns ON, the status of the P or t Enabled Flag (A20200) i[...]

  • Страница 173

    149 Using Sock et Services with CMND(490) Section 6-8 6-8-9 UDP/IP Comm u nicati ons Progra mming Example The f oll owing programming example il lustrates transf err ing 100 bytes of data between an Ether ne t Unit and a host compu ter usin g UDP/IP communica tio ns. F or the UDP connecti on, the Eth er net Unit uses a P ASSIVE OPEN and th e host c[...]

  • Страница 174

    150 Using Sock et Service s with CMND(490) Section 6-8 Pr ogram Memory Maps The se nd an d receive data and b its (flags ) used by the pro gram are shown i n the following diagrams. DM Area 000AH 0004H 0001H 0110H 0000H 0032H 0123456789 D00000 Number bytes to receiv e: 4 bytes Remote Ethernet Unit designation Network address: 01 hex Node address: 0[...]

  • Страница 175

    151 Using Sock et Services with CMND(490) Section 6-8 2701H 0123456789 D01010 Re- sponse code Stores the response after command ex ecution. UDP OPEN response 0123456789 D01020 UDP OPEN REQUEST results storage area Re- sponse code 2704H 0001H 8204H 1A00H 0123456789 D01030 UDP CLOSE REQUEST command data Command code UDP sock et number closed: set to [...]

  • Страница 176

    152 Using Sock et Service s with CMND(490) Section 6-8 CIO Area 2702H 0001H 820FH B400H 0123456789 D04000 2703H 0123456789 D03000 D03010 0064H 0000H UDP SEND REQUEST response Re- sponse code Re- sponse code UDP SEND REQUEST results storage area UDP RECEIVE REQUEST command data No . of bytes to receive: 100 bytes (0064 he x ) Timeout value: Not set [...]

  • Страница 177

    153 Using Sock et Services with CMND(490) Section 6-8 Pr ogramming Example If the P or t Enabled Flag (A20200) turns ON and the Clos- ing Flag (CIO 150103) turns OFF while the UDP Closing Flag (CIO 000201) is OFF , checks are made and if any of the follo wing are true, the UDP Close Error Flag (CIO 000101) is turned ON. The Results Storage Error Fl[...]

  • Страница 178

    154 Using Sock et Service s with CMND(490) Section 6-8 Note When usin g the above programming e xample, chan ge the bit and word address es as necessa r y to av oid using the sa me areas used by other par ts of the user pr ogram or the CPU Bus Un it. When the UDP Receiving Flag (CIO 000203) turns ON, the status of the P or t Enabled Flag (A20200) i[...]

  • Страница 179

    155 Precautions in Using Sock et Services Section 6-9 6-9 Precautions in Using So c ket Services 6-9-1 UDP and TCP Socket Servic es • If a shor t response mo nitor time is sp ecifi ed in CMND( 490) co ntrol dat a and the Ethe r net Unit is operating u nder a high load, a res ult may be stored ev en if th e resp onse code i ndicates a time- out. I[...]

  • Страница 180

    156 Precautions in Using Sock et Services Section 6-9 • Data can remain in a buff er at the local node if the remote TC P sock e t closes dur ing co mmunica tions. Any data r emain ing in the buff e r will b e discarde d when th e TCP socket is closed. T o avoid problems of this nature, steps wil l hav e to be taken in the applicati on program, s[...]

  • Страница 181

    157 Precautions in Using Sock et Services Section 6-9 6-9-5 Maxim u m T ransmission Delays (Ignoring other Netw ork Dela ys) The transmi ssio n delays for sock et s er vice is ca lculated as th e sum of th e communica tions proces sing tim es for both no des. T rans missi on delay = Remo te node sen d proces sing time + Loc al node receive process [...]

  • Страница 182

    158 Precautions in Using Sock et Services Section 6-9 Note 4: Wh en the CPU Unit cy cle time is less than 2 ms, A = 27, and when it is 2 ms or more, A = 53 Note 1. The values obtain ed from the above equations are guid elines for the trans- missio n del a y time when one socket in the Ether n et Unit is u sed onl y . Th e ex ecuti on time r equired[...]

  • Страница 183

    159 SECTION 7 Using FINS Communications to Cre ate Host A pplicati ons This section provides information on communicating on Et hernet Systems and interconnected netwo rks using FINS commands. The information provided in the section deals only with F INS communications in reference to Ethe rnet Units. FINS commands issued from a PLC are sent via th[...]

  • Страница 184

    160 Overview of FINS Comm unicatio ns Section 7-1 7-1 Overview of FINS Communications 7-1-1 Comm un ications On an Ethernet Netw ork Data is sent and received as UDP pack ets or UDP packets on an Ether ne t network . In the FINS com munication s ser vic e, both an IP addr ess f or IP (the Inter ne t lay er ) and a F INS node ad dress for FINS (t he[...]

  • Страница 185

    161 Overview of FINS Comm unicatio ns Section 7-1 7-1-2 Using the FINS/UDP and FINS/TCP Methods It is reco mmende d that FINS/UDP and FINS /TCP be u sed as follows: • Wh en remote devices do not su ppor t the FINS /TCP meth od: Use the FINS/UDP method f or FINS communi cations with tho se dev ic es. • Wh en FINS n odes a re conn ected on th e s[...]

  • Страница 186

    162 FINS F rames Section 7-2 7-2 FINS Frames The FINS c ommunic ation s ser vi ce is ca rrie d out th rough the exchange of FINS comm and fram es and t heir co rrespondi ng res ponse frames. (There are also comma nds with n o respo nses.) Both com mand frames and resp onse frames are com pri sed of a FINS hea der f or stor ing transfer control in f[...]

  • Страница 187

    163 FINS/UDP Method Section 7-3 RSV (Res erv ed by System) Set to 00 ( Hex). GCT (Permissible Number of Gat ewa ys) Set to 02 ( Hex). DNA (Destination Network Address) Specifi es the numb er of the net work whe re the d estina tion n ode is located . The addr ess can b e spec ified in the f oll owing range. 00 (He x): Local networ k 01 to 7F (He x)[...]

  • Страница 188

    164 FINS/UDP Method Section 7-3 The FINS/U DP m ethod has the following features: • Beca use FIN S/UDP i s a co nnecti onless protoc ol, there is no limit to the num ber o f cor recti ons . • F INS/UDP ca n be used f or b roadcasti ng. • Wh en data is sent vi a an IP network with multiple lay ers (such as the Int er net), commun icatio ns rel[...]

  • Страница 189

    165 FINS/UDP Method Section 7-3 The UDP por t number for the host ap plic ation (e.g., per sonal c omput er) fun c- tions differently fr om the por ts that can be us ed depe nding on the s etting for the ad dress conv ers ion metho d at t he Eth er net Unit. Ba sica lly , the s ame num- ber can be used for the UDP por t number set in the Ether ne t[...]

  • Страница 190

    166 FINS/UDP Method Section 7-3 It is not neces sar y to set ro uting tables if one Communi catio ns Unit is mounted to the PLC and the n odes a re conne cted as o ne networ k. F or de tails on routin g table, refer to the section on Creating R outing T ables in the Opera- tion Manual , Constr uction of Networ ks: Sec tion 6 FI NS Communic ations .[...]

  • Страница 191

    167 FINS/UDP Method Section 7-3 UDP por t number : FINS UDP por t number (E ther net Un it of relay node) FINS add resses (R emote nod e CPU Unit) : Network addres s: 2 Node addr ess: 1 Unit number : 0 FINS add resses ( Host com puter): Network addres s: 1 Node addr ess: 50 Unit number : 0 FINS/UDP Sample Pr ogram Operati on Overview • This progr[...]

  • Страница 192

    168 FINS/UDP Method Section 7-3 Sample Program 1 #include <errno.h> 2 #include <stdio.h> 3 #include <sys/types.h> 4 #include <sys/socket.h> 5 #include <netinet/in.h> 6 #include <signal.h> 7 8 #define FINS_UD P_POR T 9600 9 # def ine SERV_IP_ ADDR " 196.36.32.100" /* Ethernet Unit IP ADDRESS*/ 10 #define[...]

  • Страница 193

    169 FINS/UDP Method Section 7-3 32 /* 33 bzero((char *) & s_addr,sizeof(ws_addr)); 34 ws_addr.sin_family = AF_IN ET; 35 ws_add r.si n_ad dr.s _add r = hto nl(I NADDR_ANY); 36 ws_addr.sin_port = htons(0); /* GET AVAILABLE PORT FOR LOCAL UDP PORT */ 37 if (bind(sockfd,(struct sockaddr *)&ws_addr,sizeof(ws_addr)) < 0) 38 err_exit("can&[...]

  • Страница 194

    170 FINS/UDP Method Section 7-3 85 /* RECEIVE FINS RESPONSE*/ 86 addrlen = sizeof(cs_addr); 87 88 if ((recvlen = recvfrom(sockfd,fins_resp,MA X_MSG,0,& cs_addr,&addrlen)) < 0) 89 { 90 if (errno == EINT R) 91 got o CMND_SEND; /* 92 err_exit("receive error"); 93 } 94 else 95 { 96 alarm(0); /* 97 printf("recv length %d¥n&quo[...]

  • Страница 195

    171 FINS/TCP Method Section 7-4 7-4 FINS/TCP Method 7-4-1 Overvie w FINS/TCP Features The FIN S/TCP method is a FINS com munication s method th at use s the TCP/ IP protocol . TCP/IP is a conn ectio n-type c ommunicati ons pro tocol. Be f ore a message is se nt from one n ode to an other , it is nec essar y to esta b lis h a vir- tual circ uit, i.e[...]

  • Страница 196

    172 FINS/TCP Method Section 7-4 • O nce a FINS/T CP connec tion (conn ection number , r emote IP ad dress) has been set in the Unit Set up , it can be dyn amica lly chang ed from the ladder program using a FINS command (i.e., FINS/TCP CONNECTIO N REMO TE NODE CHANGE REQUEST). FINS/TCP Frame Format The following diagram shows the str uctu re of a [...]

  • Страница 197

    173 FINS/TCP Method Section 7-4 FINS/TCP Connection Status (W or d n+23) While a c onnectio n with a re mote nod e is established, the bit cor respond ing to the FINS/TCP connecti on status tur ns ON in the sectio n of the CPU Bu s Unit words allo cated in the CI O Area. T he bit tur n s OFF if the connecti on is ter m i- nated by an error in commu[...]

  • Страница 198

    174 FINS/TCP Method Section 7-4 • If there is no respon se from the clie nt when t he keep-a live functio n is i n effect. • If a command ot her than FINS FRAME SEND or CONNECTION CON- FIRMA TION i s received fr om the s er ver , th e connec tion w ill close af ter th e FINS FRAME SEND ERROR NO TIFICA TION command is sent. Even if the c onnecti[...]

  • Страница 199

    175 FINS/TCP Method Section 7-4 ■ Setting Range for A utomatic All ocation of FINS Node Addresses The range of node addr esses that can be used as automatical ly allocate d FINS node ad dresse s is set in the Ether net Unit ’ s Unit Setup. Nor mally (default status), nod e address es 239 to 254 ar e allocat ed to each of the con- nections 1 to [...]

  • Страница 200

    176 FINS/TCP Method Section 7-4 Even if the keep-alive func tion is n ot speci fied at t he Ethe rn et Unit, a re- sponse is se nt for checks sent from o ther n odes. If the power is tur ned OFF to the host appl ication (e.g., pers onal compute r) while a conn ection is established, the connec tion is no lon ger require d, but will remain open unti[...]

  • Страница 201

    177 FINS/TCP Method Section 7-4 • Wh en routi ng tables are used for one or m ore other nodes o n the s ame network . It is not necessa r y to set ro uting tables if one Communi catio ns Unit is mounted to the PLC and the nodes ar e connec ted as on e networ k. F or det ails on setti ng rout ing ta bles, ref er to the section on cr eating r outin[...]

  • Страница 202

    178 FINS/TCP Method Section 7-4 When aut omat ically al loca ted FINS node address es a re set, the cli ent node address auto maticall y al located a t the s er ver is st ored in the c lient nod e address field. After a c onnectio n has b een established as a FINS/T CP client o r ser v e r , d o not send this command again. O therw ise, the er ror [...]

  • Страница 203

    179 FINS/TCP Method Section 7-4 The deta ils o f the ab ov e frame ar e shown in the following table. FINS FRAME SEND ERROR NO TIFICA TION Command If an error occ urs in the FIN S/TCP hea der of the FINS F RAME SE ND com- mand, this command is us ed so that an error c ode wil l be retu rn ed to the nod e that sent the FINS F RAME S END comma nd by [...]

  • Страница 204

    180 FINS/TCP Method Section 7-4 After t he co mmand is se nt, i f ACK is re tur ned i n the TCP l ay er by the remote node, the connecti on that is established is maintained . If RST is retur ned in the TCP l ay er by the remote node, the es tablished co nnection is closed . If the FINS N ODE ADD RESS DA T A SEND (CLIENT T O SER VER) or FINS NODE A[...]

  • Страница 205

    181 FINS/TCP Method Section 7-4 1,2,3. .. 1. After the TCP con nectio n is esta blished, the c lient node addre ss is s ent by the cl ient to the serv er usin g the F INS NODE ADDRE SS D A T A SEND (CL I- ENT T O SERVER) com mand. 2. The clien t’ s FINS node address ( client nod e addres s) is obtai ned from th e received comma nd. 3. The ser v e[...]

  • Страница 206

    182 FINS/TCP Method Section 7-4 Connection Sequenc e for A utomatic Allocation of FINS Node Addresse s 1,2,3. .. 1. The client speci fies th e client no de addr ess as 00 000000 h e xad ecimal i n the ser v er as the autom atical ly alloc ated FINS node a ddress, and sends i t using the FINS NODE ADDRESS D A T A SEND (CL IENT T O SER VER) comm and.[...]

  • Страница 207

    183 FINS/TCP Method Section 7-4 Recovery Conn ection Sequen ce when H ost Computer (WS) is Stopp ed by a n E r ro r 1,2,3. .. In steps 1 to 4 the FINS messa ge send and r eceive processin g is performe d using th e FINS F RAME SEND comm and. 5. This example assu mes that the hos t compu ter’ s power is unexpectedly in- terrup ted. T he nor mal c [...]

  • Страница 208

    184 FINS/TCP Method Section 7-4 F r om step 12 onwards, the con nection i s established a gain. Note When FINS node add resses ar e automa tically al located, th e node add ress canno t be spe cified, so th e connec tion remains o pen un til i t is c losed by th e keep-alive function. 7-4-3 Sending Commands fr om a Host Computer When sen ding F INS[...]

  • Страница 209

    185 FINS/TCP Method Section 7-4 ■ Example 2: Host Comput er and Remot e Node Conn ected Via Relay Node (Ethernet Uni t) Destinati on IP Add ress: 196 .36.32.1 00 (Ethe rn et Unit of relay node) UDP por t number : FINS UDP por t number (E ther net Un it of relay node) FINS add resses (R emote nod e CPU Unit) : Network addres s: 2 Node addr ess: 1 [...]

  • Страница 210

    186 FINS/TCP Method Section 7-4 Sample Program /* Ethernet Unit IP ADDRESS*/ COMMUNICATIONS SAMPLE PROGRAM GENERATE TCP SOCKET*/ 1 #include <errno.h> 2 #include <stdio.h> 3 #include <sys/types.h> 4 #include <sys/socket.h> 5 #include <netinet/in.h> 6 #include <signal.h> 7 8 #define FINS_TCP_P ORT 9600 9 #def ine S[...]

  • Страница 211

    187 FINS/TCP Method Section 7-4 33 34 /* 35 bzero((char *) &ws_addr,sizeof(ws_addr)); 36 ws_addr.sin_family = A F_INET; 37 ws_a ddr. sin_a ddr. s_ad dr = hto nl(INADDR_ ANY); 38 ws_addr.sin_port = htons(0); /* 39 40 if (bind(sockfd,(struct sockaddr *)&ws_addr,sizeof(w s_addr)) < 0) 41 err_exit(“can’t bind local address”); 42 43 /* [...]

  • Страница 212

    188 FINS/TCP Method Section 7-4 86 else 87 { 88 err_exit("FINS/TCP header send error"); 89 } 90 91 /*RECEIVE FINS/TCP COMMAND (READ RECEIVE FUNCTIONS)*/ 92 recvlen = 24; 93 if (tcp_recv(sockfd, fins_tcp_header, recvlen) == recvlen) 94 { 95 alarm(0); /*STOP RESPONSE MONITOR TIMER*/ 96 97 /* CONFIRM WHETHER FINS NODE NUMBER SEND COMMAND (CL[...]

  • Страница 213

    189 FINS/TCP Method Section 7-4 139 alarm(RESP _TIMEOU T); /* 140 printf("FINS /TCP header send length %d¥n" ,sendlen); 141 } 142 else { 143 err_exit("FINS /TCP header send error"); 144 } 145 146 147 /* SEND FINS COMMAND FRAME*/ 148 /* 149 * 150 * (READ 150 WORDS FROM DM 100 ) 151 */ 152 fins_cmnd[0] = 0x80; /* ICF */ 153 fins_[...]

  • Страница 214

    190 FINS/TCP Method Section 7-4 192 } 193 194 printf("FINS/TCP header receive length %d¥n",recvlen); 195 recvlen = fins_tcp_header[6]; 196 recvlen <<=8; 197 recvlen += fins_tcp_header[7]; 198 recvlen -= 8; /* SUBTRACT LENGTH OF COMMAND & ERROR CODE OF FINS/TCP HEADER*/ 199 printf("FINS/TCP frame receive length %d¥n",[...]

  • Страница 215

    191 FINS/TCP Method Section 7-4 245 int total_len = 0; 246 int recv_len; 247 248 for (;;) 249 { 250 recv_len = recv(sockfd, (char *)buf, len, 0); 251 252 if (recv_len > 0) 253 { 254 if (recv_len < (int)len) 255 { 256 len -= recv_len; 257 buf += recv_len; 258 total_len += recv_len; 259 } 260 else 261 { 262 total_len += recv_len; 263 break; 264[...]

  • Страница 216

    192 Maximum T ransmission Delay s: Writing/Readin g to CPU Unit Sect ion 7-5 7-5 Maxim um T ransmission Dela ys: Writin g/Reading to CPU Unit The tim e for the response to be r eceived after a rem ote nod e on th e Ether ne t network send s a mem or y area read or write comm and to a PLC ca n be ca lcu- lated using the f oll owing formu la. Write C[...]

  • Страница 217

    193 Maximum T ransmission Delay s: Writing/Readin g to CPU Unit Sect ion 7-5 F or detai ls, refer to the CPU Uni t operation m anual. T ransmission P rocessing (Response) 0.704 ms Note The ac tual operating environme nt can c ause t ransmissio n delays larg er than those c alculated with th e meth ods given he re. Among the caus es of l onger delay[...]

  • Страница 218

    194 Maximum T ransmission Delay s: Writing/Readin g to CPU Unit Sect ion 7-5 F or detai ls, refer to the CPU Uni t operation m anual. CPU Bus Unit Serv ice Pr ocessing Time The proces sing time wi ll be as f oll ows, depending on the CP U processin g mode sett ings at th e CPU Unit. F or detai ls, refer to the CPU Uni t operation m anual. T ransmis[...]

  • Страница 219

    195 Appendix A Etherne t Netw ork P arameter s P ar ame ter Value Desc rip tion TCP se nd buff er 4,096 b ytes Maximum cap acity of the TCP send b uffer TCP rec eive b uffer 4,096 b ytes Maxim um capac ity of the TCP re ceiv e b uffer UDP send b u ff er 9,000 b y tes Maximum capacity of the UDP send buff er UDP r ecei ve buff er 9, 01 6 bytes Max i[...]

  • Страница 220

    196 Ethernet Netw ork P arameters Appendix A[...]

  • Страница 221

    197 Appendix B Buffer Configuration Network memor y (248K bytes) Communications controller IP pack et output queue (50 max. × 1,500 bytes) UDP sock et send request buff ers (8 × 9,000 max.) TCP sock et send request buff ers (8 × 4,096 max.) FTP service send buff er (4,096 bytes) FINS send buff er (9,000 bytes max.) FINS reception buff er (16,383[...]

  • Страница 222

    198 Buf fer Configur ation Appendix B Netw ork Memo ry Most of the buffers used for communicatio ns se r vicin g by the Ethe rn et Unit a re ad minister ed in a buffer config- uration call ed net work m emor y . Network memor y consis ts of 1 96K bytes of memor y divided into sho r t a nd lon g buff ers. The use of s hor t and long buffers is deter[...]

  • Страница 223

    199 Appendix C TCP Status T ransitions The TCP so cket status can be confi r med us ing the sock et st atus data r etur ned for the FINS c omman d SOCKET ST A T US READ (2 764). Status Mean ing CLOSE D C onne cti on clos ed. LISTEN W aiting f or connectio n. SYN SENT SYN sent in activ e status. SYN RECEIVED SYN receive d and sent. EST ABLISHED Alre[...]

  • Страница 224

    200 TCP Status T ransitions Appendix C[...]

  • Страница 225

    201 Appendix D ASCII Characters Bits 1 to 4 Bits 5 t o 7 Binary 0000 0001 001 0 0011 010 0 0101 0110 0111 H e x 012 34567 0000 0 NUL DLE Space 0 @ P p 0001 1 SOH DC1 ! 1 A Q a q 0010 2 STX D C2 ” 2 B R b r 0011 3 ETX D C3 # 3 C S c s 0100 4 E O T D C 4 $4 D T dt 0101 5 ENQ NAK % 5 E U e u 0110 6 ACK SY N & 6 F V f v 0111 7 BEL ET B ’ 7 G W [...]

  • Страница 226

    202 ASCII Ch aracters Appendix D[...]

  • Страница 227

    203 Appendi x E Maintenance The Ethe rn et Unit ma kes up par t of a n etwor k. Repa ir a defective Ether net Unit a s soon as possible as it ca n hav e a negati ve eff e ct on the entire net work. We recomm end that cu stomer s keep one or m ore spare E ther net Units to a llow immedia te recovery of t he networ k. Replacing an Ethernet Uni t Obse[...]

  • Страница 228

    204 Main tena nce Appendix E[...]

  • Страница 229

    205 Appendi x F Inspections Carr y ou t regular inspecti ons to ensure t he Ether net U nit is funct ioning pe rfectly . Items Most of the pa r ts th at make up an Ethe rn et Uni t are s emicond uctor com ponents. N one of the p ar ts i n the Unit will wear out after a specif ic li fetime , but so me par ts may deter iorate due t o extreme ope rati[...]

  • Страница 230

    206 Inspections Appendix F[...]

  • Страница 231

    207 Index Numerics 100Base -TX transmission delays , 193 10Base-T transmission delays , 193 A Accessing Memory/Rec eiving Mail Flag , 60 Accessing Memory/S ending Mail Flag , 25 Account Name field , 6 , 19 , 39 Adjust Ti me field , 92 , 93 applica tions examples mail se nd functi on , 30 using UNIX , 86 precaut ions , xxiv ASCII characters , 201 At[...]

  • Страница 232

    208 Index D delete co mmand , 68 , 73 , 77 dir comman d , 68 , 73 , 74 DNS co mmun icati ons , 3 DNS server , 31 auto mati c clock adjus tment errors , 94 DNS Tab , 6 , 19 , 39 , 92 initial setting s , 31 E EC Directive s , xxvi electromag netic fields , xxiv EM File Memory , 80 using , 80 E-mail attached files , 16 , 17 , 35 receiving , 41 body , [...]

  • Страница 233

    Index 209 FileWrite c ommand , 2 , 36 command /re sponse fo rmat , 43 FileWrite fi eld , 41 FINS commun ications , 2 , 4 address c onversion , 161 application layers , 160 command s CONNECTION CONFIRMATION , 179 FINS FRAM E SEN D , 178 FINS FRAME SEND ERROR NOTIFICATI ON , 179 FINS NODE ADDRESS DATA SEND (CLIENT TO SERV ER) , 17 7 FINS NODE ADDRESS[...]

  • Страница 234

    210 Index I I/O memory data , 15 CSV format , 61 IOM format , 60 TXT format , 61 I/O tables creating , 30 ICF , 162 inspectio ns , 205 installation location , xxiv Interval time field , 20 , 24 IO memory data field , 20 , 22 IOM field , 41 IOM format , 15 , 26 IOMRe ad comma nd , 2 , 35 command /re sponse fo rmat , 51 IOMRead field , 41 IOMWrite co[...]

  • Страница 235

    Index 211 send timing , 11 send ing metho d (encod ing) , 17 settings , 19 DNS Tab , 19 Mail Address Tab , 19 POP T ab , 19 SMTP Ta b , 19 SMTP setti ngs , 4 status , 17 , 24 Send Mai l St atu s 1 , 24 Send Mai l St atu s 2 , 25 status information , 15 subject , 17 triggers , 13 , 17 , 18 , 23 user-set information , 14 Mail Sen d Switch , 25 MailLo[...]

  • Страница 236

    212 Index TCP/IP , 4 UDP/IP , 4 put comma nd , 68 , 73 , 76 , 85 pwd comm and , 68 , 73 , 75 Q quit co mmand , 68 , 73 , 77 R radioactiv ity , xxiv READ DATA FILE (FREAD) instruction , 26 , 60 Receive file with specified extension only field , 39 , 41 Receive Ma il Tab , 39 , 40 Receive Request Switch , 11 9 Receive specified c ommands only field ,[...]

  • Страница 237

    Index 213 port num bers , 99 TCP status , 199 TCP sock ets , 184 numbe r , 117 status , 199 UDP socket numbe r , 117 UDP sockets , 166 Software switch field , 23 specifications FTP serve r , 68 mail recei ve function , 36 mail s end func tion , 17 SRES , 139 static electri city , xxiv precaut ions , xxv STD field , 41 switches Socket Servi ce Reque[...]

  • Страница 238

    214 Index[...]

  • Страница 239

    215 Revision History A manual r e visi on code a ppear s as a suffi x to th e catalog number on th e fron t cov er of the manual. The following table outlines the changes mad e to the manual dur ing ea ch revision. Page numbers ref er to the previous version. Revi sion code Date Re vised content 1 Ju ly 2003 Original producti on 02 March 2004 The f[...]

  • Страница 240

    216 Revision Histor y[...]

  • Страница 241

    OMRON Corporat ion Cont rol D evice s Di visi on H .Q . Shiok oji Horikaw a, Shimog yo-k u, K yoto , 600-8530 J apan T el: (81)7 5-344-7109/F ax: (81)75 -344-7149 Regional Hea dquarters OMRON EUR OPE B.V . W egalaan 6 7-69, NL-213 2 JD Hoofddo r p The Ne therlands T el: (31)2 356-81-300/F ax: (31) 2356-81-388 OMRON ELECTR O NICS LLC 1 East Comm erc[...]

  • Страница 242

    Authorized Distributor: Cat. No. W421-E1-03 Note: Specificat ions subject to change without notice Printed in Japan This manual is printed on 100% recy cled paper.[...]