Delta AX Series Instruction Manual
Hide thumbs Also See for AX Series:

Advertisement

Quick Links

Industrial Automation Headquarters
Delta Electronics, Inc.
Taoyuan Technology Center
No.18, Xinglong Rd., Taoyuan District,
Taoyuan City 33068, Taiwan
TEL: 886-3-362-6301 / FAX: 886-3-371-6301
Asia
Delta Electronics (Shanghai) Co., Ltd.
No.182 Minyu Rd., Pudong Shanghai, P.R.C.
Post code : 201209
TEL: 86-21-6872-3988 / FAX: 86-21-6872-3996
Customer Service: 400-820-9595
Delta Electronics (Japan), Inc.
Tokyo Office
Industrial Automation Sales Department
2-1-14 Shibadaimon, Minato-ku
Tokyo, Japan 105-0012
TEL: 81-3-5733-1155 / FAX: 81-3-5733-1255
Delta Electronics (Korea), Inc.
Seoul Office
1511, 219, Gasan Digital 1-Ro., Geumcheon-gu,
Seoul, 08501 South Korea
TEL: 82-2-515-5305 / FAX: 82-2-515-5302
Delta Energy Systems (Singapore) Pte Ltd.
4 Kaki Bukit Avenue 1, #05-04, Singapore 417939
TEL: 65-6747-5155 / FAX: 65-6744-9228
Delta Electronics (India) Pvt. Ltd.
Plot No.43, Sector 35, HSIIDC Gurgaon,
PIN 122001, Haryana, India
TEL: 91-124-4874900 / FAX : 91-124-4874945
Delta Electronics (Thailand) PCL.
909 Soi 9, Moo 4, Bangpoo Industrial Estate (E.P.Z),
Pattana 1 Rd., T.Phraksa, A.Muang,
Samutprakarn 10280, Thailand
TEL: 66-2709-2800 / FAX : 662-709-2827
Delta Electronics (Australia) Pty Ltd.
Unit 20-21/45 Normanby Rd., Notting Hill Vic 3168, Australia
TEL: 61-3-9543-3720
Americas
Delta Electronics (Americas) Ltd.
Raleigh Office
P.O. Box 12173, 5101 Davis Drive,
Research Triangle Park, NC 27709, U.S.A.
TEL: 1-919-767-3813 / FAX: 1-919-767-3969
Delta Electronics Brazil
São Paulo Sales Office
Rua Itapeva, 26 - 3°, andar Edificio Itapeva,
One - Bela Vista 01332-000 - São Paulo - SP - Brazil
TEL: 55-12-3932-2300 / FAX: 55-12-3932-237
Delta Electronics International Mexico S.A. de C.V.
Mexico Office
Gustavo Baz No. 309 Edificio E PB 103
Colonia La Loma, CP 54060
Tlalnepantla, Estado de México
TEL: 52-55-3603-9200
*We reserve the right to change the information in this catalogue without prior notice.
EMEA
Headquarters:
Delta Electronics (Netherlands) B.V.
Sales: Sales.IA.EMEA@deltaww.com
Marketing: Marketing.IA.EMEA@deltaww.com
Technical Support: iatechnicalsupport@deltaww.com
Customer Support: Customer-Support@deltaww.com
Service: Service.IA.emea@deltaww.com
TEL: +31(0)40 800 3900
BENELUX:
Delta Electronics (Netherlands) B.V.
De Witbogt 20, 5652 AG Eindhoven, The Netherlands
Mail: Sales.IA.Benelux@deltaww.com
TEL: +31(0)40 800 3900
DACH:
Delta Electronics (Netherlands) B.V.
Coesterweg 45, D-59494 Soest, Germany
Mail: Sales.IA.DACH@deltaww.com
TEL: +49(0)2921 987 0
France:
Delta Electronics (France) S.A.
ZI du bois Challand 2, 15 rue des Pyrénées,
Lisses, 91090 Evry Cedex, France
Mail: Sales.IA.FR@deltaww.com
TEL: +33(0)1 69 77 82 60
Iberia:
Delta Electronics Solutions (Spain) S.L.U
Ctra. De Villaverde a Vallecas, 265 1º Dcha Ed.
Hormigueras – P.I. de Vallecas 28031 Madrid
TEL: +34(0)91 223 74 20
Carrer Llacuna 166, 08018 Barcelona, Spain
Mail: Sales.IA.Iberia@deltaww.com
Italy:
Delta Electronics (Italy) S.r.l.
Via Meda 2–22060 Novedrate(CO)
Piazza Grazioli 18 00186 Roma Italy
Mail: Sales.IA.Italy@deltaww.com
TEL: +39 039 8900365
Russia:
Delta Energy System LLC
Vereyskaya Plaza II, office 112 Vereyskaya str.
17 121357 Moscow Russia
Mail: Sales.IA.RU@deltaww.com
TEL: +7 495 644 3240
Turkey:
Delta Greentech Elektronik San. Ltd. Sti. (Turkey)
Şerifali Mah. Hendem Cad. Kule Sok. No:16-A
34775 Ümraniye – İstanbul
Mail: Sales.IA.Turkey@deltaww.com
TEL: + 90 216 499 9910
GCC:
Delta Energy Systems AG (Dubai BR)
P.O. Box 185668, Gate 7, 3rd Floor, Hamarain Centre
Dubai, United Arab Emirates
Mail: Sales.IA.MEA@deltaww.com
TEL: +971(0)4 2690148
Egypt + North Africa:
Delta Electronics
Unit 318, 3rd Floor, Trivium Business Complex, North 90 street,
New Cairo, Cairo, Egypt
Mail: Sales.IA.MEA@deltaww.com
AX Series - Standard
Instructions Manual
www.deltaww.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AX Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Delta AX Series

  • Page 1 TEL: +7 495 644 3240 Raleigh Office P.O. Box 12173, 5101 Davis Drive, Turkey: Delta Greentech Elektronik San. Ltd. Sti. (Turkey) Research Triangle Park, NC 27709, U.S.A. Şerifali Mah. Hendem Cad. Kule Sok. No:16-A TEL: 1-919-767-3813 / FAX: 1-919-767-3969 34775 Ümraniye – İstanbul Mail: Sales.IA.Turkey@deltaww.com...
  • Page 2: Table Of Contents

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Table of Contents Preface P1.1 Introduction ....................2 P1.1.1 Applicable Products .................. 2 P1.1.2 Associated Manuals .................. 2 Chapter 1 Move Instructions ..................3 1.1 DFC_NIBMOV ....................4 1.2 DFC_XCH ......................
  • Page 3 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l 4.8 DFB_ResetECATSlave ..................80 4.9 Error Codes and Troubleshooting ............... 86 Chapter 5 Checksum Instructions ................87 5.1 DFC_LRC8 ..................... 88 5.2 FC_LRC16 ...................... 89 5.3 DFC_LRC32 ....................91 5.4 Error Codes and Troubleshooting ...............
  • Page 4 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l 11.2 DFB_LogDump .................... 168 11.2 Error Codes and Troubleshooting ..............170...
  • Page 5 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Pre face Preface...
  • Page 6: P1.1 Introduction

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Pre face P1.1 Introduction Thank you for purchasing our product. The AX series motion controller provides a high-level motion control system based on CODESYS to integrate the control function of PLCs and Motion Control.
  • Page 7: Chapter 1 Move Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 1 Chapter 1 Move Instructions...
  • Page 8: Dfc_Nibmov

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 1 1.1 DFC_NIBMOV DFC_NIBMOV: Data shift. FB/FC Instruction Graphic Expression ST language DFC_NIBMOV( pSrc:= , wSrcStartPos:= , DFC_NIBMOV pDst:= , wDstStartPos:= , wNum:= , ErrorID=>...
  • Page 9 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 1 Function  After executing this Function, the value of variable1 (pSrc) will be copied to variable2 (pDst), while the length of copied data is determined by wNum input. (Unit: Nibble) Example ...
  • Page 10 Nibble3 of variable ar_wVar0(pSrc), are shifted to the address Nibble0 inside the memory of ar_wVar1(pDst). Nibble7 Nibble6 Nibble5 Nibble4 Nibble3 Nibble2 Nibble1 Nibble0 Variable Memory content ar_wVar0 [16#0123,16#4567] Memory content ar_wVar1 [16#FFFF,16#FFFF] Memory content (after executing FC) ar_wVar1 [16#FF70,16#FFFF] Supported Products  AX series  Library  DL_Mov.library ...
  • Page 11: Dfc_Xch

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 1 1.2 DFC_XCH DFC_XCH: Data exchange between two variables. FB/FC Instruction Graphic Expression ST language DFC_XCH( pSrc1:= , DFC_XCH pSrc2:= , dwNum:= , ErrorID=>...
  • Page 12: Error Code And Troubleshooting

    Variable Variable 16#1234 16#5678 16#1278 16#5634 Content Content Supported Products  AX series  Library  DL_Mov.library  1.3 Error Code and Troubleshooting Description Reasons for error Troubleshooting Check if the value of wNum is bigger DFC_NIBMOV_ERR_PARAMETER Incorrect value of wNum than 0.
  • Page 13: Chapter 2 Comparison Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 Chapter 2 Comparison Instructions...
  • Page 14: Dfc_Cmp

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 2.1 DFC_CMP DFC_CMP: Comparison between LINT variables. FB/FC Instruction Graphic Expression ST language DFC_CMP( DFC_CMP liSrc1:= , liSrc2:= ) Inputs  Setting Value Name Function Data Type...
  • Page 15: Fc_Ucmp

    Programing Example  This example use FC instruction (DFC_CMP) to do comparison between two variable values. Since variable1 (liVar0) is smaller than variable2 (liVar1), the calculation result (wVar0) would be 2. Supported Products  AX series  Library  DL_Comparison.library ...
  • Page 16 Programming Example This example use FC instruction (DFC_UCMP) to do comparison between two variable values. Since variable1 (uiVar0) is smaller than variable2 (uiVar1), the calculation result (wVar0) would be 2. Supported Products  AX Series  Library  DL_Comparison.library ...
  • Page 17: Dfc_Lrcmp

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 2.3 DFC_LRCMP DFC_LRCMP: Comparison between LREAL variables. FB/FC Instruction Graphic Expression ST language DFC_LRCMP( DFC_LRCMP lrSrc1:= , lrSrc2:= ) Input  Setting Value Name Function Data Type...
  • Page 18: Dfc_Zcp

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 Since variable1 (lrVar0) is smaller than variable2 (lrVar1), the calculation result (wVar0) would be 2. Supported Products  AX Series  Library  DL_Comparison.library ...
  • Page 19 This example use FC instruction (DFC_ ZCP) to compare variable values with the upper and lower value. Since the value in variable (liVar0) is larger than the upper value (H_liVar), the calculation result (wVar0) is Supported Products  AX Series  Library ...
  • Page 20: D Fc_Uzcp

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 2.5 D FC_UZCP DFC_UZCP: Compares a range with a value of ULINT variable. FB/FC Instruction Graphic Expression ST language DFC_UZCP( lwLowbound:= , DFC_UZCP lwHighbound:= , lwSrc:= );...
  • Page 21: Dfc_Lrzcp

    This example use FC instruction (DFC_ UZCP) to compare variable values with the upper and lower value. Since the value in variable (ulVar0) is larger than the upper value (H_ulVar), the calculation result (wVar0) is Supported Products  AX Series  Library ...
  • Page 22 This example use FC instruction (DFC_LRZCP) to compare variable values with the upper and lower value. Since the value in variable (lrVar0) is smaller than the upper value (H_lrVar) and larger than the lower value (L_lrVar), the calculation result (wVar0) is 2. Supported Products  AX Series ...
  • Page 23 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 2 Library  DL_Comparison.library ...
  • Page 24: Chapter 3 Timers And Counters Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Chapter 3 Timers and Counters Instructions...
  • Page 25: Dfb_Capture

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 3.1 DFB_Capture DFB_Capture captures the commanded pulses of the specified high-speed counter according to the designated external trigger device. FB/FC Instruction Graphic Expression ST Language DFB_Capture_instance(...
  • Page 26 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Setting Value Name Function Data Type Timing for Updating (Default value) Capture *Note: DFB_Counter_REF(FB): As the I/O interface of the high-speed counter to perform actions include parameter adjustment and the driver.
  • Page 27 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Outputs Update Timing  Name Timing for shifting to True Timing for shifting to False  When the values at the outputs ...
  • Page 28 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Setting Value Timing for Name Function Data Type (Default value) Updating high- speed capture *Note: DFB_CAPTURE_REF(FB): The I/O function block of the high-speed counter which contains parameter adjustment and the driver.
  • Page 29 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 The mask range is between -500~500 and the 1st Capture occurs at 900.  The 2nd Capture occurs at 2500. Because DeltaMax is set to 1300 and DeltaMin ...
  • Page 30 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Enable the FB DFB_Capture (bEnable=True) after using the FB DFB_HCnt to activate the high- speed counter (bEnable=True) in the POU, then the present counter value would be captured and shown on the diCapValue output of DFB_Capture after the external signal (IN15) being triggered.
  • Page 31: Dfb_Compare

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Library  DL_BuiltInIO_AX3.library  3.2 DFB_Compare DFB_Compare compares the designated source value and the setting value and then to Set or Reset the desired device when the comparison result is True or False.
  • Page 32 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 DFB_COMPARE_MODE: Enumeration (Enum) Output  Output Range(Default Name Function Data Type value) True when the output value is bValid BOOL True/False(False) valid.
  • Page 33 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 In/ Outs  Setting Value Name Function Data Type Timing for Updating (Default value) Reference to the When bEnable shifts DFB_COMPARE_REF Compare source of DFB_COMPARE_REF(FB)*...
  • Page 34 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 As the following figure shows, select a Counter and a Compare for Hardware IO Configuration in BuiltIn_IO and set a signal output on the hardware as the output device of Compare (e.g. OUT3). Execute the function block DFB_Compare after enable the high-speed counter by using DFB_HCnt in the POU as shown in follows.
  • Page 35: Dfb_Hcnt

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Library  DL_BuiltInIO_AX3.library  3.3 DFB_HCnt DFB_HCnt enables the specified high speed counter according to the specified parameters and monitors the count value. FB/F Instruction Graphic Expression...
  • Page 36 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False  When the values at the outputs ...
  • Page 37 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Troubleshooting  If an error occurs during the execution of the instruction, bError will change to True and the Capture will stop.
  • Page 38: Dfb_Htmr

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Supported Products  AX-308E、AX-364E、AX-324N  Library  DL_BuiltInIO_AX3.library  3.4 DFB_HTmr DFB_HTmr enables the specified high speed timer channel according to the specified parameters and monitors and timed value.
  • Page 39 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Up-Up mode: Output  Output Range(Default Name Function Data Type value) True when the output bValid BOOL True/False(False) value is valid. True when bBusy...
  • Page 40 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Timing Diagram  bEnable bValid bBusy bError In/ Outs  Setting Value Name Function Data Type Timing for Updating (Default value) Reference to the source of...
  • Page 41 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 After using the FB DFB_HTmr in the POU to activate the high-speed timer(bEnable=True), it starts receiving and counting the pulses from the external signals(IN 0) based on the timing mode set in Timer Configuration, then the timed value would be displayed in the output dwTimerValue.
  • Page 42: Dfb_Presetvalue

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Cha p ter 3 3.5 DFB_PresetValue DFB_PresetValue is the application function block for high-speed counters, its role is to reset the current count value back to the default value. FB/F Instruction Graphic Expression...
  • Page 43 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Output  Output Range(Default Name Function Data Type value) The default value of the bDone counter has been BOOL True/False(False) changed. True when the instruction bBusy BOOL...
  • Page 44 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Timing Diagram  bExecute bDone bBusy bCommandAbort bError External Trigger TriggerType = 0(EXECUTE_TRIGGER) TriggerType = 1(EXTERNAL_TRIGGER) bCommandAborted = TRUE bError = TRUE In/ Outs ...
  • Page 45 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Programming Example  This example demonstrates the function performed by DFB_HCnt and DFB_PresetValue. As the following figure shows, select a Counter (Counter 2) in Hardware IO Configuration and you will see the input points (e.g.
  • Page 46 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Then the input bExecute of DFB_PresetValue shifts to True and the FB DFB_PresetValue would wait for the Z phase of high-speed counter to trigger the Default value function. After the count value being set to the default (DFB_HCnt.diCounterValue = DFB_PresetValue.diPresetValue), the output bDone will shift from False to True.
  • Page 47: Dfb_Sample

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 3.6 DFB_Sample DFB_Sample is the application function block for high-speed counters, its role is to read the increasing and decreasing number of the count value during the sampling period. FB/F Instruction Graphic Expression...
  • Page 48 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False  When the values at the outputs ...
  • Page 49 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 F unction  DFB_Sample counts incoming pulses during a specified sampling period (wSampleTime). wSampleTime = 4( unit : 1ms ) 時間 ms diSampleValue = 6 diSampleValue = 4 diSampleValue = 2...
  • Page 50 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 As the following figure shows, select a Counter (Counter 2) in Hardware IO Configuration and you will see the input points (e.g. IN 0、IN 1、IN 2) matched to the corresponding encoder A, B, Z phase outputs, which the wiring should follows the configuration so as to perform the normal function of high speed counting After using the FB DFB_HCnt in the POU to activate the high-speed counter(bEnable=True), it...
  • Page 51: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 After enabling DFB_Sample in the POU (bEnable=True), the FB starts counting the increasing number of the pulse count value during each sampling period. Please refer to AX-3 series operational manual for more details related to the settings and operation of Counter Configuration.
  • Page 52 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Description Cause of Error Corrective Action Check if this Capture device The high-speed capture DFB_CAP_CAPTURE_ALREADY_ENABLE is currently being used by device has been activated. another DFB_Capture.
  • Page 53 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Description Cause of Error Corrective Action After make sure Timer in IO The variable type set for Configuration is selected, DFB_HT_INVALID_ the FB input is not input the variable of IEC TIMER_REF...
  • Page 54 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 3 Description Cause of Error Corrective Action manual to troubleshoot the errors. After make sure Counter in IO The variable type set for Configuration is selected, DFB_SP_INVALID_ the FB input is not...
  • Page 55: Chapter 4 Ethercat Network Instructions

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Ch ap te r 4 Chapter 4 EtherCAT Network Instructions...
  • Page 56: Dfb_Ecgetallslaveaddr

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 4.1 DFB_EcGetAllSlaveAddr DFB_EcGetAllSlaveAddr gets all the slave addresses. FB/FC Instruction Graphic Expression DFB_EcGetAllSlaveAddr ST language DFB_EcGetAllSlaveAddr ( bExecute :=, bDone =>, bBusy =>, bError =>, ErrorID =>, AddrArray =>,...
  • Page 57 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 *Note: DFB_ECAT_Diag_ERROR: Enumeration (Enum) Output Updating Timing  Name Timing for shifting to True Timing for shifting to False When bExecute shifts to False. ...
  • Page 58 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Programming Example  The following example demonstrates the behavior of DFB_EcGetAllSlaveAddr. There’re a total of 7 EtherCAT slaves in the category EtherCAT_Master_SoftMotion.
  • Page 59: Dfb_Ecgetslavecount

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 After the input bExecute of DFB_EcGetAllSlaveAddr bExecute shifts to True, the output of AddrArray is shown as below and the output value of uSlaves is 7. Supported Products ...
  • Page 60 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 ST Language DFB_EcGetSlaveCount ( bExecute :=, bDone =>, bBusy =>, bError =>, ErrorID =>, uSlaves =>, Input  Setting Value Name Function Data Type Timing for Updating (Default value)
  • Page 61 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False  When bExecute shifts to False.  If bExecute is False and bDone shifts ...
  • Page 62 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Programming Example  The following example demonstrates the behavior of DFB_EcGetSlaveCount. There’re a total of 7 EtherCAT slaves in the category EtherCAT_Master_SoftMotion. When the input bExecute of DFB_EcGetSlaveCount shifts to True, the output value of uSlaves is 7.
  • Page 63 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Supported Products  AX-308E、AX-364E  Library  DL_EtherCAT_Diag.library ...
  • Page 64: Dfb_Ethercatlink_Diag

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 4.3 DFB_EtherCATLink_Diag DFB_EtherCATLink_Diag is used to display all the EtherCAT slave diagnostics. FB/FC Instruction Graphic Expression DFB_EtherCATLink_Diag ST Language DFB_EtherCATLink_Diag ( bEnable :=, bValid =>, bError =>, ErrorID =>,...
  • Page 65 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 *Note: DFB_ECAT_Diag_ERROR: Enumeration (Enum) StationStatus Structure (STRUCT) Setting Value Name Function Data Type (Default value) Slave station StationAddress UINT address True: Connected and functioning properly. Connection status of Node BOOL...
  • Page 66 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Troubleshooting  If an error occurs during the execution of the instruction, bError will change to True and the Capture will stop. You can refer to ErrorID (Error Code) to address the problem. Programming Example ...
  • Page 67 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 After bEnable of DFB_EtherCATLink_Diag shifts to True, the arrays of StationNode index 1 and 2 show the slave addresses and connection status, while the values of StationAddress, starting from index 3 of StationNode, would be shown as zero.
  • Page 68 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 The Node value of StationNode index 2 would also be displayed as False. Supported Products  AX-308E、AX-364E  Library  DL_EtherCAT_Diag.library ...
  • Page 69: Dfb_Getallecatslaveinfo

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 4.4 DFB_GetAllECATSlaveInfo DFB_GetAllECATSlaveInfo gets all the slaves’ information. FB/FC Instruction Graphic Expression DFB_GetAllECATSlaveInfo ST Language DFB_GetAllECATSlaveInfo ( bExecute :=, bDone =>, bBusy =>, bError =>, ErrorID =>, slaveInfoArray =>,...
  • Page 70 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Output Range Name Function Data Type (Default value) Slave information ECATSlaveInfo slaveInfoArray ECATSlaveInfo array. [1..128] The number of uSlaves UINT 0~128(0) slaves. *Note: DFB_ECAT_Diag_ERROR: Enumeration(Enum) slaveInfoArray: Structure(STRUCT)。...
  • Page 71 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Timing Diagram  bExecute bBusy bDone bError Function  When bExecute shifts to True, slaveInfoArray gives the information of all the EtherCAT slaves in the device tree, which includes vendor id, product code, revision number and serial number.
  • Page 72 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 1. There’re two EtherCAT slave stations in the device tree, both are ASDA_A2. 2. Double-click on the target ASDA_A2 in the device tree to view its slave information.
  • Page 73 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 3. The input bExecute of DFB_GetAllECATSlaveInfo bExecute shifts to True, then the output of slaveInfoArray is shown as below and the output value of uSlaves is 2. Supported Products ...
  • Page 74: Dfb_Getecatmastererror

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 4.5 DFB_GetECATMasterError DFB_GetECATMasterError gets the error code of failed EtherCAT network connection. FB/FC Instruction Graphic Expression DFB_GetECATMasterError ST Language DFB_GetECATMasterError ( bEnable :=, bBusy =>, bError =>, ErrorID =>,...
  • Page 75 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 EtherCA EtherCATErro ETC_LASTERRO error ETC_LASTERROR(NO_ERROR) codes *Note: DFB_ECAT_Diag_ERROR: Enumeration (Enum) ETC_LASTERROR: Enumeration (Enum) Outputs Updating Time  Name Timing for shifting to True Timing for shifting to False When bEnable shifts to False.
  • Page 76 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 1. If the EtherCAT connection is normal without any existing errors., the output content of EtherCATErrorId would be shown as NO_ERROR after the input bEnable of DFB_GetECATMasterError shifts to True.
  • Page 77: Dfb_Getecatmasterstate

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Library  DL_EtherCAT_Diag.library  4.6 DFB_GetECATMasterState DFB_GetECATMasterState gets the connection status of EtherCAT Master. FB/FC Instruction Graphic Expression DFB_GetECATasterState ST Language DFB_GetECATMasterState ( bEnable :=, bBusy =>, bError =>,...
  • Page 78 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Indicates the error DFB_ECAT_Diag_ERROR ErrorID code if an error DFB_ECAT_Diag_ERROR* (DFB_ECAT_Diag_NO_ERROR) occurs. EtherCAT master bStatus communication BOOL True/False(False) status. *Note: DFB_ECAT_Diag_ERROR: Enumeration (Enum) Outputs Updating Timing ...
  • Page 79 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 1. The connection status of EtherCAT master shows PASS in the device tree. 2. When the input bEnable of DFB_GetECATMasterState shifts to True, the output of bStatus is displayed as True.
  • Page 80: Dfb_Resetecatmaster

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Supported Products  AX-308E、AX-364E  Library  DL_EtherCAT_Diag.library 4.7 DFB_ResetECATMaster DFB_ResetECATMaster resets the EtherCAT master, which has errors in connection. FB/FC Instruction Graphic Expression DFB_ResetECATMaster ST Language...
  • Page 81 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Setting Value Name Function Data Type Timing for Updating (Default value) changes to True. Output  Output Range Name Function Data Type (Default value) The execution of bDone...
  • Page 82 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Timing Diagram  bExecute bBusy bDone bError Function  When bExecute shifts to True and the connection status of EtherCAT master shows Fail, the function block would perform reset action.
  • Page 83 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Remove the network connection between the master and the slave, and the current connection status of EtherCAT master would show Fail in the device tree. To restore the network connection between the master and the slave, shift the input bExecute of DFB_ResetECATMaster to True.
  • Page 84: Dfb_Resetecatslave

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 The network connectivity has been recovered after the output bDone shifting to True. Supported Products  AX-308E、AX-364E  Library  DL_EtherCAT_Diag.library  4.8 DFB_ResetECATSlave DFB_ResetECATSlave resets the EtherCAT slave, which has errors in connection.
  • Page 85 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Input  Setting Value Name Function Data Type Timing for Updating (Default value) Execute the instruction when True/False bExecute BOOL bExecute changes to (False) True.
  • Page 86 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Timing Diagram  bExecute bBusy bDone bError Function  When bExecute shifts to True, the function block starts searching for the target slave station and resets the EtherCAT slave, if the status of target slave shows Fail.
  • Page 87 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4...
  • Page 88 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 Remove the network connection of slave 4 and 5, and the current connection status of EtherCAT slave starting from slave 5 would show Fail in the device tree. To restore the network connection of slave 4 and 5, enter 1005 to the input uiSlaveAddr and shift the input bExecute to True.
  • Page 89 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 4 The network connectivity of slave 5 has been recovered after the output bDone of the FB shifting to True. All the slave stations would be reset if you enter 0 to the input uiSlaveAddr. Supported Products ...
  • Page 90: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 4.9 Error Codes and Troubleshooting The following table lists the error codes corresponding to the FBs and the contents of the errors: Cause of Description Corrective Action...
  • Page 91: Chapter 5 Checksum Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 5 Chapter 5 Checksum Instructions...
  • Page 92: Dfc_Lrc8

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Ch ap te r 5 5.1 DFC_LRC8 DFC_LRC8: LRC (8-bit) checksum calculation. FB/FC Instruction Graphic Expression ST Language DFC_LRC8( pSrc:= , DFC_LRC8 dwLen:= , ErrorID=> ); Input ...
  • Page 93: Fc_Lrc16

    The checksum calculation scope is 6(dwLen = 6), therefore, the FC instruction(DFC_LRC8) will starts calculating checksums of six consecutive BYTE data from the memory address input to pSrc(ar_byVar0[0]) and will result in a checksum value of 16#CF. Supported Products  AX Series  Library  DL_LRC.library ...
  • Page 94 The checksum calculation scope is 6(dwLen = 6), therefore, the FC instruction(DFC_LRC16) will starts calculating checksums of six consecutive BYTE data from the memory address input to pSrc(ar_byVar0[0]) and will result in a checksum value of 16#CFCB. Supported Products  AX Series  Library  DL_LRC.library...
  • Page 95: Dfc_Lrc32

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 5 5.3 DFC_LRC32 DFC_LRC32: LRC (32-bit) checksum calculation. FB/FC Instruction Graphic Expression ST Language DFC_LRC32( pSrc:= , DFC_LRC32 dwLen:= , ErrorID=> ); Input ...
  • Page 96: Error Codes And Troubleshooting

    The checksum calculation scope is 4(dwLen = 4), therefore, the FC instruction(DFC_LRC32) will starts calculating checksums of four consecutive BYTE data from the memory address input to pSrc(ar_byVar0[0]) and will result in a checksum value of 16#3935312E. Supported Products  AX Series  Library  DL_LRC.library ...
  • Page 97: Chapter 6 Module Read-Write Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 Chapter 6 Module Read-write Instructions...
  • Page 98: Dfb_From

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 6.1 DFB_From DFB_From: Read the CR data in the module. FB/FC Instruction Graphic Expression ST Language DFB_From( bExecute:= , byRemoteID:= , byLocalID:= , wCRAddr:= , DFB_ From...
  • Page 99 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 Name Function Data Type Output Range(Default value) True when the bBusy instruction is BOOL True/False(False) being executed. True if an error bError BOOL True/False(False)...
  • Page 100 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 Programming Example  This example uses DFB_From to read the value of CR1 in the second module on the right side of the CPU and store the value in the variable(wVar) of the controller.
  • Page 101: Dfb_To

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 6.2 DFB_To DFB_To: Write a value to the CR data in the module. FB/FC Instruction Graphic Expression ST Language DFB_To( bExecute:= , byRemoteID:= , byLocalID:= , wCRAddr:= ,...
  • Page 102 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 Name Function Data Type Output Range(Default value) True when the bBusy instruction is being BOOL True/False(False) executed. True if an error bError BOOL True/False(False)...
  • Page 103 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 Programming Example  This example uses DFB_ To to write the value of variable(wVar) to CR1 in the second module on the right side of the CPU.
  • Page 104: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 6 6.3 Error Codes and Troubleshooting Description Cause of Error Corrective Action Please check if the input DFB_FROM_ERR_PARAMETER Wrong input parameters. parameter is correct. CAN bus communication Please check on the error DFB_FROM_ERR_COMMUNICATION...
  • Page 105: Chapter 7 Modbus Communication Instructions

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Chapter 7 Modbus Communication Instructions 1 0 1...
  • Page 106: Dfb_Comrs

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 7.1 DFB_COMRS DFB_COMRS: Instruction to send and receive communication data via COM port. FB/FC Instruction Graphic Expression ST Language DFB_COMRS ( bExecute:= , byComPort:= , RxMode:= , ParaSet:= ,...
  • Page 107 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Name Description Specific end character mode: The data received ends with a specific character. Then a completion flag is set to True. SPECIFIC_END_CHAR The end character and the length can be configured via ParaSet.pSpecificEndChar and ParaSet.byEndCharAmt.
  • Page 108 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Setting Value Name Function Data Type (Default value) character (Unit: Byte) Memory address of POINTER TO pSpecificStartChar Memory address (0) the start character BYTE BYTE Size of the end...
  • Page 109 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Timing Diagram  Function  The FB instruction (DFB_COMRS) is used for sending communication data. You must finish the configuration of COM port of CPU and add Delta_Modbus_Master_COM_Port device before using this instruction.
  • Page 110 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 For AX-3 series controller, the definition of COM port name can be found in Library Manager as shown below. 1 0 6...
  • Page 111: Dfb_Modbuscomchannel

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Supported Products  AX Series(Without supporting AX-8)  Library  DL_COM_AX3.library  7.2 DFB_ModbusComChannel DFB_ModbusComChannel: Modbus Slave COM Port Channel control instruction.
  • Page 112 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Output  Name Function Data Type Output Range(Default value) True when the bBusy instruction is being BOOL True/False(False) executed. The execution of FB bDone BOOL True/False(False)
  • Page 113 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 triggered by DFB_ModbusComChannel. Note 1: For more details of Modbus slave COM port configuration, you can refer to chapter 9.2 “Serial Communication” in AX-3 Series Operational Manual. Note 2: While using, the channel must be set to “Enable”.
  • Page 114: Dfb_Modbusrequest

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 7.3 DFB_ModbusRequest DFB_ModbusRequest: Modbus communication commands. FB/FC Instruction Graphic Expression ST Language DFB_ModbusRequest( byComPort:= , bExecute:= , bAbort:= , usiSlaveAddr:= , uiFunctionCode:= , uiReadOffset:= , uiReadLen:= , uiWriteOffset:= ,...
  • Page 115 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Setting Value Name Function Data Type (Default value) 0 ~ 65535 The start address of uiReadOffset UINT memory to be read. Coil: 1 ~ 1920 The data length of uiReadLen the memory to be...
  • Page 116 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False  When the execution of FB is bDone ...
  • Page 117 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Supported Products  AX-308E、AX-364E、AX-300、AX-324N  Library  DL_ModbusComMaster_AX3.library  11 3...
  • Page 118: Dfb_Modbusrequest2

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 7.4 DFB_ModbusRequest2 DFB_ModbusRequest2: Modbus communication commands. FB/FC Instruction Graphic Expression ST Language DFB_ModbusRequest2( bExecute:= , bAbort:= , byComPort:= , usiSlaveAddr:= , ModbusCommand:= , tResponseTimeout:= , uiSendTimeout:= , DFB_...
  • Page 119 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 You need to configure the settings based on the definitions of COM port numbers varied from model to model. The timeout should be greater than the Cycle time set in mdbus Task. When the transmission mode is set to RTU, the data bit of Modbus COM port must be set to 8.
  • Page 120 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False  When the execution of FB is bDone ...
  • Page 121: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Supported Products  AX-308E、AX-364E、AX-300、AX-324N  Library  DL_ModbusComMaster_AX3.library  7.5 Error codes and Troubleshooting DFB_COM_ERROR_CODE  Description Cause of Error Corrective Action DFB_NO_ERROR No errors.
  • Page 122 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Description Cause of Error Corrective Action ParaSet.uiWriteLen  Please check if DFB_NO_MASTER_ Delta_Modbus_Master_COM_ Delta_Modbus_Master_COM_Port device CONFIG Port device does not exist. have been added to the device tree. DFB_MEMORY_NOT_ Please check if the program size exceeds the Not enough system memory...
  • Page 123 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 7 Description Cause of Error Corrective Action Illegal data values DFB_RESPONSE_CRC_ Please check on the correctness of responded by slave. ERROR data format responded by slave. (Invalid check code) Illegal data values DFB_RESPONSE_...
  • Page 124: Chapter 8 Network Communication Instructions

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Cha p ter 8 Chapter 8 Network Communication Instructions 1 2 0...
  • Page 125: Dfb_Tcp_Client

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 8.1 DFB_TCP_Client DFB_TCP_Client: TCP socket client instruction. FB/FC Instruction Graphic Expression ST Language DFB_TCP_Client( bEnable:= , SocketInfo:= , bSend:= , bRecvRestart:= , bBusy=>...
  • Page 126 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Setting Value Name Function Data Type (Default value) local device 0 ~ 65535 ( 0 ) 0: Illegal Communicatio n ports on uiRPort UINT 1 ~ 65535...
  • Page 127 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 DFB_SOCK_RECV_MODE  Name Description DFB_SOCK_MODE_NO_R No receiving data mode. ECEVING Specific data length mode: A specific quantity of data is received and the receiving task is DFB_SOCK_MODE_SPECI completed.
  • Page 128 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Indicates the error code ErrorID (DFB_SOCK_NO_ERROR) DFB_SOCKET_ERROR if an error occurs. The execution status of Status (SOCKET_CLOSED) DFB_SOCKET_STATUS socket. The length of received UINT uiRcvLen ( 0 )
  • Page 129 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Timing Diagram  Function  Use the FB instruction (DFB_TCP_Client) to create TCP connection so as to send or receive TCP data packets. Programming Example ...
  • Page 130: Dfb_Tcp_Server

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Supported Products  AX308E、AX-364E、AX-300、AX-324N  Library  DL_EthernetLib.library  8.2 DFB_TCP_Server DFB_TCP_Server: TCP socket server instruction FB/FC Instruction Graphic Expression ST Language DFB_TCP_Server( bEnable:= , SocketInfo:= ,...
  • Page 131 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Input  Setting Value Name Function Data Type (Default value) Execute the function block. True/False (False) bEnable BOOL *1*2 Connection SocketInfo information on tcpServerSocketInfo Server Send data packets.
  • Page 132 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Setting Value Name Function Data Type (Default value) The memory address where the received pRecvBuf POINT TO BYTE data to be stored. The memory size of 0 ~ 8192...
  • Page 133 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 specific character, and ends with a specific character. Both the start and the end character can be configured via uiSetValue. e.g.: If uiSetValue is set to 16#00003A0A, the start character would be 16#3A and the end character is 16#0A.
  • Page 134 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Name Description Applicable Protocol SOCKET_RECEIVED SOCKET has received the data packet. TCP / UDP SOCKET_ERROR SOCKET has errors. TCP / UDP SOCKET_ABORTED SOCKET connection is aborted.
  • Page 135 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Function  Use the FB instruction (DFB_TCP_Server) to create TCP connection so as to send or receive TCP data packets. Programming Example ...
  • Page 136: Dfb_Udp_Socket

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 8.3 DFB_UDP_Socket DFB_UDP_Socket: UDP socket instruction FB/FC Instruction Graphic Expression ST Language DFB_UDP_Socket( bEnable:= , RemoteInfo:= , bSend:= , bRecvRestart:= , bBusy=> , DFB_ UDP_Socket bSent=>...
  • Page 137 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Name Function Data Type Setting Value (Default value) 0 ~ 65535 ( 0 ) 0: Receive data packets from a random port. Communication ports on remote uiRPort(*1*2)
  • Page 138 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Specific end character mode: The data received ends with a specific character (1 Byte). The end character can be configured via DFB_SOCK_MODE_SPECIFIC_SINGLE_CHAR uiSetValue.
  • Page 139 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Name Function Data Type Output Range(Default value) True when the bBusy instruction is being True/False (False) BOOL executed. bSent TCP is connected. True/False (False) BOOL bRcvd...
  • Page 140 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8  When an error occurs during bError execution or the input value of the  When bEnable shifts to False. instruction is incorrect. Timing Diagram ...
  • Page 141 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Supported Products  AX308E、AX-364E、AX-300、AX-324N  Library  DL_EthernetLib.library  1 3 7...
  • Page 142: Dfb_Modbustcpchannel

    , bDone=> , bError=> , bAborted=> , ModbusError=> ); In/ Outs  Name Function Data type Setting value (Default value) Delta Modbus TCP slave Slave DFB_ModbusTCPSlave device Input  Name Function Data type Setting value (Default value) Execute the function block.
  • Page 143 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 flags. bAborted No function BOOL DL_MB_ERROR_CODE ModbusError Error codes DFB_MB_ERROR_CODE (UNDEFINED) Outputs Updating Timing  Name Timing for shifting to True Timing for shifting to False ...
  • Page 144 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Note 1: For more details of Modbus TCP slave configuration, please refer to chapter 9.3 “Ethernet Communication” in AX-3 Series Operational Manual. Note 2: While using, the channel must be set to “Enable”.
  • Page 145: Dfb_Modbustcprequest

    , bDone=> , bError=> , bAborted=> , ModbusError=> );; In/ Outs  Name Function Data type Setting value (Default value) Delta Modbus TCP Slave DFB_ModbusTCPSlave slave device Input  Name Function Data type Setting value (Default value) Execute the function block.
  • Page 146 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 ModbusCommand  Name Function Data Type Output Range(Default value) Supported function codes: 0x01: Read Coils 0x02: Read Discrete Inputs 0x03: Read Holding Registers 0x04: Read Input Registers Modbus function 0x05: Write Single Coil...
  • Page 147 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Name Timing for shifting to True Timing for shifting to False  When the execution of FB is bDone  When bExecute shifts to False. completed.
  • Page 148 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Supported Products  AX308E、AX-364E、AX-300、AX-324N  Library  DL_ModbusTCPMaster.library  1 4 4...
  • Page 149: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 8.6 Error Codes and Troubleshooting DFB_SOCKET_ERROR  Description Cause of Error Corrective Action DFB_SOCK_ERR_NO_ERROR No errors.  Please check if the server exists. DFB_SOCK_ERR Socket connection ...
  • Page 150 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 DFB_MB_ERROR_CODE  Description Cause of Error Corrective Action No errors DFB_NO_ERROR Please check on the Unsupported function correctness of the DFB_ILLEGAL_FUNCTION code. function code you’re using.
  • Page 151 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Description Cause of Error Corrective Action Please check on the Illegal data values correctness of data responded by slave. DFB_RESPONSE_WRONG_SLAVE format responded by (Invalid station number) slave.
  • Page 152 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Cha p ter 8 Description Cause of Error Corrective Action Please check if the settings of Invalid slave station usiSlaveAddr of DFB_INVALID_SLAVE_ADDRESS number. DFB_ModbusTCPRequ est are correct. Function block does not DFB_INVALID_ Please check function...
  • Page 153: Chapter 9 Instructions For Reading And Writing A Memory Card

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Ch ap te r 9 Chapter 9 Instructions for Reading and Writing a Memory Card 1 4 9...
  • Page 154: Dfb_Memoryread

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 9.1 DFB_MemoryRead DFB_MemoryRead: Read a memory card. FB/FC Instruction Graphic Expression ST Language DFB_MemoryRead( bExecute:= , FileInfo:= , DFB_MemoryRead bDone=> , bBusy=> , bError=>...
  • Page 155 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Name Function Data Type Setting Value (Default value) DFB_DEC_DATATYPE.REAL_SIZE DFB_DEC_DATATYPE.LREAL_SIZE (DFB_DEC_DATATYPE.BYTE_SIZE) The address of the start dwRead position to read the DWORD StartPos memory card’s data.* The length of the data...
  • Page 156 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Timing Diagram  Function  Use the FB instruction(DFB_MemoryRead) to store the retrieved memory card data in the controller’s memory. Programming Example ...
  • Page 157 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 The content of Test.csv file in the memory card is shown as follows. Values displayed in the Test.csv file Read four consecutive data starting from...
  • Page 158: Dfb_Memorywrite

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 9.2 DFB_MemoryWrite DFB_MemoryWrite: Write a memory card. FB/FC Instruction Graphic Expression ST Language DFB_MemoryWrite bExecute:= , FileInfo:= , DFB_MemoryWrite bDone=> , bBusy=> , bError=>...
  • Page 159 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Name Function Data Type Setting Value (Default value) DFB_DEC_DATATYPE.DINT_SIZE DFB_DEC_DATATYPE.UDINT_SIZE DFB_DEC_DATATYPE.LINT_SIZE DFB_DEC_DATATYPE.ULINT_SIZE DFB_DEC_DATATYPE.REAL_SIZE DFB_DEC_DATATYPE.LREAL_SIZE (DFB_DEC_DATATYPE.BYTE_SIZE) DFB_ACCESS_MODE.NEW DFB_ACCESS_MODE.APPEND The access DFB_ wAccessMode mode of the file DFB_ACCESS_MODE.OVERWRITE ACCESS_MODE to be created.
  • Page 160 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Name Timing for shifting to True Timing for shifting to False completed.  When FB instruction execution is completed. bBusy  When FB instruction execution starts. ...
  • Page 161 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Suppose that the written data is ar_wVar0: ARRAY [0..3] OF WORD := [0,1,2,10]. After open the .csv file in the memory card, the content would be displayed as follows. Values displayed in the Test.csv file *Note: In case of wDataMode: =DFB_DATA_MODE.ASCII_MODE, the controller, the controller would write the...
  • Page 162: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 9.3 Error Codes and Troubleshooting Description Cause of Error Corrective Action DFB_NO_ERR No errors. DFB_MEMREAD_ERR_ Internal errors. Please contact us directly FAILED DFB_MEMREAD_ERR_ Invalid parameter Please check if the input...
  • Page 163 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l C hap ter 9 Description Cause of Error Corrective Action problem remains, please contact us directly.。 DFB_MEMREAD_ERR_ Duplicate object Please check if the firmware and DUPLICATE name.
  • Page 164: Chapter 10 High Speed Output Instructions

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Cha p ter 10 Chapter 10 High Speed Output Instructions 1 6 0...
  • Page 165: Dfb_Pwm

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 10.1 DFB_PWM DFB_PWM:DFB_PWM is used to generate Pulse-width modulation output signals which is frequency- adjustable. FB/F Instruction Graphic Expression DFB_PWM ST Language DFB_PWM_instance ( bEnable:=, Pin:=,...
  • Page 166 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r Setting Value Effective Name Function Data Type (Default value) time when bEnable is TRUE. Output Pins  Output Value Range Name Function Data Type (Default value) Function block output is...
  • Page 167 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r Function Description  Will generate a square wave signals of specified frequency and duty cycle which can be used  to control plant that needs to receive continuously changing physical quantities. This function only supports output contacts.
  • Page 168 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r Programming Example This programming example uses 8 sets of PWM output sine wave PWM, and the phase of each set is 45 degrees, which will make OUT LED appear water lamp behavior on the machine. The speed and direction are determined by the size and sign of "F_SIN_Hz"...
  • Page 169: Error Codes And Troubleshooting

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 10.2 Error Codes and Troubleshooting Cause of Description Corrective Action Error Firmware DFB_PWM_UNSUPPORT_FW_VERSION does not Update firmware match. number is DFB_PWM_PIN_ID_OVER_RANGE Enter an appropriate pin ID out of range.
  • Page 170: Chapter 11 Additional Instructions

    AX Ser ies Sta ndar d Ins tr uc ti ons M an ual Cha p ter 11 Chapter 11 Additional Instructions 1 6 6...
  • Page 171: Dfc_Loggetsize

    AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 11.1 DFC_LogGetSize DFC_LogGetSize: Read the size of controller’s log files. FB/FC Instruction Graphic Expression ST Language DFC_LogGetSize( DFC_LogGetSize dwLogNum:= , ErrorID=> ); Input ...
  • Page 172 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 Supported Products  、AX-364E、AX-300、AX-324N AX-308E  Library  DL_LogDmp_AX3.library  11.2 DFB_LogDump DFB_LogDump: Read the log files of the controller. FB/FC Instruction Graphic Expression ST Language...
  • Page 173 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 Output  Name Function Data type Output range (Default value) The FB instruction execution is bDone BOOL True/False(False) completed. The FB instruction is bBusy BOOL True/False(False)
  • Page 174 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 Supported Products  、AX-364E、AX-300、AX-324N AX-308E  Library  DL_LogDmp_AX3.library  11.2 Error Codes and Troubleshooting Description Cause of Error Corrective Action DFB_NO_ERR No errors.
  • Page 175 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 Description Cause of Error Corrective Action Please reset the controller to default (Reset Origin). Then download the DFC_DMP_ERR_ The buffer size is too project again after compressing the BUFFERSIZE small.
  • Page 176 AX Ser ies-Sta ndar d Ins tr uc ti ons M an ua l Ch ap te r 11 1 7 2...

Table of Contents