Manuel d'utilisation / d'entretien du produit CS CJ1W-ETN21 du fabricant Omron
Aller à la page of 242
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.
CS1W-ETN21 (100Base-TX) CJ1W-ETN21 (100Base-TX) Ethernet Units Construction of Applications Operation Manual Revised Novembe r 2005.
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.
vi.
vii TABLE OF CONTENTS PRECAUTION S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi 1 Intended Aud ience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii 2 General Precautions .
viii TABLE OF CONTENTS SECTION 4 FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4-1 Ove rview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix TABLE OF CONTENTS Appendices A Ethernet Network Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 B Buf fer Conf iguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x TABLE OF CONTENTS.
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 .
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 .
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 .
xiv.
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.
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.
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.
xviii.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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 .
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.
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 .
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.
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.
8 Common Pr otocol Settings Section 1-4.
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 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 .
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.
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.
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.
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 .
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).
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 .
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.
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 t.
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 .
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 .
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 .
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.
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.
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 .
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.
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.
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.
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.
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).
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).
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 Inf.
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.
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.
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.
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 .
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 erati.
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.
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.
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 .
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 .
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).
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 .
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.
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.
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.
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.
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.
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.
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 .
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 .
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.
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.
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 .
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 ).
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 ).
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.
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.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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 . . . . . . . .
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.
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 .
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.
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.
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.
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.
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.
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 .
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.
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.
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 .
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 .
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.
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).
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.
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.
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.
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.
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].
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 .
88 UNIX Application Exam ple Section 4-9.
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 .
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).
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.
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 .
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 .
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.
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 .
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 .
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? . . .
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 .
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.
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.
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 .
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.
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.
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.
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.
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 ne.
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 .
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 .
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).
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.
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 .
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 .
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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).
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.
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.
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.
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 .
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.
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 .
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 conte.
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.
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.
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 .
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.
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.
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.
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.
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.
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 .
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 c.
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 .
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.
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.
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.
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 result.
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 Cl.
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.
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.
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.
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.
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.
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 .
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.
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.
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.
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.
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.
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 .
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.
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 .
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.
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.
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.
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 .
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.
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 .
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 : .
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.
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.
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 (e.
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.
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).
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.
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.
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.
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.
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.
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.
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 F.
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 .
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.
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.
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.
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.
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 .
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.
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.
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(sock.
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".
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.
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 &l.
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.
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.
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.
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 capa.
196 Ethernet Netw ork P arameters Appendix A.
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.
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.
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.
200 TCP Status T ransitions Appendix C.
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 .
202 ASCII Ch aracters Appendix D.
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.
204 Main tena nce Appendix E.
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.
206 Inspections Appendix F.
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.
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 .
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 CONFIRM.
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 mem.
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 , 2.
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.
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 r.
214 Index.
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.
216 Revision Histor y.
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.
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.
Un point important après l'achat de l'appareil (ou même avant l'achat) est de lire le manuel d'utilisation. Nous devons le faire pour quelques raisons simples:
Si vous n'avez pas encore acheté Omron CS CJ1W-ETN21 c'est un bon moment pour vous familiariser avec les données de base sur le produit. Consulter d'abord les pages initiales du manuel d'utilisation, que vous trouverez ci-dessus. Vous devriez y trouver les données techniques les plus importants du Omron CS CJ1W-ETN21 - de cette manière, vous pouvez vérifier si l'équipement répond à vos besoins. Explorant les pages suivantes du manuel d'utilisation Omron CS CJ1W-ETN21, vous apprendrez toutes les caractéristiques du produit et des informations sur son fonctionnement. Les informations sur le Omron CS CJ1W-ETN21 va certainement vous aider à prendre une décision concernant l'achat.
Dans une situation où vous avez déjà le Omron CS CJ1W-ETN21, mais vous avez pas encore lu le manuel d'utilisation, vous devez le faire pour les raisons décrites ci-dessus,. Vous saurez alors si vous avez correctement utilisé les fonctions disponibles, et si vous avez commis des erreurs qui peuvent réduire la durée de vie du Omron CS CJ1W-ETN21.
Cependant, l'un des rôles les plus importants pour l'utilisateur joués par les manuels d'utilisateur est d'aider à résoudre les problèmes concernant le Omron CS CJ1W-ETN21. Presque toujours, vous y trouverez Troubleshooting, soit les pannes et les défaillances les plus fréquentes de l'apparei Omron CS CJ1W-ETN21 ainsi que les instructions sur la façon de les résoudre. Même si vous ne parvenez pas à résoudre le problème, le manuel d‘utilisation va vous montrer le chemin d'une nouvelle procédure – le contact avec le centre de service à la clientèle ou le service le plus proche.