Home

Micro800 Programmable Controllers General Instructions

image

Contents

1. Chapter 9 Communtation instructions Rung Condition is FALSE _ Examine EN bit DNER bis 1 Examine DNER bit Cano 1 oF EW bs H ben Timeout 1 Examine EW bit Cancel e 0 and x e Timeout 0 Ewa 1 Lance 0 Examine C ance END 216 dall Automation Publication 20800 HVDOTIBENE Varc2014MVaiai2014 Gmmuncation instructions Chapter 9 Message execution timing diagram Rung FALSE The following table describes the message conditions and bit status for each execution step identified in the timing diagram when the rung goes to FALSE during execution Step Message description Bit status 1 Rung condition goes TRUE EN bit is set Message executioy is enabled All other bits are cleared 2 Rung condition goes FALSE Message execution continues 3 Message buffer is acquired At this time input data that is the data EW bitis set parameter for write messages is copied for transmission Subsequent changes to the input data will not be reflected in the transmitted message 4 Message transmission starts EW bit is cleared ST bit is set 5 Message response is received ST bit is cleared DN bit is set 6 Message is scanned again after step 5 EN bit is cleared Timing diagram for Rung FALSE Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 217 Chapter 9 Communtation instructions I I IN I
2. I eji o LI 5 LL l EN lg I i I I EW NE ME c oT DN NEN NEN DN I I i I I I Errn I l EUN I 1 1 i i GT ER 1 2 3 4 5 6 1 2 3 4 5 6 Message execution process Error The following table describes the message conditions and bit status for each execution step identified in the timing diagram when an error occurs during execution Step Message description Bit status 1 Rung condition goes TRUE EN bit is set Message execution is enabled All other bits are cleared 2 Message buffer is acquired EW bit is set 3 Message transmission starts EW bit is cleared ST bit is set 4 Message transmission times out EW and ST bits do not change 4 6 As rung condition goes FALSE EN bit is cleared ER bit is set Message execution timing diagram Error The following timing diagram shows a typical pattern when an error occurs during execution 218 Radwell Automation Publication 2080 AVOOIBENE Mach 2014Mach 2014 Chapter 9 Gxmauncation instructions IN EN EW ST Q DN Error ER 219 Radwell Automation Publication 2080 HVDOIBENE Mib 2014
3. MyAppCig Service USINT CIP Service code 1 127 MyAppCig Class UINT CIP Class ID 1 MyApp Cig Instance UDINT CIP Instance ID 0 OXFFFFFFFF MyAppCtg Attribute UINT CIP Attribute 1 65535 0 No attribute C MyAppCfg MemberCnt USINT IP Member ID count 1 3 0 Mone MyAppCfg Memberld CIPMEMBERID CIP Member ID 0 65535 Example How to create a MSG_CIPGENERIC messaging program to read data from a controller This example shows you how to create a message program to retrieve Controller B s catalog information from Controller A using a MSG_CIPGENERIC function block and a COP function block 222 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Strat Ethernet switch No CGommunication instructions Chapter 9 Controller A Catalog 2080 L C50 48QVB IP Address 197 160 1 18 Subnet Mask 233 233 223 0 Gateway Address 182 156 11 Whg Br I Du talking to 2050 L CO0 48QBB Controller B Catalog 2080 1 C30 40QBB IP Address 192 160 1 19 eubnet Mask 299 292 2223 0 Gateway Address 192 160 1 1 Creating a MSG_CIPGENERIC messaging program Perform the following tasks to create a MSG_CIPGENERIC messaging program that can be used to read information from a different controller Task Identify initial values for the input variables MSG_CIPGENERIC on page 223 Add a MSG_CIPGENERIC function block and variables on page 224 Configure initial values for variables on page 226
4. Results ES Variable Monitoring ge abedetg M Aa HA 3 position 2 output Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 573 Chapter 22 Stringmentoulation instructions FIND locates and provides the position of sub strings within strings FIND Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE locate position within strings When EN FALSE no locate operation In Input STRING Any non empty string Pat Input STRING Any non empty string Pattern FIND Output DINT Can be e ifthe sub string Pat not found e the position of the first character of the first occurrence of the sub string Pat first position is 1 Note This function is case sensitive ENO Output BOOL Enable out FIND function language examples Function block diagram Ladder diagram 574 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 String menioulation instructions Chapter 22 Structured text 1 result re FIND in pattern FINDE DINT FIMD STRIMG In STRING Pat Find sub string ST Equivalence complete string ABCD EFGH D complete_string is ABCDEFGH found FIND complete string CDEF found is 3 Results ES Variable Monitoring Radwell Automation Publication 2080 AVOIBENE Mib 2014 575 Chapter 22 Stringmentoulation instructions INSERT inserts sub strings at user defined positions
5. Radwell Automation Publication 2080 HVDOIBENE Mib 2014 CGommunication instructions Chapter 9 Add a MSG_CIPSYMBOLIC function block variables and a contact Follow these steps to add a MSG_CIPSYMBOLIC function block input variables and a contact to a ladder diagram Add function block and variables l Inthe Toolbox select Rung and drag and drop it directly under the second ladder rung to add a third rung 2 Addthe MSG CIPSYMBOLIC function block e Inthe Toolbox select Block and drag and drop it onto the ladder rung to display the Block Selector e InSearch type MSG to display the message function blocks e Type MSG WriteVariable in the Instance field e Double click MSG CIPSYMBOLIC to add an instance of the function block called MSG_WriteVariable to the ladder diagram 3 Assign variable names e Inthe ladder diagram POU double click a variable to display the Variable Selector e Inthe Variable Selector assign variable names as listed in the following table 4 For the Data variable double click in Dimension and change the array size roll Al Configure initial values for the local variables L Add CtrlCfg initial values e From the Local Variables page expand the CtrlCfg parameter to view additional parameters e Enter the following values in the Initial Value column for each parameter Parameter Initial value A_CtrlCfg Cancel Leave blank A CtriCfg TriggerType 300 A Ctrlcfg StrMode Leave blank
6. When Enable FALSE there is no computation Applies only to LD programs BOOL USINT BYTE INT UINT Any non Short Integer value WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING SINT A Short Integer value BOOL Enable out Applies only to LD programs ANY TO SINT operator ST language example ST Equivalence ANY TO SINT true bres is 1 ANY TO SINT t 0s46ms tres is 46 ANY TO SINT 0198 5 mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO STRING Parameter EN 01 ENO ANY TO STRING converts a value to a String value Arguments Parameter Type Data Type Input BOOL Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE Output STRING Output BOOL Description C Function enable When Enable TRUE execute the conversion to String computation When Enable FALSE there is no computation Applies only to LD programs Any value other than String If IN is a Boolean FALSE or TRUE If IN is an Integer or a real a decimal representation If IN is a TIME can be TIME time1 STRING s1 time 13 ms sT ANY TO STRING timeT s1 0513 Enable out Applies only to LD programs ANY TO STRING operator ST language example ST Equivalence
7. bres e ANY TO STRING TRUE ares ANY TO STRING 125 bres is TRUE ares is 125 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 279 Chapter 12 Data conversion instructions ANY_TO_TIME Arguments Parameter Parameter Type Data Type EN Input BOOL i1 Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT L WORD REAL LREAL STRING o1 Output TIME ENO Output BOOL ANY TO TIME converts a non Time or non Date value to a Time value Description Function enable When Enable TRUE execute the conversion to the Time computation When Enable FALSE there is no computation Applies only to LD programs Any positive value other than a Time or Date data type IN or integer part of IN if it is real is the number of milliseconds STRING number of milliseconds for example a value of 300032 represents 5 minutes and 32 milliseconds Time value represented by IN A value of 1193h2m47s295ms indicates an invalid time Enable out Applies only to LD programs ANY TO TIME operator ST language example ST Equivalence ares 4 EE oe ee X ANY TO TIME ANY TO TIME 1256 ares t 1s256ms 1256 3 rres t 1s256ms zi 280 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Dataconversion instructions Chapter 12 ANY TO UDINT converts a value to a 32 bit Unsigned Double Integer value ANY TO UD
8. 4 Invalid CIP symbol name 43 Unsupported CIP Class value or MemberlD count 48 The instruction block s input data array size is not sufficient 49 Invalid target path 50 Bad service code 5 The instruction block s transmit data array size is too big for CIP communication Note The maximum length for the user data to be transmitted varies for different message configurations If the total CIP message payload including user data and CIP message overload is beyond 504 bytes an error 0x21 subError 0x33 is reported Timeout related errors 112 Message timed out while waiting in the message wait queue 113 Message timed out while waiting for the a connection to the link layer to be established 114 Message timed out while waiting to transmit to the link layer 115 Message timed out while waiting for a response from the link layer Server response format related error codes 65 Message reply does not match request 68 Message reply data type not valid supported MSG_CIPSYMBOLIC No IP address configured for the network Maximum number of connections used no connections available Invalid internet address or node address Message execution was canceled by user Cancel parameter was set to TRUE No network buffer space available Reserved CIP response error code SubErrorlD specifies the CIP status and ExtErrorlD specifies the CIP extended status value Refer to the CIP specification for possible error code values
9. Add a contact and a coil on page 229 Add a COP function block variables and contact MSG_CIPGENERIC on page 229 Verify correct IP configuration on Controller B on page 231 Identify initial values for the input variables MSG CIPGENERIC Follow these general steps to obtain the Identity Object values to use for configuring the AppCfg parameter initial values To add input variables and initial values 1 From the Help menu click User Manuals Radwell Automation Publication 2080 HVDOIBENE Mib 2014 223 Chapter 9 224 Communtcation instructions Input variable example MyAppCfg Service MyAppCfg Class MyAppCfg Instance MyAppCfg Attribute Expand the Drives selection and locate the user manual for the type of communication adapter you are using EtherNet IP Adapter User Manual Double click the manual to open it Review the Appendix headings to locate the section that provides information about the EtherNet IP objects that can be accessed using Explicit Messages Appendix C Go to the Appendix section and identify the object type related to your explicit message Identity object Identify the initial values for the AppCfg parameters based on the type information you will be retrieving Ethernet IP object data and AppCfg parameters example The following table identifies the specific Ethernet IP object data that will be used to read catalog information from a controller AppCfg parameter Ser
10. Chapter 15 InputOutput instructions Results ES Variable Monitoring 7 enable BOOL line STRING inez STRING line STRING lined STRING output BOOL 348 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Input Output instructions Chapter 15 LCD_BKLT_REM sets the Remote LCD backlight parameters in a user program LCD_BKLT_REM function block can be used in a user program to set the Remote LCD backlight parameters The function is only supported by Micro 820 LCD_BKLT_REM is only effective when Remote LCD is displaying either the User defined screen by using LCD_REM FB or default IO Status screen For all other screens backlight parameter settings done through menu will take effect LCD_BKLT_REM When Enable input goes False last menu settings will take effect Y A P LCD BKLT REM LCD BKLT REM operation e LCD BKLT REM is supported for Micro820 controllers only e LCD BKLT REM is only effective when Remote LCD is displaying either the user defined screen by using the LCD REM function block or default I O Status screen For all other screens backlight parameter settings configured through the menu will take effect e When the Enable Input goes false the last menu settings will take effect LOD BKLT REM arguments Parameter Parameter Datatype Description type Enable Input BOOL Function block enable When Enable TRUE execute REM LCD BKLT function overwriting an
11. OSMajRev UINT OS Major Revision Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 399 400 Chapter 15 Inout Outout instructions Parameter Data type Description OSMinRev UINT OS Minor Revision ModeBehaviour BOOL Mode Behavior TRUE Go to RUN on power up FaultOverride BOOL Fault Override TRUE Override error on power up StrtUpProtect BOOL Startup Protection TRUE Run startup protection program on power up Note For future release MajErrHalted BOOL Major error halted TRUE Major error halted MajErrCode UINT Major error code MajErrUFR BOOL Major error during user fault routine Note For future release UFRPouNum UINT User fault routine program number MMLoadAlways BOOL Memory Module restore to controller always on power up TRUE Restore MMLoadOnError BOOL Memory Module restore to controller if power up with error TRUE Restore MMPwdMismatch BOOL Memory Module password mismatch TRUE Controller and Memory Module password mismatch FreeRunClock UINT Free running cock that increments every 100 microseconds from 0 to 65535 and then returns to 0 You can use the Clock which is globally accessible if you need more resolution than the standard 1 millisecond timer Note Only supported for Micro830 and Micro850 controllers Value for Micro810 controllers remains 0 ForcesInstall BOOL Forces enabled TRUE Enabled EMINFilterMod BOOL Embedded filter modified TRUE Modified Radwell Automation
12. You can configure the low output bit pattern during initial setup or you can use the HSC function block to load the new parameters while the controller is operating HSCSTSInfo parameters example The following image shows the HSCStsInfo parameters in the Variable Selector Radwell Automation Publication 2080 HVDOIBENE March nb 2014 317 Chapter 14 High SpesdCaunter HED instructions PLS data type PLSData data type PLS is used to configure the programmable limit switch PLSData structure elements The PLS data structure is a flexible array with the following elements Element Element order Data type Element description HSCHP Word 0 1 DINT High preset HSCLP Word 2 3 DINT Low preset HSCHPOutput Word 4 5 UDINT Output high data HSCLPOutput Word 6 7 UDINT Output low data The total number of elements for one PLS data structure should not exceed 255 318 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 High SosediCounter HD instructions Chapter 14 PLSData parameters The following table lists the PLSData parameter details Parameter Datatype Data format HSC User program Description mode access HSCHP DINT 32 bit signed 0 read writer High preset integer HSCLP DINT 32 bit signed 0 read write Low preset integer HSCHPOutput UDINT 32 bit binary 0 read write Output high data HSCLPOutput UDINT 32 bit binary 0 read write Output low data HSCApp settings versus PLSData settings When the PL
13. e Deceleration or Acceleration inputs should have a positive value If Deceleration or Acceleration is set to a non positive value the function block reports an error Error ID MC FB ERR RANGE e Jerk input should have a non negative value If Jerk is set to a negative value the function block reports an error Error ID MC FB ERR RANGE e f Maximum Jerk is set to zero all jerk parameters for the motion control function block including jerk setting for MC Stop have to be set to zero If they are not the function block reports an error Error ID MC FB ERR RANGE e f Jerk is set to a non zero value S Curve profile is generated if Jerk is set to 0 trapezoidal profile is generated e Home Jerk configuration is not limited to Max Jerk configuration e Ifthe motion engine fails to generate the motion profile prescribed by the dynamic input parameters the function block reports an error Error ID MC FB ERR PROFILE With Execute When Execute is TRUE one of the Busy Done Error or CommandAborted outputs must also be TRUE The outputs are mutually exclusive only one output on one function block can be TRUE Only one of the outputs Active Error Done and CommandAborted is set at one time With Enable The Valid and Error outputs are mutually exclusive only one output on one function block can be TRUE With Execute The Done Error ErrorlD and CommandAborted outputs are reset with the falling edge of Execute instruction How
14. 2 Add SymCfg initial values Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 237 Chapter 9 Communication instructions e From the Local Variables page expand the SymCfg parameter to view additional parameters e Enter the following values in the Initial Value column for each parameter Parameter Initial value A SymCfg Service 1 A SymCfg Symbol UDINT FromA A_SymCfg Count Leave blank A SymCfg DataType 200 A_SymCfg 0ffset Leave blank Results The Local Variables selector should look similar to the following image CIPSymbalicMessage VAR Eu CIPSymbolicMessage POU Micros CU gt gt of gt Bb sc crsymeoucs D MSG CIPSYMBO A Ctr froe CIPCONTROLCFG Ges A CtriCfg Cancel BOOL ACtriCig Triggertype UDINT 300 CFPS MBOLICCFG A SymCigSemice USINT 1 A SymChgSymbol STRING UDINT From A SymChg Count UINT A SymCigDatalype USINT 200 z Configure initial values for TargetCfg 1 From the ladder diagram POU double click the A_TarCfg variable to open the global variables selector 2 Expand the TargetCfg parameter to view additional parameters 3 Enterthe following values in the Initial Value column for each parameter Parameter Initial value A TarCfg Path 4 192 168 1 19 A TarCfg CipConnMode 1 238 Fra Automation Publication 2080 RIVO0IBENE Mach 2014Viarch 2014 Communication instructions Chapter 9 A_TarCfg UcmmTimeout 0 A TarCfg ConnMsgTimeout 0 A TarCfg ConnClose Leave blank
15. 2 Enterthe following values in the Initial Value column for each parameter Parameter Initial value Comments MyCtriCfg Cancel Leave blank Not needed MyCtrlCfg TriggerType 0 We only need to retrieve the catalog number once MyCtrlcfg StrMode Leave blank Not needed To configure initial values for the MyAppCfg input variable 1 From the Local Variables page expand MyAppCfg to view its parameters 2 Enter the following values in the Initial Value column for each parameter Parameter Initial value MyAppCfg Service 14 MyAppCfg Class 01 MyAppCfg Instance 01 MyAppCfg Attribute 07 226 Fodkvell Automation Publication 2080 RVO0IBENE Mach 2014MVerch 2014 Communication instructions Chapter 9 To configure initial values for the MyTargetCfg input variable 1 From the Local Variables page expand MyTargetCfg to view its parameters 2 Enter the following values in the Initial Value column for each parameter Parameter Initial Value Comments MyTargetCfg Path 4 192 168 100 4 The first 4 indicates the message is being sent out of the embedded Ethernet port 192 168 100 4 is the IP address of the drive Ethernet interface MyTargetCfg CipConnMode 0 Unconnected is preferred for CIP messages MyTargetCfg UcmmTimeout blank Unconnected messages have a timeout default of 3000 milliseconds if their Initial Values are blank MyTargetCfg ConnMsgTimeout blank Connected messages have a timeout default of 3000 milliseconds if their Initial Values a
16. Busy Home Hc Home 1 Busv Active Home HC Home 1 Active Command bort Home Hc Home 1 Command borted Error Home HC Home 1 Error ErrorID Home re MC Home 1 ErrorID Mc Home 14 void MC Home 1 AXIS REF AxisIn BOOL Execute REAL Position SINT HomingMode SINT BufFerMade Type MC Home Commands the axis to perform the home searching sequence Results Error Deacription MA W A HA NH Fashion and Velocity NA ommani Panon AMO mm Command Vroe A50 meae Nia Target Bee ig mm Target veipvzte 24 0 mue M Lee Homing modes Value Name Description 0x00 MC HOME ABS SWITCH Homing process by searching Home Absolute switch 0x01 MC HOME LIMIT SWITCH Homing process by searching limit switch 0x02 MC HOME REF WITH ABS Homing process by searching Home Absolute switch plus using encoder reference pulse 0x03 MC HOME REF PULSE Homing process by searching limit switch plus using encoder reference pulse 0x04 MC HOME DIRECT Static homing process with direct forcing a home position from user reference The function block will set current position the mechanism is in as home position with its position determined by the input parameter Position Radwell Automation Publication 2080 HVDOIBENE Mib 2014 439 Chapter 17 Motion control instructions 440 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 MC MoveAbsolute commands a controlled mot
17. Communtcation instructions Variable Channel TriggerType Cmd ElementCnt Addr Node Jaddi 1 laddr 2 MSG MODBUS Write configuration The following image shows the variables and the values used to configure the MSG MODBUS instruction to write control data to a PowerFlex 4 drive Gata Iype Directhon Dimension r pn ele D3_kfg MODBUSLC Yar DS o Channel UINT Var z D3 ieg TriggetType USINT Var gb o omg USINT Var B Go ddgEementcnt UINT Var MODBLISTI D3 Tcfg Addr UDINT Var D3 Tcfg Node USINT Var a oo da MOOBUSLC War P3 Jaddr 1 WORD Var D Jaddr 2 WORD Var D3 laddr 3 WORD Var MSG MODBUS Write variables The following table lists the variables values and describes the purpose of each variable Description Channel 5 location of SERIALISOL module Trigger on False to True transition Modbus Function Code 16 Write Holding Registers Length PowerFlex Logic Status word address 1 PowerFlex Node address PowerFlex Logic Command word PowerFlex Speed Reference word Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 CGommunication instructions Chapter 9 Communication protocol support The MSG_CIP function blocks support different communication protocols as described in this section Function block support for message communication protocols The following table lists the communication protocols supported by the Mo
18. DWORD LWORD ENO Output BOOL Enable out Applies only to LD programs Example ST equivalence ao23 ai10 92 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Arithmetic instructions Chapter 5 Multiplication Parameter EN 01 ENO Multiplication multiplies two or more Integer or Real values The Multiplication function supports additional inputs Arguments Parameter Type Input Data Type BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL BOOL Input Input Output Output Example ST equivalence aolo ge aob ai151 aid2 all 1024 as les s Description Function enable When Enable TRUE execute current multiplication computation When Enable FALSE there is no computation Applies only to LD programs Factor in Integer or Real data type All inputs must be the same data type Factor in Integer or Real data type All inputs must be the same data type Product of the inputs in Integer or Real data type Input and output must use the same data type Enable out Applies only to LD programs Radwell Automation Publication 2080 AVOIBENE Mib 2014 93 Chapter 5 Arithmetic i
19. Results Variable Monitoring Global Variables Micro Local Variables UntitledST System Variables Hame Logical Value Physical Value Lock Data gf gf pf pt sel i M ZA a BOOL reset M IA BOOL output NA BOOL H5 1 Ss T CI H5 Cancel Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 159 Chapter 8 Boolean instructions Boolean OR of two or more values OR OR operation The OR operator supports additional inputs Arguments Parameter Parameter Data Type Description Type i1 Input BOOL i2 Input BOOL 01 Output BOOL Boolean OR of the input terms OR operator ST language example ST equivalence bolO0 b1i101 OR NOT bil02 DoS se Ch OR D152 OR bri535 160 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Boolean instructions Chapter 8 AND Parameter AND performs a boolean AND operation between two or more values AND operation The AND operator supports additional inputs Arguments Parameter Data Type Description Type Input Input Output Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Verch 2014 BOOL Value in Boolean data type BOOL Value in Boolean data type BOOL Result of the Boolean AND operation of the input values AND operator ST language example ST equivalence bolO0 bil01 AND NOT bil02 bo5 bi5l AND bi52 AND bi53 161 Chapter 8 Boolean instructions Boolean exclusiv
20. TON 1 0 4 elapse TON 1 ET TOM 11 void TOM 1 BOOL IM TIME PT Type TOM On delay timing Results ES Variable Monitoring Hame Logical Value Physical Y alue T T hi EA PO CR LES Maul me TH3s M AA output a MA elapse TH1a433ms M UM 1 e L C Cancel 594 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Timer instructions Chapter 23 TONOFF Parameter IN PT PTOF ET TONOFF delays turning on an output on a true rung then delays turning off the output on the false rung Arguments Parametertype Data type Input Input Input Output Output BOOL TIME TIME BOOL TIME Description If Rising Edge IN turns from 0 to 1 the On delay timer starts If the Programmed On delay time is elapsed and the Falling Edge IN turns from 1 to 0 the Off delay timer starts and resets the elapsed time ET If the Programmed On delay time is elapsed and the Falling Edge IN turns from 1 to 0 the Off delay timer starts If the Programmed On delay time is not elapsed and the Rising Edge IN turns from 0 to 1 the On delay timer starts On delay time setting See Time data type Off delay time setting See Time data type If TRUE the Programmed On delay time is elapsed and Programmed Off delay time is not elapsed Current elapsed time Possible values range from Oms to 1193h2m47s294ms If the Programmed On delay time is elapsed
21. The catalog number must only be retrieved one time so the MyCtrlCfg TriggerType initial value is set to 0 The initial values were determined by looking up the object data values for Service Class Instance and Attribute The initial values are for target device configuration Because this is a Read message there is no request data so the ReqData parameters is not used Because this is a Read message there is no request data so the ReqLength parameters is not used The catalog number string is stored in the array in the ODVA short string format The first array element defines the strength length and the rest store the string character s hexadecimal value The maximum number of characters is 80 plus the length element so MyResData is defined as a 1 dimension array with 81 elements Your instance of the MSG_CIPGENERIC function block should look similar to the following image Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Gmmuncation instructions Chapter 9 Add a contact and a coil Follow these steps to add a coil and a contact to the MSG_CIPGENERIC function block which will be used to convert the catalog information to a human readable string 1 Inthe Toolbox select Direct Contact and drag and drop it to the left of the MSC CIPGENERIC function block input on the first ladder rung 2 Inthe Variable Selector type Get Catalog in the Name field for the contact 3 Inthe Toolbox select Direct Coil and
22. 10 25 aresult is FALSE mresult ab ab mresult is TRUE Radwell Automation Publication 2080 AVOIBENE Mib 2014 253 Chapter 10 Carpare instructions Greater than Parameter EN i1 i2 01 254 For Integer Real Time Date and String values Greater Than compares input values to determine whether the first is greater than the second Arguments Parameter Data Type Description Type Input Input Input Output BOOL Function enable When Enable TRUE execute the input comparison When Enable FALSE there is no comparison Applies only to LD programs SINT USINT BYTE All inputs must be the same data type INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING BOOL TRUE if i1 gt i2 Greater than gt operator ST language example ST Equivalence aresult 10 gt 25 aresult is FALSE mresult ss ab gt a mresult is TRUE Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Corvpae instructions Chapter 10 Greater than or equal Parameter EN 01 For Integer Real Time Date and String values Greater Than or Equal compares input values to determine whether the first is greater than or equal to the second Special recommendations
23. 48 is the ascii code of 0 result is one character string from 0 to 9 Results Variable Monitoring Hame Logical Value Physical Value Lock E pt bei Tog 24 character Radwell Automation Publication 2080 HVDOIBENE Mib 2014 571 Chapter 22 Stringmentoulation instructions DELETE deletes part of a string DELETE i Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE delete specified part of a string When EN FALSE no operation IN Input STRING Any non empty string NbC Input DINT Number of characters to be deleted Pos Input DINT Position of the first deleted character first character of the string has position 1 DELETE Output STRING Can be a n e modified string e empty string if Pos 1 e initial string if Pos gt IN string length e initial string if NbC 0 ENO Output BOOL Enable out DELETE function language examples Function block diagram 572 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulation instructions Chapter 22 Ladder diagram Structured text 1 nbc 3 Ei position ie 2 3 output DELETE in nbc position DELETE STRING DELETE STRIMG IM DINT NET DINT Posi Delete sub string ST Equivalence complete string INSERT ABCD EFGH 5 complete string is ABCDEFGH sub string DELETE complete string 4 3 sub stringis ABGH
24. Channel is shutdown or recon figuration is in progress Error code occurs immediately after power on until a connection is established and is normal behavior It may also occur if an Ethernet cable is disconnected or an IP address cannot be detected CIPTARGETCFG data type The following table describes the CIPTARGETCFG data type Data type Description Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 183 Chapter 9 Communtation instructions Parameter Path CipConnMode UcmmTimeout ConnMsgTimeout ConnClose String element Local port 184 Data type STRING 80 USINT UDINT UDINT BOOL Description Path for the target A maximum of two hops can be specified The path syntax is e lt port gt lt node slot address gt 2 See also Target path for CIP messaging on page 184 CIP Connection type e 0 Unconnected default e 1 Class3 connection See also CIP EIP message connections on page 185 Unconnected message timeout in milliseconds The amount of time to wait for a reply for unconnected messages including connection establishment for connected message e Valid values 250 10 000 e Set to 0 to use the default value of 3000 e A value set to less than 250 will be set to 250 minimum e Avalue set to greater than 10 000 will be set to 10 000 maximum See also CIP message timeout timers on page 186 Class3 Connection timeout in milliseconds The amount of time
25. Enable specific user input Flush specific user input Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 405 Chapter 16 Interrupt instructions STIS starts a selectable timed timer user interrupt STIS Arguments Parameter Parameter Data Type Description Type Enable Input BOOL Function enable When Enable TRUE perform function When Enable FALSE do not perform function IRQType Input UDINT Use the STI defined words IRQ STIO IRQ STI IRQ_STI2 IRQ_STI3 SetPoint Input UINT This is the amount of time in ms which must expire prior to executing the selectable timed interrupt A value of 0 disables the STIS function A value between 1 and 65535 enables the STIS function STIS Output BOOL Rung status same as Enable STIS function language examples Function block diagram 406 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Interrupt instructions Chapter 16 Ladder diagram Structured text 1 enable TRUE 2 IRUTvpe IRQ STIZ 3 SetPoint 1000 4 output i STIS enable IRGQTYvpe SetPoint ST Equivalence TESTOUTPUT STIS TESTENABLE 2 1000 Results Ee Variable Monitoring Hame Logical Value PhysicalValue Lock AGT ype 131072 AA SetPoint 1000 N A output Ed Radwell Automation Publication 20800 HVDOTBENE March 2014Vach 2014 407 Chapter 16 Interrupt instructions UIC clears Interrupt Lost bit for the selec
26. IRQ_UFR IRQ EII7 IRQ_UPMO IRQ_HSCO IRQ_UPM1 IRQ_HSC1 IRQ_UPM2 IRQ_HSC2 IRQ_UPM3 IRQ_UPM4 UID Output BOOL Rung status same as Enable UID function language examples Function block diagram 410 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Interrupt instructions Chapter 16 Ladder diagram Structured text 1 enable TRUE 2 JIBOTypE 23 8 output UID enable IRGTYvpe UID BOOL UID BOOL Enable LIDIMT IRGQTvpe Disable specific user interrupt ST Equivalence TESTOUTPUT UID TESTENABLE 2 Results Variable Monitoring Sle Global Variables Mierog30 Local Variables R amp LIID ST 5 vstem Vari 2 Hame Logical Yalue PhysicalValue Lock E ge gm e enable d HA jel IROT ype N A u output WE Cancel Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 411 Chapter 16 Interrupt instructions UIE enables a user interrupt UIE Arguments Parameter Parameter Data Type Description Type Enable Input BOOL Function enable When Enable TRUE perform function When Enable FALSE do not perform function IRQType Input UDINT Use the STI defined words IRQ_HSC3 IRQ_EIIO IRQ_HSC4 RU EII IRQ_HSC5 IRQ_EII2 IRQ_STIO IRQ_EII3 IRQ STI IO Ell4 IRQ_STI2 IRQ_EII5 IRQ STI3 IRQ_EII6 IRQ_UFR IRQ HI IRQ_UPMO IRQ_HSCO IRQ_UPM1 IRQ_HSC1 IRQ_UPM2 IRQ_HSC2 IRQ_UPM3 IRQ_U
27. Input TIME Sampling period Possible values range from Oms to 23h59m59s999ms Output REAL Differentiated output Output BOOL Enable out Applies only to LD programs DERIVATE function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Processcontrol instructions Chapter 18 Ladder Diagram LD run Structured Text ST 1 DERIVATE i run input T 2 output ze DERIVATE 1 XOUT DERIVATE 14 void DERIVATE 1 BOOLRLIM REAL SIM TIME CYCLE Type DERIVATE Differentiation according to time ST Equivalence DERIVATE is an instance of a DERIVATE block DERIVATE1 manual mode sensor value t 100ms derivated value DERIVATEI XOUT Radwell Automation Publication 2080 HVDOIBENE Mib 2014 503 Chapter 18 Processcontro instructions HYSTER Parameter EN XIN1 XIN2 EPS ENO 504 Arguments Parametertype Datatype Input Input Input Input Output Output BOOL REAL REAL REAL BOOL BOOL Description Function block enable When EN TRUE execute function When EN FALSE do not execute function Applies only to LD programs Any real value To test if XIN1 has overpassed XIN2 EPS Hysteresis value must be greater than zero Enable out Applies only to LD programs TRUE if XIN1 has overpassed XIN2 EPS and is not yet below XIN2 EPS Hyster timing diagram example SIN2 EPS HIHA XINZ EP
28. MC HOME DIRECT 0x04 except the MC Home function block sets the Axis Homed status e When MC ExecutionMode 0 mcImmediately the execution of the MO SetPosition function block reports an error if there is on going non continuous motion with the axis e When MC ExecutionMode 1 mcQueued the actual position setting occurs only when all previous on going motion stops That is each previous function block must have at least one of the Done Aborted or Error outputs equal to True Arguments Parameter Data type Description type Input BOOL Function block enable When EN TRUE execute current MC SetPosition computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE starts setting the axis position Radwell Automation Publication 2080 HVDOIBENE Mib 2014 479 Chapter 17 Motion control instructions Parameter Position Relative MC ExecutionMode ENO Axis Done Busy Error ErrorlD 480 Parameter type Input Input Input Output Output Output Output Output Output Data type REAL BOOL SINT BOOL AXIS_REF BOOL BOOL BOOL UINT Description The absolute position or relative distance to be set for the axis When TRUE set the relative distance for the axis When FALSE set the absolute position for the axis Values are e 0 mcimmediately The functionality is i
29. Parameter type Input Input Output Output Output Output Output ARL reads characters from the buffer up to and including the termination characters and stores them in a string Arguments Data type BOOL ARDARL BOOL ASCIILOCADDR UINT BOOL UINT Description If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed Read characters from the buffer maximum is 82 See ARDARL data type on page 132 FALSE The function block is not done TRUE The function block is done The string element where you want the characters stored The number of characters FALSE No error TRUE An error is detected See ABL error codes on page 130 ARL function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Al serial port instructions Chapter 6 Ladder Diagram LD Structured Text ST 1 APL Tip input output ARL 1 0 des re AEL 1 Destination num ARL 1 NumChar error Ce ARL 1 Error ID ARL 1 ErrarID moe oh void ARL_1 BOOL IN ARDARL ARLInput Type ARL Read line From the input buffer and place characters in a string Radwell Automation Publication 2080 HVDOIBENE Mib 2014 125 Chapter 6 Al serial port instructions AWA Parameter AWAInput Source Q NumChar Error Error
30. READ DEVICE ID MEI e Local Address Data 2 0x01 READ DEV ID BASIC e Local Address Data 3 0x00 Read Vendor Object MODBUS2TARPARA data type The following table describes the MODBUSTARPARA data type parameters Description Target device s Modbus data address e 1 65536 e Decreases by one when sending e Firmware uses low word of address if the address value is greater than 65536 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Parameter NodeAddress 4 Port Unitld MsgTimeOut ConnTimeOut ConnClose Data type USINT UINT USINT UDINT UDINT BOOL Gmmuncation instructions Chapter 9 Description Target device s IP address The IP address should be a valid unicast address and cannot be 0 multicast broadcast local address or loop back address 127 x x x For example to specify 192 168 2 100 e NodeAddress 0 192 e NodeAddress 1 168 e NodeAddress 2 2 e NodeAddress 3 100 Target TCP port number Standard Modbus TCP port is 502 1 65535 Set to 0 to use the default value 502 Unit Identifier Used to communicate with slave devices through a Modbus bridge Refer Modbus specification for more details Note that Micro800 shall not attempt to validate this value 0 255 Set to 255 if Target device is not a bridge Message timeout in milliseconds Amount of time to wait for a reply for an initiated command e 250 10 000 e Set to 0 to use the default value 3000 e Avalue le
31. Results The User Global Variables selector should similar to the following image CIPTARGETCFG a g STRING 4 192 168 1 19 USINT 1 UDINT D UDINT D BOOL Values for the Data parameter The values for A Data will be automatically obtained from the COP function block on Rung 1 Also notice that A UDINT is 32 bit data USINT is 8 bit data so A Data is a one dimension array with 4 elements Add a contact l Inthe Toolbox select Direct Contact and drag and drop it to the left of the MSG_CIPSYMBOLIC function block input on the third ladder rung 2 Inthe Variable Selector assign the WriteValue variable to the contact Result The third rung of your ladder diagram program for MSG_CIPSYMBOLIC messaging should look similar to the following image Radwell Automation Publication 2080 HVDOIBENE Mib 2014 239 Chapter 9 Communtation instructions Virite value Verify correct IP configuration on Controller B Follow these steps to verify the IP address settings are correct on Controller B 1 Open the application workspace for the controller 2 From the Project Organizer double click the controller to display it in the application workspace 3 Inthe controller configuration workspace expand Ethernet in the controller tree and then click Internet Protocol to display the controller configuration page 4 Verify the IP address settings are correct as identified in the following table
32. SCALER 527 SR 168 STACKINT 530 SUS 540 SYS_INFO 406 TOF 603 TON 605 TONOFF 607 TP 610 TRIMPOT_READ 409 functions ABS 68 ACOS 70 ACOS_LREAL 72 AND_MASK 140 ASCII 580 ASIN 76 ASIN_LREAL 78 ATAN 80 ATAN_LREAL 82 CHAR 582 COS 84 COS_LREAL 86 DELETE 584 DOY 612 EXPT 90 FIND 586 INSERT 588 LCD 355 LEFT 590 LIMIT 535 LOG 92 MAX 304 MID 592 MIN 302 MLEN 594 MOD 94 MUAR 178 MUX8B 174 NOT MASK 142 OR MASK 144 POW 99 RAND 101 REPLACE 598 RHC 366 RIGHT 596 ROL 146 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Index ROR 148 RPC 368 SHL 150 SHR 152 SIN 103 SIN LREAL 105 SQRT 107 STIS 414 TAN 110 TAN LREAL 112 TDF 615 TND 533 TOW 617 TRUNC 114 TTABLE 170 UIC 416 UID 418 UIE 420 UIF 422 XOR MASK 154 functions blocks naming and parameters for 19 G greater than operator 260 greater than or equal operator 261 H HSC function block 309 HSC SET STS function block 329 HYSTER function block 514 IIM function block 372 input output HSC function block 309 HSC SET STS function block 329 IIM function block 372 IOM function block 375 KEY READ function block 378 LCD function 355 MMINFO function block 385 PLUGIN INFO function block 388 PLUGIN READ function block 391 PLUGIN RESET function block 394 PLUGIN WRITE function block 396 RHCfunction 366 RPCfunction 368 RTC READ function block 401 RTC SET function block 404 SYS INFO fu
33. SE l setl reset g output SR 1 01 SR 1l void SR 1 BOOL SET1 BOOL RESET Type 5R Set dominant bistable ST Equivalence SRI is an instance of a SR block SR1 auto_mode amp start cmd stop omg command e SRI 0O1 Results ES Variable Monitoring Global Variables Micro Local Variables UntitledST System Variables Logical Value PhyszicalValue Lock Dal we v gt T gt T gt y HA l BOO HA i KZ Cancel Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 165 Chapter 8 Boolean instructions TTABLE Parameter Table INO IN1 IN2 IN3 TTABLE 166 Arguments Parameter Data Type Type Input UINT Input BOOL Input BOOL Input BOOL Input BOOL Output BOOL The T TABLE function gives the value of the output according to the combination of inputs If the value is OXABCD and In3 through In0 corresponds to the number 7 then TTABLE is the value of bit 7 in the table which is 1 The least significant bit in the table is bit 0 Description Truth table of BOOLEAN function Any BOOL input value Any BOOL input value Any BOOL input value Any BOOL input value The value of the output according to the combination of inputs See TTABLE input combinations on page 169 TTABLE input combinations The function has four inputs and therefore 16 combinations These combinations can be found in a truth table for each combination the output v
34. T git JEt k gt T gt 0 5 a 0 479426 100 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Arithmetic instructions Chapter 5 SIN LREAL calculates the sine of a Long Real value SIN LREAL Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current computation When EN FALSE there is no computation IN Input LREAL Any Long Real value SIN_LREAL Output LREAL Sine of the input value in set 1 0 1 0 ENO Output BOOL Enable out SIN LREAL function language examples Function block diagram Ladder diagram Structured text L gm s cn sinlreal SIN LREAL in sj IH L REALI LREAL SIN LREAL LREAL IN Perform amp 4 biE real sine calculation ST Equivalence TESTOUTPUT1 SIN LREAL TESTINPUTI Radwell Automation Publication 2080 AVOIBENE Mib 2014 101 Chapter 5 Arithmetic instructions Results Variable Monitoring Hame Logical alue PhysicalValue Lock E T gt T gt La gt T gt 0 5 0 479425538560 Cancel 102 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 SORT yields the square root of a Real value SORT Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current square root computation When EN FALSE there is no computation IN Input REAL Must be greater th
35. USINT BYTE Quotient of the inputs in non zero Integer or Real data type INT UINT WORD Input and output must use the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL Output BOOL Enable out Applies only to LD programs Example ST Equivalence all01 ai102 aid 2 aid3 aol0O aod Radwell Automation Publication 2080 AVOIBENE Mib 2014 85 Chapter 5 Arithmetic instructions Where base is the first argument and exponent is the second argument EXPT EXPT yields the Real result of the following operation base exponent Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current exponent computation When EN FALSE there is no computation IN Input REAL Any signed Real value EXP Input DINT Integer exponent EXPT Output REAL IN EXP ENO Output BOOL Enable out EXPT function language examples Function block diagram Ladder diagram Structured text D an 29 ef 2zi exponent 3 3 result re EXFT in exponent 86 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 EXPT REAL EXPT REAL IM DINT EXP Exponent ST Equivalence tb_size ANY_TO_DINT EXPT 2 0 range Results ES Variable Monitoring Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 87 Chapter 5 Arithmetic instructio
36. Value MACRO ID Description 00 MC FB ERR The axis is in an operational state nothing to display NO 01 MC FB ERR The axis is not operational because an incorrect axis state was detected during a function WRONG STATE block execution Reset the state of the axis using the MC Reset function block 02 MC FB ERR The axis is not operational because an invalid axis dynamic parameter velocity acceleration RANGE deceleration or jerk is set in a function block Reset the state of the axis using the MC Reset function block In the function block correct any setting for the dynamic parameters that conflict with the settings on the Axis Dynamics configuration page 462 Radvell Automation Publication 2080 RVDOTBENE Mach 2014 Verchn 2014 Value 03 04 05 06 07 08 09 10 11 MACRO ID MC FB ER PARAM MC FB ER AXISNUM MC FB ER MECHAN MC FB ER NOPOWER MC FB ER RESOURCE MC FB ER PROFILE MC FB ER VELOCITY MC FB ER SOFT LIMIT MC FB ER HARD LIMIT Motion contol instructions Chapter 17 Description The axis is not operational because an invalid parameter other than velocity acceleration deceleration or jerk is set in a function block Reset the state of the axis using the MC_Reset function block In the function block correct the settings for the parameters such as mode or position Motion internal Fault Error ID 0x04 Contact your local Roc
37. and the rung conditions E 4 3 2 1 0 Behavior Set when the rung goes true and remains set until either the DN bit or the ER bit is set and the rung goes false Set when the communication buffer is allocated for the message request Cleared when the ST bit is set Set when the message has been transmitted and is waiting for a reply Cleared when the DN bit is set Set when message transmission fails An error code is written to ErrorlD The ER bit and error code values are cleared the next time the rung goes from false to true Set when the message is transmitted successfully The DN bit is cleared the next time the rung goes from false to true When the Done bit is set all other bits are cleared to indicate the MSG completed successfully When an error is detected and the Error bit is set the other status bits EN EW ST are not cleared CIPSTATUS error codes The following table describes the error codes that are displayed in the ErrorID and SubErrorID fields of the CIPSTATUS parameter when the ER bit is set Erol SubErroriD Error code description code 33 Parameter configuration related errors Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 ErroriD code 55 69 208 209 210 217 218 222 224 255 Parameter Gnmmuncation instructions Chapter 9 SubErrorlD Error code description 32 Bad Channel number 36 Unsupported CIP connection type 40 Unsupported CIP symbolic data type
38. by the control program and is also cleared by the HSC sub system whenever these conditions are detected e Low Preset Interrupt occurs e Underflow Interrupt occurs e Overflow Interrupt occurs LPCauselnter Parameter Data type HSC mode User program access 314 Radwell Automation Publication 2080 AVOIBENE Mib 2014 High SosediCounter HD instructions Chapter 14 Parameter Data type HSC mode User program access HSCSTS LPCauselnter BOOL 2 9 read write The Low Preset Interrupt status bit sets 1 when the HSC accumulator reaches the low preset value and the HSC interrupt is triggered This bit can be used in the control program to identify that the low preset condition caused the HSC interrupt If the control program needs to perform any specific control action based on the low preset this bit is used as conditional logic This bit can be cleared 0 by the control program and is also cleared by the HSC sub system whenever these conditions are detected E High Preset Interrupt occurs e Underflow Interrupt occurs ge Overflow Interrupt occurs PlsPosition Parameter Data type HSC mode User program access HSCSTS PLSPosition UINT 0 9 read only Error code sub element Bit 15 8 high byte Bit 7 0 low byte When the HSC is in Counting mode and PLS is enabled this parameter indicates which PLS element is used for the current HSC configuration ErrorCode Parameter Data type HSC mode User program access HSCSTS ErrorCo
39. e Only one MC Power function block should be issued per axis Using a different MC_ Power function block to control the same axis simultaneously will be rejected by the Motion Engine e When there is a Power On Off state switch for an axis the absolute axis position is not reset e Ifthe MC Power function block with Enable set to False is called the axis state goes to Disabled for every state including ErrorStop The MC Power function block can do the following e Power on the axis if Enable is set to True Power off the axis if Enable is set to False Arguments Parameter Parameter Data type Description type EN Input BOOL Function block enable When EN TRUE execute current MC Power computation When EN FALSE there is no computation Applies only to LD programs AxisIn Input AXIS REF See also AXIS REF data type on page 426 Enable Input BOOL When TRUE power is ON Enable Positive Input BOOL When TRUE motion direction is positive only Enable Negative Input BOOL When TRUE motion direction is negative only ENO Output BOOL Enable out Applies only to LD programs 456 Pockwell Automation Publication 2080 AVOOIBENE Marcn20t4 Vai 2014 Motion control instructions Chapter 17 Parameter Parameter Datatype Description type Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Status Output BOOL State of the power stage e When TRUE drive power on is done Busy Output BOO
40. max value value min value bounds the value to the min value max value ser Results ES Variable Monitoring O Global Variables Microg10 Local Variables D MI LD System Wark Logical alue PhysicalValue Lock E T BET T I m 3 KZ um Inz 10 KR DI Radwell Automation Publication 2080 HVDOIBENE Mib 2014 295 Chapter 13 Datamenipulation instructions MAX yields the maximum of two integer values MAX Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute maximum integer value computation When EN FALSE there is no computation IN1 Input DINT Any signed integer value IN2 Input DINT Cannot be Real MAX Output DINT Maximum of both input values ENO Output BOOL Enable out MAX function language examples Function block diagram Ladder diagram 296 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Datamenipulation instructions Chapter 13 Structured text 1 INi 3 ai INS ie 10 3 Maximum MAX IN1 INZ MAXI DINT MAX DINT IM1 DINT INZ Maximum ST Equivalence new value MAX MIN max value value min_value bounds the value to the min value max value set Results ES Variable Monitoring Radwell Automation Publication 2080 AVOIBENE Mib 2014 297 Chapter 14 High Speed Counter HSC instructions High speed counter instructions are used to
41. 1st boolean ENO output input output added False lt No Yes Yes No ACB Yes No Yes No True lt No Yes Yes Yes ACB Yes Yes Yes Yes Fall Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 Lat Diagram LD elements Chapter 3 EM EMO POU X KIK Example Enable input In some cases Enable parameters are required for instruction blocks that execute on call The following example shows an SUS instruction block with an Enable input Coil Coils are graphic components of an LD diagram that represent the assignment of an output or of an internal variable In an LD diagram a coil represents an action A coil must be connected on the left to a Boolean symbol such as a contact or to a Boolean output of an instruction block Consequently coils can only be added to a defined rung in the LD language editor After a coil is added its definition can be modified You can add the following coil element types to your LD program from the Toolbox Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 43 Chapter 3 Lader Diagram LD elements Coil element Description Direct coil on page 45 Direct coils support a Boolean output of a connection line Boolean state Reverse coil on page 45 Reverse coils support a Boolean output according to the Boolean negation of a connection line state Pulse rising edge coil on page Pulse rising edge or positive coils support a Boolean output of a connection li
42. 2014 Timer instructions Chapter 23 TOF Parameter IN PT ET TOF increases an internal timer up to a given value Arguments Parametertype Datatype Input BOOL Input TIME Output BOOL Output TIME TOF timing diagram IN Q a erT Description If falling edge starts increasing internal timer If rising edge stops and resets internal timer Maximum programmed time See Time data type If TRUE total time is not elapsed Current elapsed time Possible values range from Oms to 1193h2m47s294ms Note If you use the EN parameter with this block the timer starts incrementing when EN is set to TRUE and continues to increment even if EN is set to FALSE See Time data type TOF function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 591 Chapter 23 Timer instructions Ladder Diagram LD Structured Text ST 1 MaxTime TZ3s TOF In HaxTime output TOF 1 0 elapse TOF 1 ET me WW D TOF iff void TOF 1 BOOL IN TIME PT Type TOF Off delay timing Results ES Variable Monitoring Global Variables Micro Local Variables Unititled3T System Variables Micn Hame Logical Value PhysicalValue Lock gt gt mmi BOOL Max Tine T Has KK TIME Output i MAA BOOL elapse T 221 8ms N TIME UF 1 m T TOF Cancel 592 Radwell
43. 2014 561 Chapter 21 Real TmeCod RIO instructions RTC_READ reads the RTC preset and RTC information 5s i dry HTC READ RI READ RTC READ operation e When used with a Micro810 controller with embedded RTC RTCBatLow is always set to zero 0 e When the embedded RTC has lost its charge memory due to loss of power RTCEnabled is always set to zero 0 Arguments Parameter Parameter Data type Description type Enable Input BOOL Function block enable When Enable TRUE execute RTC information read When Enable FALSE there is no read operation and output RTC data is invalid RTCData Output RTC RTC data information yy mm dd hh mm ss week See RTC data type on page 394 RTCPresent Output BOOL TRUE RTC hardware is plugged in FALSE RTC hardware is not plugged in RTCEnabled Output BOOL TRUE RTC hardware is enabled timing FALSE RTC hardware is disabled not timing RTCBatLow Output BOOL TRUE RTC battery is low FALSE RTC battery is not low ENO Output BOOL Enable out Applies only to LD programs RTC_READ function block language examples Function Block Diagram FBD 562 Radwell Automation Publication 2080 AVOIBENE March 2014Vach 2014 Real TimeClock RIO instructions chapter 21 Ladder Diagram LD Structured Text 1 BTC READ ifenable a data re RTC READ 1 RTCData d present RTC READ 1 RTCPresent di enabled ETC READ 1 ETCEnabled 5 batlow ETC READ 1 R
44. 202 Communication instructions Rung Condition is TRUE Message requests added to this queue has buffer allocated and processed by communication task Maximum queue size is 4 Wait Queue Messages cannot added to the Com queue are added to this queue for later process No maximum limit EN bt x 1 Examine EN bt Set Clear DN ER ba ClearErmr code Add MSG to Wat Queue DNER D s Examine DuER b t Cancel 1 or Timeout 1 T Cancel 0and Timeout 0 Quewt successtul END Com queue Message requests added to the Com queue have a buffer allocated and processed by the communication task The maximum queue size limit is 4 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 CGommunication instructions Chapter 9 Wait queue Messages that cannot be added to the Com queue are added to the Wait queue to be processed at a later time The Wait queue does not have a maximum size limit MODBUSTARPARA data type The following table describes the MODBUSTARPARA data type Parameter Data type Description Addr UDINT Target data address 1 65536 Decreases by one when sending Node USINT The default slave node address is 1 The range is 1 247 Zero is the Modbus broadcast address and is only valid for Modbus write commands for example 5 6 15 and 16 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 203 Chapter 9
45. 2080 LC30 10QWB 2080 LC30 16AWB 2080 LC30 16QVB 2080 LC30 16QWB 2080 LC30 24QBB 2080 LC30 24QVB 2080 LC30 24QWB 2080 LC30 48A WB 2080 LC30 48QBB 2080 LC30 48QVB 2080 LC30 48QWB 2080 LC50 24A WB 2080 LC50 24QBB 2080 LC50 24QVB 2080 LC50 24QWB 2080 LC50 48A WB 2080 LC50 48QBB 2080 LC50 48QVB 2080 LC50 48QWB Radwell Automation Publication 2080 RVOOIBENE March 2014 Preface Connected Components Workbench includes configuration support for the 15 Preface These documents contain additional information concerning related Rockwell Additional Resources Automation products Resource Description Industrial Automation Wiring and Grounding Provides general guidelines for installing a Rockwell Guidelines publication 1770 4 1 available at Automation industrial system http literature rockwellautomation com idc grou ps literature documents in 1770 in041_ en p pdf Product Certifications website http www ab com Provides declarations of conformity certificates and other certification details You can view or download publications at http www rockwellautomation com literature To order paper copies of technical documentation contact your local Rockwell Automation distributor or sales representative 16 Radwell Automation Publication 2080 RVOOIBENE March 2014 Chapter 1 Finding information about instructions and ladder elements Connected Components Workbench includes a comprehensive instruction
46. 261 Chapter 11 Counter instructions CTU counts integers from 0 up to a given value 1 by 1 CTU Arguments Parameter Parameter type Data type Description CU Input BOOL Counting input counting when CU is a rising edge RESET Input BOOL Reset dominant command PV Input DINT Programmed maximum value Q Output BOOL Overflow TRUE when CV gt PV CV Output DINT Counter result CTU function block language examples Function Block Diagram FBD Ladder Diagram LD Structure Text I Maximumvalue 10 a CTU i cu reset NaximumnVvalue 262 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Ganter instructions Chapter 11 CTU if void CTU 1 BOOL CU BOOL RESET DINT PV Type CTU Up counter ST Equivalence CTU is an instance of CTU block CTU1 trigger NOT auto_mode 100 overflow CTUI1 0 result CTUI1 CV Results ES Variable Monitoring Hame Logical alue gt Masimu alue Counterh esult Cancel Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 263 Chapter 11 Counter instructions CTUD counts integers from 0 up to a given value 1 by 1 or from a given value CTUD down to 0 1 by 1 Arguments Parameter Parametertype Datatype Description CU Input BOOL Up counting when CU is a rising edge CD Input BOOL Down counting when CD is a rising edge RESET Input BOOL Reset dominant command CV 0 when RESET is TRUE
47. 3 e 8 for slot 4 e 9for slot 5 The number of characters that you want to read from the buffer maximum is 82 When this input is set to TRUE this function block does not execute If already executing operation ceases AWAAWT data type The following table describes the AWAAWT data type Description Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Parameter Channel Length Cancel Data type UINT UINT BOOL ASJ sral port instructions Chapter 6 Description Serial port number e 2 for the embedded serial port or e 5 9 for serial port plug ins installed in slots 1 through 5 e 5 for slot 1 e 6for slot 2 e 7 for slot 3 e 8forslot4 e 9for slot 5 The number of characters that you want to write to the buffer maximum is 82 Note If you set the Length to 0 AWA sends 0 bytes of user data and 2 bytes of appended characters to the buffer When this input is set to TRUE this function block does not execute If already executing operation ceases Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 133 Chapter 7 Binary instructions Binary instructions perform mathematical operations in which two elements are combined to yield a single result Operator Description AND MASK on page 136 Integer bit to bit AND MASK NOT MASK on page 138 Integer bit to bit negation NOT MASK OR MASK on page 140 Integer bit to bit OR MASK ROL on page 142 Rotate Left an in
48. 476 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 MC_Reset function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST DL Reset 1 xis1 Execute Reset Done Reset HC Reset 1 Done Busy Reset HC Reset 1 Busy Error Reset i MC Reset l Error ErrorID Reset re MC Reset 1 ErrorID Mc Reset 1g void MC Reseb 1 AxIS REF AxisIn BOOL Execute Type MC Reset Resets all internal axis related errors Radwell Automation Publication 2080 HVDOIBENE Mib 2014 477 Chapter 17 Motion control instructions Results System Variables Mall Name Logical Value Physical Value Lock E gt T gt r w 478 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 MC SetPosition Parameter EN AxisIn Execute Mbtion contro instructions Chapter 17 MC SetPostion shifts the coordinate system of an axis by manipulating the actual E y y g position of an axis with the same value without causing any movement Execute Positron Relative ML ExecutionMe MC_SetPosition operation e The MC_SetPostion function block can successfully complete only when the axis state is StandStill continuous Motion MC_ExecutionMode 0 or when the on going motion completes and ends with a StandStill state MC ExecutionMode 1 e The MC SetPosition function block operates the same as MC Home when the HomingMode
49. ARL function block 128 ASCII function 580 ASIN function 76 ASIN LREAL function 78 ATAN function 80 ATAN LREALfunction 82 AVERAGE function block 296 AWA function block 130 AWT function block 132 binary operations AND MASKfunction 140 NOT MASKfunction 142 OR MASKfunction 144 ROL function 146 ROR function 148 SHL function 150 SHR function 152 XOR_MASK function 154 boolean MUX4B function 178 MUX8B function 174 TTABLE function 170 boolean operations AND operator 165 F_TRIG function block 158 NOT operator 167 ORoperator 164 R_TRIG function block 160 RS function block 162 SR function block 168 XOR operator 166 branches forLD 39 inserting 39 610 calling function blocks 19 CHAR function 582 changing typesof 44 changing types ofinFBD 44 direct type 46 directtypeinFBD 46 inserting 44 insertinginFBD 44 parallel inserting 44 parallel inserting in FBD 44 pulse falling edge positive 47 pulse rising edge positive 47 reset 48 resetin FBD 48 reverse type 46 reverse typein FBD 46 set 48 setinFBD 48 usage and available types for FBD 44 usage and available types of 44 communications ABL function block 118 ACB function blocks 120 ACL function block 122 AHL function block 124 ARD function block 126 ARL function block 128 AWA function block 130 AWT function block 132 MSG CIPGENERIC function block 182 MSG CIPSYMBOLIC function block 191 MSG MODBUS function block 202 MSG MODBUS2 function block
50. Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Timer instructions Chapter 23 TON TON increases an internal timer up to a given value TON operation e Do not usea jump to skip over a TON function block in a Ladder Diagram LD If you do the TON timer will continue after the elapsed time e For example Rung 1 contains a jump rung 2 contains a TON function block with an elapsed time of 10 seconds enable the jump from rung 1 to rung 3 disable the jump after 30 seconds the elapsed time will be 30 seconds not 10 seconds as defined in the elapsed time Arguments Parameter Parameter type Data type IN Input BOOL PT Input TIME Q Output BOOL ET Output TIME TON timing diagram IN Q PT ET Description If rising edge starts increasing internal timer If falling edge stops and resets internal timer Maximum programmed time See Time data type If TRUE programmed time is elapsed Current elapsed time Possible values range from Oms to 1193h2m47s294ms Note If you use the EN parameter with this block the timer starts incrementing when EN is set to TRUE and continues to increment even if EN is set to FALSE See Time data type Radwell Automation Publication 2080 HVDOIBENE Mib 2014 593 Chapter 23 Timer instructions TON function block language examples Function Block Diagram FBD Structured Text ST i MaxTime THis 2 TON i1 in MaxTime gt B output
51. Automation Publication 2080 HVDOTBENE Mib 2014 Gmmuncation instructions Chapter 9 Micro830 wiring This example uses a Micro830 controller with a SERIALISOL module plugged into the first slot Channel 5 A single PowerFlex 40 is connected but the diagram below shows how to wire for multi drop Refer to the user manual for additional wiring information AK UO RJ45 TB2P is an RJ45 connector with 2 terminal blocks for R5485 communications Modbus Read example The following MSG_MODBUS instruction can be used to read status data from the PowerFlex 40 drive Drive status An 1807 indicates the drive is Radwell Automation Publication 2080 HVDOIBENE Mib 2014 245 Chapter 9 Communication instructions e Ready bit 0 ON e Active bit 1 ON e Commanded Forward bit 2 ON e Rotating Forward bit 3 ON e Status of some digital inputs on the drive A 278 indicates 27 8 Hz Refer to the PowerFlex user manual for additional information about Logic Status word bits error code descriptions commanded and actual speeds and other status codes MSG MODBUS Read configuration The following image shows the variable options for the MSG_MODBUS instruction block used to read status data from a PowerFlex 40 drive gf gt MSG MODBUS 1 MSG MODI Yar 7 De io MODBLIISLC Yar T D2 lcFa Channel LIINT Var Dz lcFg TriggerTvpe LISIMT Var De to cmd LISIMT Var Dz lcFa Elementcnt LITNT Var D T
52. Chapter 22 Stringmentoulation instructions MLEN yields the length of strings MLEN A Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE yield length of strings When EN FALSE no operation IN Input STRING Any string MLEN Output DINT Number of characters in the IN string ENO Output BOOL Enable out MLEN function language examples Function block diagram Structured text L number MLENf in HLENT DINT MLENGGTRING IM Get string length ST Equivalence nbchar MLEN complete string If nbchar 3 Then Return End if prefix LEFT complete string 3 582 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 String menioulation instructions Chapter 22 this program extracts the 3 characters on the left of the string and puts the result in the prefix string variable Nothing is done if the string length is less than 3 characters Results ES Variable Monitoring Hame Logical alue Physical Value e e e e abcdef HA In 5 3 Gm NENNEN DR CON ET Radwell Automation Publication 2080 HVDOIBENE Mib 2014 583 Chapter 22 Stringmentoulation instructions RIGHT Parameter EN Nbc RIGHT ENO 584 From the right ends of strings RIGHT yields the number of characters defined Arguments Parameter Type Input Input Input Output Output Data Type BOOL S
53. Chapter 9 Gammuncation instructions This section provides specific details and examples for using communication Us Ing the communication instructions in logic programs See the following topics for details of and examples m essage function blocks for using the MSG_CIPGENERIC and MSG_CIPSYMBOLIC function blocks to create programs Configuring object data values for explicit messaging MSG CIPGENERIC To use the MSG_CIPGENERIC function block for explicit messaging you will need to configure the AppCfg parameter with the correct values For additional information about message communication There are several sources of information covering the implementation and use of message communication including Connected Components Workbench Help user manuals and the Rockwell Automation Literature Library Information sources for message communication The following table lists additional sources of information relevant to message communication Information source Description How to find the information User manual for your specific Contains important information about messaging Connected Components Workbench Help communication device and specific information for configuring message menu function blocks EtherNet IP Adapter 22 COMM EFRN Provides information about the EtherNet IP objects Connected Components Workbench Help 1 xxx Appendix C that can be accessed using Explicit Messages menu EtherNet IP specification Defines the
54. Count Type Offset e Maximum of 80 characters e Field cannot be empty See Symbolic Read Write syntax on page 190 UINT Number of variable elements to Read Write e Valid values 1 490 e 1is used if the value is set to 0 User defined User defined data type for the target variable See Symbolic data type support on page 189 USINT Reserved for future use A byte offset of Read Write variable used to Read Write a large size variable that cannot be processed in one message e 0 OxFF Reserved for future use Symbolic data type support The following table lists the data types that the MSG_CIPSYMBOLIC function block supports Data type Data type value Description hexadecimal BOOL 193 0xC1 Logical Boolean with values TRUE 1 and FALSE 0 SINT 194 0xC2 Signed 8 bit integer value Radwell Automation Publication 2080 HVDOIBENE Mib 2014 189 Chapter 9 190 Communtcation instructions Data type INT DINT LINT USINT UINT UDINT ULINT REAL LREAL Symbol Variable Array Structure Data type value Description hexadecimal 195 0xC3 196 0xC4 197 0xC5 198 0xC6 Unsigned 8 bit integer value Signed 16 bit integer value 199 0xC7 Signed 32 bit integer value Signed 64 bit integer value Unsigned 16 bit integer value 0xC8 201 0xC9 202 OxCA 203 0xCB Unsigned 32 bit integer value Unsigned 64 bit integer value 32 b
55. DINT DINT DINT DINT DINT UDINT UDINT UDINT Data format word long word long word long word long word long word word long word long word User program access read write read write read write read write read write read write read write read write read write Description Defines the HSC mode Initial accumulator value High preset setting Low preset setting Overflow setting Underflow setting Out mask for output 32 bit output setting for High preset reaching 32 bit output setting for Low preset reaching HSCAppData parameter details HSCApp data type parameters are used to define HSC configuration data PLSEnable Parameter Data type Data format User program access HSCApp PLSEnable BOOL bit read write Enables and disables the High Speed Counter Programmable Limit Switch PLS function HSCApp settings versus PLSData settings When the PLS function is enabled relevant HSCApp settings are superseded by the corresponding PLSData settings as shown in the following table HSCApp setting PLSData setting HSCAPP HpSetting HSCHP HSCAPP LpSetting HSCLP HSCAPP HPOutput HSCHPOutput HSCAPP LPOutput HSCLPOutput HSCID Parameter Data type Data format User program access HSCApp HSCID UINT word read write Radwell Automation Publication 2080 HVDOIBENE Mib 2014 High SosediCounter HD instructions Chapter 14 Identifies the High Speed Counter to be used The following table lists the va
56. ENO to True Click OK To enable EN ENO for the block L After selecting a block in the Block Selector select EN ENO located at the bottom of the list 2 Inthe Block Selector after selecting at the bottom of the list of instructions select EN ENO lt fe Comparators Ta SS m sir rT 4 i J EN ENO Radwell Automation Publication 2080 AVOIBENE Mach nb 2014 41 Chapter 3 42 Lackr Diagram D elements Rung 1 Example Block LD Use of enable inputs and enable outputs in LD instruction blocks The rung state in an LD diagram is always boolean and a block s first input and first output is connected to the rung EN input EN output If a first boolean input or output is not present an EN and or an ENO parameter will be added to the block e Ifthe first block input is not boolean an EN input parameter is added to the block The instruction block is executed only when the EN input is TRUE e Ifthe first block output is not boolean an ENO output parameter is added to the block The ENO output always has the same state as the first input of the instruction block You can enable disable the EN ENO block settings for an individual instruction block in the Block Selector or in Block Settings for the Ladder Diagram LD program The following table describes the results of enabling and disabling the EN ENO parameters in the blocks shown in the illustration EN ENO Block 1st boolean EN input added
57. Ec MEN Di 05 While in debug mode you can see the values of the two HSC outputs STS MyStatus and HSCSTS MylInfo 1 Double click the IO EM DI 05 direct contact to display the Variable Selector window 2 Click the I O Micro830 tab and then click the IO EM DI 05 row 3 Select Lock and Logical Value to force the input to the ON position Radwell Automation Publication 2080 AVOIBENE Mib 2014 High GosedCounter HY instructions Chapter 14 E variable Monitoring Global Variables Micro830 Local Variables Untitled D1 System Variables Micro830 1 0 Micro 30 Defined Words C gtt e at e ef T gt e gt I0 EM DO 00 BODL ODEM DO 0t BODL JO EM D0 62 BODL JO EM DO 03 BODL I0 EM DU 04 BOOL JO EM DO 05 BOOL JO EM DG 06 POOL J0EM DO 07 BOOL _I0_EM_D0_08 BOOL ID EM D 08 BODL 0 EM DI 00 BOOL JO EM DO BOOL 10_EM_DI_02 BOOL JO EM DI 03 POOL JOLEM DIDA POOL IO EM DIS _10_EM_DI_06 I0_EM_DI_07 J0EM DL J EM DI 09 JO EM DI 10 0 EM DI 11 DEM DI 12 lO EM DI 13 To view results 1 Click the Local Variables tab to view variable changes 2 Expand MyAppData and MyInfo variable list 3 Turn on the encoder to see the counter count up down For example if the encoder is attached to a motor shaft chen turn on the motor to trigger the HSC count 4 Verify the Logical Value of in the MyStatus variable is 1 which indicates the HSC is running 5 View
58. FileName Type RCP Save Restore list of data to from SD Card Recipe file RCP status codes Status code Description 0 Recipe Idle status 1 Recipe Doing status 2 Recipe Complete Succeed status 3 Recipe Complete Error status RCP error codes The following table describes RCP error codes Error code Error Name 0 RCP_ERR_NONE 1 RCP ERR NO SDCARD 2 RCP ERR DATAFILE FULL 3 RCP ERR DATAFILE ACCESS SD card may be identified as a broken b full or c read only 4 RCP ERR CFG ABSENT 5 RCP ERR CFG ID 6 RCP ERR RESOURCE BUSY 7 RCP ERR CFG FORMAT 8 RCP_ERR_RESERVED Reserved for future possible expansion 9 RCP_ERR_UNKNOWN 10 RCP_ERR_DATAFILE_NAME 11 RCP_ERR_DATAFOLDER_INVALID 12 RCP_ERR_DATAFILE_ABSENT Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 391 Chapter 15 Inout Outout instructions Error code Error Name 13 RCP ERR DATAFILE FORMAT 14 RCP ERR DATAFILE SIZE Recipe data file size is too big gt 4kb 392 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 RI READ Parameter Enable RTCData RTCPresent RTCEnabled RTCBatLow ENO Input Output instructions Chapter 15 RTC_READ reads the RTC preset and RTC information 5s i dry HTC READ RTC READ operation e When used with a Micro810 controller with embedded RTC RTCBatLow is always set to zero 0 e When the embedded RTC has lost its charge memory due to loss of power RTCEnabled is always set to
59. Function ASIN LREAL on page 75 Function ATAN on page 77 Function 22 Radwell Automation Publication 2080 HVDDIBENE Verch2014Varch 2014 Finding information about instructionsand lecber elements Chapter 1 Instruction Instruction block type ATAN_LREAL on page 79 Function AVERAGE on page 288 Function block AWA on page 126 Function AWT on page 128 Function CHAR on page 570 Function COP on page 290 Function block COS on page 81 Function COS LREAL on page 83 Function CTD on page 260 Function CTU on page 262 Function CTUD on page 264 Function DELETE on page 572 Function DERIVATE on page 502 Function block Division on page 85 Operator DOY on page 600 Function Equal on page 252 Operator EXPT on page 86 Function FIND on page 574 Function F TRIG on page 154 Function block Greater Than on page 254 Operator Greater Than or Equal on page 255 Operator HSC on page 301 Function block HSC SET STS on page 321 Function block HYSTER on page 504 Function block IIM on page 363 Function block INSERT on page 576 Function INTEGRAL on page 506 Function block IOM on page 366 Function block IPIDCONTROLLER on page 535 Function block KEY READ on page 369 Function block LCD on page 346 Function LEFT on page 578 Function Less Than on page 256 Operator Less Than or Equal on page 257 Operator UM ARM on page 62 Function block LIMIT on page 524 Function Fockwell Automat
60. HSCAPP HSCMode To enable PLS l Inthe Project Organizer double click Local Variables to display the Variables page 2 Enable the PLS function e Inthe Initial Value field for the MyAppData PlsEnable variable select TRUE 3 Configure the underflow and overflow settings e Inthe Initial Value field for MyAppData OFSetting type 50 e Inthe Initial Value field for MyAppData UFSetting type 50 4 Configure the output mask if an output is to be used Results In this example the PLS variable has a dimension of 1 4 This means that the HSC can have four pairs of High and Low Presets Radwell Automation Publication 2080 AVOIBENE March nb 2014 341 Chapter 14 High SosediCounter HED instructions e High Presets should always be set lower than the OFSetting and the Low Preset should always be greater than the UFSetting e The HscHPOutPut and HscLPOutPut values will determine which outputs will be turned on when a High Preset or Low Preset is reached Data Type Dimension YT Initial Valoe e e Z H i IO Hsc USE JT rr e E 128 Example Programmable Limit Switch PLS enabled This topic describes the results when PLS is enabled using specific HSC and PLSData parameter values HSC parameter values This example assumes the following HSC parameters use these values 342 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 High GosediCounter HY instructions Chapter 14 e HSCApp
61. HSCHP and HSCLP defined in the PLS data become active e When the HSC counts to the new preset the new output data is written through the HSC mask e This process continues until the last element within the PLS data block is loaded e Atthat point the active element within the PLS data block is reset to zero e This behavior is referred to as circular operation Example How to create a High Speed Counter HSC program This example shows you how to create a High Speed Counter HSC program that uses a quadrature encoder and includes a Programmable Limit Switch PLS function Quadrature encoder used in the example The High Speed Counter program example uses an HSC function block and a quadrature counter with phased inputs A and B The quadrature encoder determines the direction of rotation and the position for rotating equipment such as a lathe The Bidirectional Counter counts the rotation of the quadrature encoder The following quadrature encoder is connected to inputs 0 and 1 The count direction is determined by the phase angle between A and B Radwell Automation Publication 2080 AVOIBENE March nb 2014 329 Chapter 14 High SpesdCauniier HED instructions e If A leads B the counter increments e IfBleads A the counter decrements Creating a High Speed Counter HSC program Perform the following tasks for to create build and test the HSC program and then add a PLS function No Task 1 Create a ladde
62. HSCSTS LP DINT read only The HSCSTS LP is the lower setpoint in counts that defines when the HSC sub system generates an interrupt The data loaded into the low preset must be greater than or equal to the data resident in the underflow HSCAPP UFSetting parameter or an HSC error is generated If the underflow and low preset values are negative numbers the low preset must be a number with a smaller absolute value This is the latest low preset setting which may be updated by PLS function from the PLS data block HPOutput Parameter Data type User program access Radwell Automation Publication 2080 HVDOIBENE Mib 2014 HghSpesdCaunter HD instructions Chapter 14 Parameter Data type User program access HSCApp HPOutput UDINT read write Defines the state 1 ON or 0 OFF of the outputs on the controller when the high preset is reached For more information on how to directly turn outputs on or off based on the high preset see OutputMask You can configure the high output bit pattern during initial setup or you can use the HSC function block to load the new parameters while the controller is operating LPOutput Parameter Data type User program access HSCApp LPOutput UDINT read write LPOutput HSCApp LPOutput defines the state 1 on 0 off of the outputs on the controller when the low preset is reached For more information on how to directly turn outputs on or off based on the low preset see OutputMask
63. IP configuration option Value IP address 192 168 1 19 Subnet Mask 255 255 255 0 Gateway address 192 168 1 1 Results The Internet Protocol options in your controller configuration page should look similar to the following image 240 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Gmmuncation instructions Chapter 9 M850 ContlrollerB 48QBB Bun Cormtrolier Mee Ge Ethermet nieme Protool eal MN Wessen intemal Protocol IP Settings Sena Port USB Part Obtain IP address autermaticalk using DHCP Ethernet amp Configure P address and setting Internat Pretec r Port Settings IP Address 132 168 1 19 Port Dagneosbcs Subnet Masc 255 255 255 0 Date end Time interrupts Gateway Addr 192 16 1 Startup Faults Modbus Mapping Embedded VO d Detect duplicate P address j Metin e Pla Bands x eee efting Te Caortieder Plug In Modules Create global variable for Controller B Follow these steps to create a Global variable for controller B 1 Inthe Project Organizer double click Global Variables to display the global variables selector 2 Click in the name column and type UDINT_ToA 3 Configure the remaining parameters Radwell Automation Publication 2080 HVDOIBENE Mib 2014 241 Chapter 9 Communication instructions e Verify the data type is UDINT e Type 123456789 in the Initial Value field e Verify the Read Write attribute is selected Results The Global Variables selector should lo
64. MMINFO Memory Module Information See MMINFO data type on page 377 ENO Output BOOL Enable out Applies only to LD programs MM_INFO function block language examples Function Block Diagram FBD Structured Text ST 1 MM INFO i enable 2 output MM INFO 1 MMInfo 376 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Input Output instructions Chapter 15 MM INFO 1j void MM INFO 1 BOOL Enable Type MI INFO Read memory module header information SCR Variable Monitoring Results Global Variables Microf10 Local Variables UntitledST System Variables Microf10 Hame Logical alue Physical V alue of ut ut enable d M AA output 3 output MM Catalog ei L1 output MM Catalog CatalogStr 2080 LCO output Seres output Frevisian output UF alid output ModeB ehayvior output Laad amp lwaus output LoadO ne rror output F aultLIverride output MM Present EE MM INFO 1 MM INFO 1 Enable ii INFO M ITE MMINFO data type The following table describes the MMINFO data type parameters Parameter Data type Description MMCatalog MMCATNUM The catalog number of the Memory Module Note When using the MM_INFO instruction on controllers with an SD card the MMCatalog is SD CARD Series UINT The series of the Memory Module Note When using the MM INFO instruction on controllers with an SD card the series is 0 Revision UINT The revision of the Memory Module Note
65. Maul ime THs TIME BOOL TIME ep N A output ca T 4583ms TP 1 T Tp elapse Radwell Automation Publication 2080 AVOIBENE Mib 2014 599 Chapter 23 Timer instructions DOY Parameter EN TimeA TimeB TimeC TimeD DOY 600 Arguments ParameterType DataType Input BOOL Input DOYDATA Input DOYDATA Input DOYDATA Input DOYDATA Output BOOL The DOY function has four channel inputs it turns on an output if the value of Real Time Clock RTC is in the range of the Year Time setting of any one of four channels If RTC is not present the output is always off DOY operation Configure any of the Time input parameters with valid ranges as specified in the DOYDATA Data Type table If TimeX Enable is set to TRUE and an RTC is present and enabled an invalid value will fault the controller Description Function enable When EN TRUE perform the function When EN FALSE do not perform the function Year Time Setting of Channel A See DOYDATA data type on page 601 Year Time Setting of Channel B See DOYDATA data type on page 601 Year Time Setting of Channel C See DOYDATA data type on page 601 Year Time Setting of Channel D See DOYDATA data type on page 601 If TRUE the value of the real time clock is in the range of the Year Time setting of any one of the four channels DOY instruction language examples Function block diagram Radwell Automation Publication 2080 AVOIBENE
66. OutputMask 31 e HSCApp HSCMode 0 e HSC controls Embedded Output 0 4 only PLSData parameter values This example assumes the PLSData parameters for the variable HSC_PLS are configured as shown in the following figure PLS enabled results For this example the following events will occur Radwell Automation Publication 2080 AVOIBENE March 2014Vach 2014 343 Chapter 14 344 High Speed Counter HEC instructions e When the ladder logic first runs HSCSTS Accumulator 1 which means all the outputs are turned off e When HSCSTS Accumulator 250 HSC_PLS 1 HSCHPOutput is sent through the HSCAPP OutputMask and energizes outputs 0 and 1 e Sending the high preset output throught the output mask repeats as the HSCSTS Accumulator reaches 500 750 and 1000 and the controller energizes outputs 0 2 0 3 and 0 4 respectively e After the full operation completes the cycle resets and repeats from HSCSTS HP 250 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Chapter 15 Input Output instructions Input Output instructions read or write data to or from a controller or a module using signals sent to a device that is physically connected to a programmable logic controller Input relays transfer signals to the internal relays and output relays transfer signals to external output devices Function LCD on page 346 LCD BKLT REM on page 349 LCD REM on p
67. Publication 2080 HVDOIBENE Mach 2014Verch 2014 InputCutput instructions Chapter 15 TRIMPOT READ Parameter Enable TrimPotlD TrimPotValue Sts ENO TRIMPOT_READ reads one Trimpot current value Datatype Description Arguments Parameter type Input BOOL Input UINT Output UINT Output UINT Output BOOL Function block enable When Enable TRUE execute Trimpot read When Enable FALSE there is no read operation and output Trimpot value is invalid The ID of the Trimpot to be read See Trimpot ID definition on page 402 Current trimpot value The read operation status See Trimpot operation status values on page 402 Enable out Applies only to LD programs TRIMPOT function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 401 Chapter 15 Inout Outout instructions Structured Text ST 1 TRIMPOT READ ifenable ID n e value TRIMPOT READ 1 TrimPotValue 3 l status TRIMPOT READ 1 5ts TRIMPOT READ 1g void TRIMPOT READ 1 BOOL Enable UINT TrimPotID Type TRIMPOT READ Read the Trimpot value From a specific Trimpat Trimpot ID definition The following table describes the Trimpot ID definition Output selection Bit Description Trimpot ID definition 15 13 Module type of trimpot e 0x00 Embedded e x01 Expansion e 0x02 Plug in Port 12 8 Slot ID of the module e 0x00 Embedded e 0x01 0x
68. Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Processcontro instructions Chapter 18 STACKINT Parameter PUSH POP R1 IN N EMPTY OFLO OUT STACKINT manages a stack of integer values STACKINT operation The STACKINT function block includes a rising edge detection for both PUSH and POP commands The maximum size of the stack is 128 The OFLO value is valid only after a reset R1 has been set to TRUE at least once and back to FALSE The application defined stack size N cannot be less than 1 or greater than 128 STACKINT manages invalid values as follows e ifN lt 1 STACKINT assumes a size of 1 e if N I28 STACKINT assumes a size of 128 Arguments Parameter type Data type Description Input BOOL Push command on rising edge only Adds the IN value on the top of the stack Input BOOL Pop command on rising edge only Deletes the last value pushed to the top of the stack Input BOOL Resets the stack to its empty state Input DINT Pushed value Input DINT Application defined stack size Output BOOL TRUE if the stack is empty Output BOOL Overflow TRUE if the stack is full Output DINT Value at the top of the stack OUT equals 0 when OFLO is TRUE STACKINT function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 519 Chapter 18 Processcontro instructions Ladder Diagram LD Structured Text ST i
69. Significant bit ENO Output BOOL Enable out SHR function language examples Function block diagram 148 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Binary instructions Ladder diagram Structured text 1 in zs 125 2 E nhs 2 2 a output SHR in nbsi SHEM DINT SHR CINT IN DINT NBS Shift Fight ST Equivalence result SHR register 1 register 2 1100_1101_0011_0101 result 240110 0110 1001 1010 Results SCR Variable Monitoring Global Variables MieroB1O Local Variables RA_SHR_LD 5 vstem Var P Logical Value PhysicalValue Lock E ge get c gt in 123 N A TS BI nbs 2 N A E Bj out LE ie ok area Radwell Automation Publication 2080 AVOIBENE Mib 2014 Chapter 7 Binary instructione Integer exclusive OR bit to bit mask XOR MASK returns inverted bit values XOR MASK Arguments Parameter Parameter DataType Description Type EN Input BOOL Function enable When EN TRUE perform the exclusive OR bit to bit mask computation When EN FALSE there is no computation IN Input DINT Must have integer format MSK Input DINT Must have integer format XOR_MASK Output DINT Bit to bit logical Exclusive OR between IN and MSK ENO Output BOOL Enable out XOR_MASK language examples Function block diagram Ladder diagram Structured text 1 in t 5 2i mask 6 3 XorMask ZOR_MASK in mask 150 Radwell Automation P
70. SpesdCauntier FES instructions HSC Interrupt properties The HSC Interrupt properties status bits indicate the enabled disabled status the execution status and whether or not the interrupt condition is lost User Interrupt Enable HSCO Enabled Parameter Data format HSC modes User program access HSCO Enabled bit 0 9 read only Enabled bit is used to indicate HSC interrupt enable or disable status User Interrupt Executing HSCO EX Parameter Data format HSC modes User program access HSCO Ex bit 0 9 read only The EX User Interrupt Executing bit is set 1 whenever the HSC sub system begins processing the HSC subroutine due to any of the following conditions e Low preset reached e High preset reached e Overflow condition count up through the overflow value e Underflow condition count down through the underflow value The HSC EX bit can be used in the control program as conditional logic to detect if an HSC interrupt is executing The HSC sub system will clear 0 the EX bit when the controller completes its processing of the HSC subroutine User Interrupt Pending HSCO PE Parameter Data format HSC modes User program access HSCO PE bit 0 9 read only The PE User Interrupt Pending status flag indicates an interrupt is pending The PE status bit can be monitored or used for logic purposes in the control program if you need to determine when a subroutine cannot be immediately executed The PE bit is maintained b
71. TRUE EN bit is set Message execution is enabled All other bits are cleared 2 Message control buffer is acquired At this time input data that is the EW bit is set data parameter for write messages is copied for transmission Subsequent changes to the input data will not be reflected in the transmitted message 3 Message transmission starts EW bit is cleared ST bit is set 4 Message response is received ST bit is cleared DN bit is set 5 Rung condition goes FALSE EN bit is cleared Timing diagram for Rung TRUE 214 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Communtation instructions Chapter 9 i i IN l doo 40 01 Lot d 3 c1 c L o3 8 i EN i i i EW ST i i l DN d ne i i l l d i x h ea d n3 ta afin m Message execution process Rung FALSE The following process diagram describes the message instruction events that occur when the Rung condition is True Radwell Automation Publication 2080 HVDOIBENE Mib 2014 215
72. UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING BOOL TRUE if i1 lt i2 Less than lt operator ST language example ST Equivalence aresult 10 lt 25 aresult is TRUE mresult ze z lt B mresult is FALSE IL equivalence LD 10 LT 29 ST aresult LD Es LT B ST mresult Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Carpare instructions Chapter 10 Less than or equal Parameter EN 01 For Integer Real Time Date and String values Less Than or Equal compares input values to determine whether the first is less than or equal to the second Special recommendations For TON TP and TOF equality testing of Time values is not recommended Arguments Parameter Type Data Type Description Input BOOL Function enable When Enable TRUE execute the input comparison When Enable FALSE there is no comparison Applies only to LD programs Input SINT USINT BYTE INT UINT All inputs must be the same data type The Time input WORD DINT UDINT DWORD applies to the ST LD and FBD languages LINT ULINT LWORD REAL LREAL TIME DATE STRING Input SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output BOO
73. and the Off delay timer is not starting the elapsed time ET remains at the on delay PT value If the Programmed Off delay time is elapsed and the Off delay timer is not starting the elapsed time ET remains at the off delay PTOF value until the rising edge occurs again Note If you use the EN parameter with this block the timer starts incrementing when EN is set to TRUE and continues to increment even if EN is set to FALSE See Time data type TONOFF function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 595 Chapter 23 Timer instructions Ladder Diagram LD Structured Text ST d OnDelay re TZ3s 2 OffDelay T 5s 3 TONOFF ifin OnDelay OffDelay 4 output TONOFF 1 0 5 elapse TONOFF 1 ET void TONDFF 1 BOOL IN TIME PT TIME PTOF Type TOMOFF Delay an outouk onttrue then delay an autput aFF False Results 596 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Timer instructions Chapter 23 Variable Monitoring Hame OnDelay TH3s TIME DIfD elay TH5s e TIME output M BOOL elapse T 1 sbl ms MA TIME TONOFF_1 7 TONOFF Variable Monitoring gf mee TIME LI ffDielau La output BOOL elapse TH1s445ms TIME CT g TONOFF Radwell Automation Publication 2080 HVDOIBENE Mi
74. arguments Parameter Data type type Input BOOL Input BOOL Input BOOL Input USINT Input STRING Output USINT Output UDINT Output BOOL Description Function block enable When EN TRUE execute current RCP computation When EN FALSE there is no computation Applies only to LD programs Function block read write enable On Rising Edge Enable switches from 0 to 1 the function block executes with the precondition that the last operation has completed TRUE write to SD Card FALSE Recipe read from SD Card Recipe configuration VA ID index Recipe data file name which is operated in the recipe folder in SD card maximum 30 characters length Recipe function block current status See RCP status codes on page 391 Error ID if RCP Read Write fails See RCP error codes on page 391 Enable out Applies only to LD programs Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 389 Chapter 15 Input Cutput instructions RCP function block language examples Function Block Diagram FBD error ID REP Ta a mE za Exin RITE ETTOTIL LAXE LEE eit Structured Text ST 390 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Input Output instructions Chapter 15 1 RCP 1 EN Enable RWFlag CfgID FileName 2 output RCP 1 ENO zr Status RCP 1 Status 4 error ID RCP RCP 1 ErrorID RCP 1X void RCP_1 BOOL Enable BOOL RW Flag USINT CfgID STRING
75. block TOF on page 591 TON on page 593 TONOFF on page 595 TP on page 598 Function DOY on page 600 TDF on page 603 TOW on page 605 Chapter 23 Timer instructions Timer instructions are used to control operations based on time Description Off delay timing On delay timing Delay turning on an output on a true rung and then delay turning off the output on the false rung Pulse timing Description Turn on an output if the value of the real time clock is in the range of the Year Time setting Compute the time difference Turn on an output if the value of the real time clock is in the range of the Time of Week setting Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 589 Chapter 23 Timer instructions Ti t ti Time accuracy refers to the time between the moment the processor enables a Imer instruction timer instruction and the moment the processor completes the timed interval configuration The processor uses the following information from the timer instruction e Timer The timer control address in the timer area of data storage e Time Base Determines how the timer operates e Preset Specifies the value that the timer must reach before the processor sets the done bit e Accumulated value The number of time increments the instruction has counted When enabled the timer updates this value continually 590 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch
76. disconnected or an IP address cannot be detected Data type STRING 80 USINT UDINT UDINT CIPTARGETCFG data type The following table describes the CIPTARGETCFG data type Description Path for the target A maximum of two hops can be specified The path syntax is e lt port gt lt node slot address gt 2 See also Target path for CIP messaging on page 184 CIP Connection type e 0 Unconnected default e lass3 connection See also CIP EIP message connections on page 185 Unconnected message timeout in milliseconds The amount of time to wait for a reply for unconnected messages including connection establishment for connected message e Valid values 250 10 000 e Set to 0 to use the default value of 3000 e A value set to less than 250 will be set to 250 minimum e Avalue set to greater than 10 000 will be set to 10 000 maximum See also CIP message timeout timers on page 186 Class3 Connection timeout in milliseconds The amount of time to wait for a reply for connected messages The connection closes when the timeout expires e Valid values 800 10 000 e Set to 0 to use the default value of 3000 e A value set to less than 800 will be set to 800 minimum e Avalue set to greater than 10 000 will be set to 10 000 maximum See also CIP message timeout timers on page 186 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Parameter Data type ConnClose BOOL String element Local p
77. errors not related to the Motion control function blocks MC ReadAxisError operation e When an axis is in a Disabled state the MC ReadAxisError function block may or may not get a non zero Error ID for the axis as a Disabled axis can contain errors or be error free e When the Enable input of the MC ReadAxisError function block is set to False the Error ErrorID and AxisErrorID outputs are all reset to False or 0 Arguments Parameter Data type Description type Input BOOL Function block enable When EN TRUE execute current MC ReadAxisError computation When EN FALSE Error ErrorID and AxisErrorlD are reset to False or 0 Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE gets the value of the parameter continuously Output BOOL Enable out Applies only to LD programs Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Output BOOL When TRUE indicates the function block is active and new output values are expected Output BOOL When TRUE the function block is not finished Output BOOL When TRUE an error was detected Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 Parameter Parameter Data type Description type ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 AxisErrorlD Outpu
78. for gt operator For TON TP and TOF equality testing of Time values is not recommended Arguments Parameter Data Type Description Type Input BOOL Function enable When Enable TRUE execute the input comparison When Enable FALSE there is no comparison Applies only to LD programs Input SINT USINT BYTE INT All inputs must be the same data type The Time input applies to the ST UINT WORD DINT UDINT LD and FBD languages DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Input SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output BOOL TRUE if i1 gt i2 gt operator ST language example ST Equivalence aresult 10 gt 25 aresult is FALSE mresult ab gt ab mresult is TRUE Radwell Automation Publication 2080 HVDOIBENE Mib 2014 255 Chapter 10 Carpare instructions Less than Parameter EN 01 256 Parameter Type Input Input Input Output For Integer Real Time Date and String values Less Than compares input values to determine whether the first is less than the second Arguments Data Type Description BOOL Function enable When Enable TRUE execute the input comparison When Enable FALSE there is no comparison Applies only to LD programs SINT USINT BYTE INT All inputs must be the same data type UINT WORD DINT
79. from OutGain to j My Gains 15 Observe the controller is updated with the with the tuned gain parameter Fockvell Automation Publication 2080 RVDOTBENE Mah 2014Verch 2014 549 Chapter 20 Proportional Integral Derivative PD instruction Using a Structured Timing Interrupt STI with auto tuning Although a PID instruction works if it is not controlled by a Structured Timing Interrupt STI using an STI increases the auto tune success rate because the auto tune will operate on a fixed cycle Interupt T ope STID STI Description Program Farameters Auto Start Set Pont Example IPIDController with auto tune The following example program is shows the variables used to configure the parameters for auto tuning Auto tune parameters The following table describes the variables that are used with each parameter in the example to configure auto tuning 550 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Input parameters Variable AutoMode Initialize My Gains My Gains DirectActing My Gains ProportionalGain My Gains Timelntegral My Gains TimeDerivative My Gains DerivativeGain AutoTune ATParameters Load Deviation Step ATDynaSet ATReset Output parameters Parameter AbsoluteError Poportional Integral Derivative PD instruction Chapter 20 Parameter Description Auto The operation mode of the PID controller TRUE controller runs in normal mode FA
80. i 6 3 OrMask OR MASK in mask 140 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Binary instructions OR MASE DINT OR MASK DINT IN DINT MSK Analog bit to bit OR mask ST Equivalence parity OR_MASK xvalue 1 makes value always odd result OR_MASK 16 abc 16 f0f equals 16 fbf Results ES Variable Monitoring Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 Chapter 7 141 Chapter 7 Binary instructione For 32 bit integers ROL rotates integer bits to the left ROL Jee Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the rotate bits left integer value computation When EN FALSE there is no computation IN Input DINT Integer value NbR Input DINT Number of 1 bit rotations in set 1 31 ROL Output DINT Left rotated value When NbR lt 0 no change occurs ENO Output BOOL Enable out ROL function language examples Function block diagram Ladder diagram 142 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Structured text 1l in i 123 2 nbr re 2 3 rotation EOL Ip nbr j ROLY DINT ROL DINT IN CINT Wor Rotate Left ST Equivalence result ROL register 1 register 2 0100_1101_0011_0101 result 2 1001_1010_0110_1010 Results W Variable Monitoring Radwell Au
81. in FBD 50 division operator 88 DOY function 612 E equaloperator 258 EXPT function 90 F F_TRIG function block 158 FBD Function Block Diagram coils usage and available types of 44 contacts usage and available types of 49 direct coils 46 direct contacts 50 instruction blocks inserting 41 jumps to labels inserting 53 pulse rising edge positive contacts 51 reset coils 48 returns inserting 52 reverse coils 46 reverse contacts 51 rungs inserting 37 set coils 48 FIND function 586 function blocks ABL 118 ACB 120 ACL 122 AHL 124 ARD 126 ARL 128 AVERAGE 296 AWA 130 AWT 132 calling 19 COP 298 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 611 Index 612 CTD 268 CTU 270 CTUD 272 DERIVATE 512 F TRIG 158 HSC 309 HSC SET STS 329 HYSTER 514 IIM 372 inserting in Function Block Diagrams 41 INTEGRAL 516 IOM 375 IPIDCONTROLLER 547 KEY READ 378 LIM ALRM 64 MC AbortTrigger 438 MC Halt 441 MC Home 445 MC MoveAbsolute 450 MC MoveRelative 455 MC MoveVelodty 459 MC Power 464 MC ReadAxisError 469 MC ReadBoolParameter 475 MC ReadParameter 479 MC ReadStatus 482 MC Reset 487 MC SetPosition 490 MC Stop 494 MC TouchProbe 498 MC WriteBoolParameter 503 MC WriteParameter 507 MMINFO 385 MSG CIPGENERIC 182 MSG CIPSYMBOLIC 191 MSG MODBUS 202 MSG MODBUS2 209 PLUGIN INFO 388 PLUGIN READ 391 PLUGIN RESET 394 PLUGIN WRITE 396 R TRIG 160 RS 162 RTC READ 401 RTC SET 404
82. in input input slot is 1 2 3 4 5 Plug in slot number starting with left most slot 1 Sts Output USINT Immediate input scan status See IIM status codes on page 364 ENO Output BOOL Enable out Applies only to LD programs IIM function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 367 Chapter 15 368 InputCutput instructions Structured Text ST 1 enable TRUE InputType D B J InputS5lot re 0 4 IIH i enable InputType Inputsalot 5 output IIM 1 5t8 void Uh LOBOoOL Enable USINT InputType USINT InputSlot Type IM Update inputs prior to normal input scan Results ER Variable Monitoring Global Variables Microg30 Local Variables Untitled3T System Variable Hame Logical V alue Physical Y alue 7t gt pE InputTupe 0 VES Inputs lot 0 WA output BA IM T Cancel IOM status codes The following table describes the codes that are used to indicate the output scan status of the IOM function block Status code Description 0x00 Not enabled no action taken 0x01 Input output scan success 0x02 Input output type invalid 0x03 Input output slot invalid Radwell Automation Publication 2080 HVDOIBENE Mib 2014 InputCutput instructions Chapter 15 KEY READ Parameter Enable CKYL EKYL CKY EKY UKY DKY LKY RKY KEY READ reads key status on the optional LCD
83. instruction is not finished BOOL TRUE When error occurs FALSE No error Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Gmmuncation instructions Chapter 9 Parameter Parameter Datatype Description type ErrorlD Output UINT Show the error code when message transfer failed See Modbus2 error codes on page 206 SuberrorlD Output UINT Used to verify status bits Bit 0 EN Enable Bit 1 EW Enable Wait Bit 2 ST Start e Dit 3 ER Error e Dit 4 DN Done Other bits are reserved StatusBits Output UINT Sub Error code value when Error is TRUE When a MSG is triggered or re triggered a previously set SubErrorlD is cleared MSG_MODBUS2 function block language examples Function Block Diagram FBD Ladder Diagram LD Radwell Automation Publication 2080 AVOIBENE Mib 2014 205 Chapter 9 Communtation instructions Structured Text ST MSG MODBUS2 l in cancel lc tc la output MSG HODBUS2 1 09 error M5G MODBUS2 1 Error ID re MSG MODBUS2 1 ErrorID MSG MODBUS2 A void M t MODIS IOC IN BOCH Cancel MODBLIS2IOCPARA LocalCfg MODBLISZTARPARA TargebtClg MODBUSLOC Type i ka MODBLISZ Send modbus message Modbus2 error codes The following table describes error codes for the MSG_MODBUS2 function block Error code Error description 3 The value of the TriggerType has been changed from 2 255 20 The local communication driver is incom
84. is not physically connected to the controller or the wiring is incorrect e Serial port settings are other than what is required for the Remote LCD Connection error May occur when there is an internal state machine error Possibly caused by an incompatibility between Controller FW version and RLCD FW version Invalid color code Invalid mode Reserved Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 351 Chapter 15 Input Cutput instructions LCD REM LCD REM function block can be used in a program to display user strings on the Remote LCD when it is present and connected This function block is only supported by the Micro820 LCD REM operation e LCD REM is supported for Micro820 controllers only LCD REM arguments Parameter Parameter Data Description type type Enable Input BOOL Function block enable When Enable TRUE remote LCD switches to user defined screen from IO status screen When Enable FALSE remote LCD switches back to 1 0 status screen 352 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Parameter Font Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line8 LCD REM Sts Parameter Data type type Input UDINT Input String Input String Input String Input String Input String Input String Input String Input String Output BOOL Output UINT Inout Outout instructions Chapter 15 Description Value of the startup message font size Valid val
85. is valid on Micro820 2080 LC20 20QBB controllers only and only one PWM channel is supported thru the embedded output channel 6 PWM operation PWM is supported for Micro820 controllers only PWM arguments Parameter Data Description type type Input BOOL Function block enable Input Input Input Input BOOL USINT String USINT When EN TRUE execute current computation When EN FALSE there is no computation Turns on or off the PWM output When TRUE turns on the PWM output Overwrites with new configuration if the PWM channel is already on When FALSE turns off the PWM output Frequency in Hz e 1 5000 Duty Cycle e 0 1000 0 100 Channel Type e Embedded e Plugin e 2 Expansion Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Parameter ChSlot ChNum Sts ENO Teen ec KZ uer LNT LNT UINT Parameter type Input Input Output Output Data type UINT UINT UINT BOOL Processcontrol instructions Chapter 18 Description Channel Slot e 0 Embedded Channel Number e 0 PWMCHO For 2080 LC20 20QBB embedded output pin 6 is used as PWM CHO Function block execution status See PWM status codes on page 514 Enable out Applies only to LD programs PWM function block language examples Function Block Diagram FBD enable on 1 frequency cycle type Pil slot PwM num PWM sts Ladder Diagram
86. its parent program the execution of the parent program is suspended until the function ends Main program Function Function Defining function and parameter names The interface of a function must be explicitly defined with a type and a unique name for each of its calling input parameters or return output parameters A function has one return parameter The value of a return parameter for a function block is different for each programming language FBD LD ST Function names and function parameter names can use up to 128 characters Function parameter names can begin with a letter or an underscore followed by letters numbers and single underscores Function blocks A function block is an instruction block that has input and output parameters and works on internal data parameters It can be written in Structured Text Ladder Diagram or Function Block Diagram languages Radwell Automation Publication 2080 RVO0IBENE Mach 2014 March 2014 19 Chapter 1 Finding information about instructionsand ladder elements 20 Item No o 00 O Instruction block format An instruction block is represented by a single rectangle and has a fixed number of input connection points and output connection points An elementary instruction block performs a single function Item Description Block name The name of the function to be performed by the instruction block is written inside its rectangle shape at the top Input E
87. loop back 127 x x x address e For CIP Serial specify the target s node address The supported value is 1 Local port of the 1st Target Local port used to send out the message The following table lists example values used in a target path string and describes 2nd Target address Target address of the 2nd hop Target path example the results for each string String example Results 0 0 The target device is the local device 6 1 Through Port 6 Micro830 UPM Serial port reach the Node at 1 4 192 168 1 100 4 192 168 1 100 1 0 Through Port 4 Micro850 embedded Ethernet port reach the Node at 192 168 1 100 Through Port 4 Micro850 embedded Ethernet port reach the Node at 192 168 0 100 Logix ENET module From ENET module through the Backplane port Port 1 reach the Logix controller at Slot 0 CIP EIP message connections A maximum of 16 CIP class 3 and 16 EIP connections are supported for client message execution The following table describes the CIP EIP connection behavior Scenario Message request is enabled and CipConnMode 1 Message request is enabled CipConnMode 1 and the message s local port is Ethernet Message request is enabled CipConnMode 0 and the message s local port is Ethernet Message execution is completed and ConnClose is set to True Message execution is completed and ConnClose is set to False Results If a connection to the target does not exist a CIP connection is es
88. module KEY READ operation The KEY READ function block is available for Micro810 controllers only Arguments Parametertype Datatype Input Output Output Output Output Output Output Output Output BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Description Function block enable When Enable TRUE execute LCD read When Enable FALSE there is no read operation TRUE ESC key pressed for more than 2 seconds TRUE OK key pressed for more than 2 seconds TRUE ESC key pressed TRUE OK key pressed TRUE Up key pressed TRUE Down key pressed TRUE Left key pressed TRUE Right key pressed KEY_READ function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 369 Chapter 15 Input Cutput instructions Ladder Diagram LD 370 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Inout Outout instructions Chapter 15 Structured Text ST 1j KEY READ l enable 2j ekyl KEY READ 1 CEYL 3 ekyl KEY READ 1 EKYL 4i cky KEY READ 1 CKY 5 eky zs KEY READ 1 EEY 6 uky KEY READ 1 UKY 7i dky KEY READ 1 DET 8i lky KEY READ 1 LKY 3 rky KEY READ 1 REY KEY READ 1 void KEY READ 1 BOOL Enable Type KEY READ Read key status on option LCD module ST Equivalence KEY READ 1 KEYENABLE KEY EKYL KEY READ l EKYL KEY CKY KEY READ l CKY KEY EKY KEY REA
89. objects to be included in every CIP ODVA web site http www odva org device Identity object Messsage Router object and the Network object Micro800 Programmable Controllers Provides quickstart instructions for using CIP Rockwell Automation Literature Library Getting Started with CIP Client GENERIC and CIP Symbolic Messaging in Micro830 Messaging and Micro850 programmable logic controllers PLC Accessing user manuals and quickstart guides To access quickstart guide from the Help Menu 1 Onthe Help menu click View Help 2 Double click on Connected Components Workbench 3 Double click on Getting Started with Connected Components Workbench 220 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Communication instructions Chapter 9 To access drive manuals from the Help menu 1 On the Help menu click User Manuals to display the Manuals dialog box 2 Click the plus sign next to Drives to expand the category and then expand the class until you locate your manual 3 Double click the manual name to open the pdf file To access the EtherNet IP manual from the Help menu 1 On the Help menu click User Manuals to display the Manuals dialog box 2 Click the plus sign next to Drives to expand the category and then expand the PowerFlex 4 class Peripherals class 3 Double click the 22 COMM E EtherNet IP Adapter User Manual to open the pdf file To access manuals from the Rockwell Automation Literatur
90. on page 516 SR on page 164 STACKINT on page 519 SUS on page 528 SYS INFO on page 398 TOF on page 591 TON on page 593 TONOFF on page 595 TP on page 598 TRIMPOT READ on page 401 Functional category Input Output instructions on page 345 Communication instructions on page 177 Input Output instructions on page 345 Boolean instructions on page 153 Input Output instructions on page 345 Process control instructions on page 501 Boolean instructions on page 153 Process control instructions on page 501 Program control instruction on page 527 Input Output instructions on page 345 Timer instructions on page 589 Input Output instructions on page 345 Fall Automation Publication 2080 AVOIBENE Mib 2014 Finding information about instructionsand lecber elements Chapter 1 Functions The following table lists the functions by functional category Instruction Functional category ABS on page 66 Arithmetic instructions on page 65 ACOS on page 68 ACOS LREAL on page 70 AND MASK on page 136 Binary instructions on page 135 ASCII on page 568 String manipulation instructions on page 567 ASIN on page 73 Arithmetic instructions on page 65 ASIN LREAL on page 75 ATAN on page 77 ATAN_LREAL on page 79 CHAR on page 570 String manipulation instructions on page 567 COS on page 81 Arithmetic instructions on page 65 COS LREAL on page 83 DELETE on page 572 Stri
91. operator ST language example ST Equivalence bres tres mres ANY_TO_LWORD true ANY TO LWORD t 0s46ms gt ANY TO LWORD 0198 bres is 1 tres is 46 mres is 198 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO REAL converts a value to a Real value ANY TO REAL Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When Enable TRUE execute the conversion to the Real computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT BYTE INT Any value other than Real UINT WORD DINT UDINT DWORD LINT ULINT LWORD LREAL TIME DATE STRING o1 Output REAL A real value ENO Output BOOL Enable out Applies only to LD programs ANY TO REAL operator ST language example ST Equivalence bres ANY TO REAL true bres is 1 0 tres ANY TO REAL t 1s46ms tres is 1046 0 ares ANY TO REAL 198 ares is 198 0 Radwell Automation Publication 2080 AVOIBENE Mib 2014 277 Chapter 12 Data conversion instructions ANY_TO_SINT Parameter EN 01 ENO 278 ANY TO SINT converts a value to a Short Integer value Arguments ParameterType DataType Description BOOL Function enable When Enable TRUE execute the conversion to the 8 bit Short Integer computation
92. or alphabet to change the output status Note Toreadinput strings containing special characters correctly input the string characters after the program containing the function block instance is online Function Description ASCII on page 568 Character gt ASCII code CHAR on page 570 ASCII code Character DELETE on page 572 Delete sub string FIND on page 574 Find sub string INSERT on page 576 Insert string LEFT on page 578 Extract left of a string MID on page 580 Extract middle of a string MLEN on page 582 Get string length REPLACE on page 586 Replace sub string RIGHT on page 584 Extract right of a string Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 567 Chapter 22 Stringmentoulation instructions ASCII yields the ASCII code for characters in strings ASCII d i Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE display the ASCII code for characters When EN FALSE no display operation IN Input STRING Any non empty string Pos Input DINT Position of the selected character in set 1 len len is the length of the IN string ASCII Output DINT Code of the selected character in set 0 255 yields 0 is Pos is out of the string ENO Output BOOL Enable out ASCII function language examples Function block diagram Ladder diagram 568 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulatio
93. program The table following the diagram describes the events that occur when the control program runs Sequence of events for temperature control program The following table identifies the components in the temperature control system and describes in sequence the events that occur in the system when the temperature control program runs Description Sends the MV to the PWM On Off Pulse Width Modulation PWM temperature Solid state relay that controls the heating element controller Heating element Increases temperature in the control zone Resistance temperature detector RTD Measures the temperature in the control zone and sends the PV RTD signal to the controller Controller input PLC program input Receives the PV RTD signal Converts the PV RTD signal to the same unit as the SP degrees Celsius and determines the difference between the PV and the SP and adjusts the MV according to the parameter values defined in the P and D parameters Radwell Automation Publication 2080 HVDOIBENE Mib 2014 555 Chapter 20 Proportional Integral Derivative PD instruction Example Function block diagram to control temperature This function block diagram shows the predefined and user defined function blocks used in the application to control temperature in a control zone Example How to create an IPIDController program to control water supply level The water supply level control program example
94. program access BOOL 0 9 read write Detects if an error is present in the HSC sub system Configuration errors are the most common types of error represented by the ErrorDetectedr When the bit is set 1 look at the specific error code in parameter HSCSTS ErrorCode which is maintained by the controller You can clear the ErrorDetected bit when necessary CountUpFlag Data type HSC mode User program access BOOL 0 9 read only Used with all of the HSCs modes 0 9 If the HSCSTS CountEnable bit is set the Count Up bit is set 1 If the HSCSTS CountEnable is cleared the Count Up bit is cleared 0 CountDownFlag Data type HSC mode User program access BOOL 2 9 read only Radwell Automation Publication 2080 AVOIBENE Mi nb 2014 311 Chapter 14 312 High SpesdCauntier FES instructions Parameter HSCSTS Mode1Done Parameter HSCSTS OVF Parameter HSCSTS UNF Parameter HSCSTS CountDir Used with the bidirectional counters modes 2 9 If the HSCSTS CountEnable bit is set the Count Down bit is set 1 If the HSCSTS CountEnable bit is clear the Count Down bit is cleared 0 Mode1Done Data type HSC mode User program access BOOL 0or 1 read write The HSC sub system sets the HSCSTS ModelDone status flag to 1 when the HSC is configured for Mode 0 or Mode 1 behavior and the accumulator counts up to the High Preset value OVF Data type HSC mode User program access BOOL 0 9 read write The HSC
95. programs Axis output is read only in LD programs See also AXIS REF data type on page 426 When TRUE commanded distance reached When the In Position input is enabled for an axis the In Position signal must be set to active before Done True When TRUE the function block is not finished When TRUE indicates that the function block has control on the axis Command is aborted by another command or Error Stop When TRUE an error was detected Error identification See also Motion control function block error IDs on page 424 MC MoveRelative function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 447 Chapter 17 Motion control instructions Ladder Diagram LD Structured Text ST 448 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Motion control instructions Chapter 17 Distance Relative 100000 0 Velocity Relative 300 0 Acceleration Relative re 100 0 Deceleration Relative 100 0 Jerk Relative re 100 0 HC MoveRelative l Axisl Execute Relative Distance Relative Velocity Relative Acceleration Relative Deceleration Relative Jerk Relative ButtNode Relative Done Relative MC MoveRelative 1 Done Busy Helative re HC MoveRelative 1 Busy Active Relative NC MHoveRelative 1 Active CommandAbort Relative re MC MoveRelative 1 Commandaborted Error Relative MC NoveRelative 1 Error ErrorID Re
96. rung is enabled HSC command results The following table describes the results of issuing HSC commands in different Command value Result HscCmd 1 HscCmd 4 reset Parameter PLSEnable HSCID situations Conditions Starts the HSC mechanism and the HSC Setting the Enable input parameter to False does not stop transitions to running mode counting while in running mode HscCmd 2 must be issued to stop counting The HSC mechanism automatically updates HSC AppData Accumalator is updated with HSC Sts Accumulator values Sets the HSC Acc value to the HSC HscCmd 4 does not stop HSC counting AppData Accumalator value If HSC is counting when HscCmd 4 is issued some counting may be lost To set a specific value to HSC Acc while counting write the value to HSC AppData Accumalator immediately before HscCmd 4 is issued HSCAPP data type HSCAppData data type HSCAPP is used to configure the HSC application HSCAppData parameters The following table lists the HSCAppData parameters Datatype Dataformat User program Description access BOOL bit read write Enable or disable the Programmable Limit Switch PLS UINT word read write Defines the HSC Radwell Automation Publication 2080 AVOOIBENE March 2014Vach 2014 303 Chapter 14 304 High Santer 80 instructions Parameter HSCMode Accumulator HPSetting LPSetting OFSetting UFSetting OutputMask HPOutput LPOutput Data type UINT
97. set with structures and arrays development environments for ladder logic structured text function block diagram and user defined function block programs Additionally Connected Components Workbench includes user interface configuration tools for Micro800 controllers PowerFlex drives a Safety Relay device PanelView Component graphic terminals and serial and network connectivity options Instruction set For information about a specific instruction including a description parameter details and language examples locate the instruction from the table of contents or from the following reference topics Ladder Diagram elements For a description of the ladder elements used in Connected Components Workbench see the following section Radwell Automation Publication 2080 RVOOIBENE March 2014 17 Chapter 1 Finding information about instructionsand ladder elements Instruction blocks Item No o 0 0 O 18 The Connected Components Workbench instruction set includes IEC 61131 3 compliant instruction blocks Instruction blocks collectively include operators functions and function blocks e Operators on page 18 e Functions on page 18 e Function blocks on page 19 Operators An operator is a basic logical operation such as arithmetic boolean comparator or data conversion Functions Functions have one or more input parameters and one output parameter Instruction block format An instructio
98. slave device is busy Negative acknowledge A memory parity error A non standard reply The channel has been shut down MODBUSLOCPARA data type The following table describes the MODBUSLOCPARA data type parameters Description Micro800 PLC serial port number 2 for the embedded serial port or 5 9 for serial port plug ins installed in slots 1 through 5 for slot 1 6 for slot 2 7 for slot 3 8 for slot 4 9 for slot 5 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 199 Chapter 9 Gammuncation instructions Parameter Data type Description TriggerType USINT Represents one of the following 0 Msg Triggered Once when IN goes from False to True 1 Msg triggered continuously when IN is True Other value Reserved Cmd USINT Represents one of the following 01 Read Coil Status Oxxxx 02 Read Input Status 1xxxx 03 Read Holding Registers 4xxxx 04 Read Input Registers 3xxxx 05 Write Single Coil Oxxxx 06 Write Single Register 4xxxx 15 Write Multiple Coils Oxxxx 16 Write Multiple Registers 4xxxx Others See MODBUSLOCPARA custom command support ElementCnt UINT Limits 200 For Read Coil Discrete inputs 2000 bits For Read Register 125 words For Write Coil 1968 bits For Write Register 123 words MSG_MODBUS message triggering A Modbus message can be triggered periodically by setting a non zero value to the Trigger Type parameter The following table describ
99. stopped the input parameters will continue to update and any changes made using the HSC SET STS function block will be ignored Description Function block enable When Enable TRUE set reset the HSC status When Enable FALSE there is no HSC status change Manually sets ore resets the HSC status Mode 1A or 1B counting is done High preset reached This bit can be reset to FALSE when HSC is not counting Low preset reached This bit can be reset to FALSE when HSC is not counting Overflow occurred This bit can be reset to FALSE when necessary Underflow occurred This bit can be reset to FALSE when necessary See HSC Status codes STS on page 320 Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 321 Chapter 14 High SpesdCaunter HU instructions Parameter Parameter Datatype Description type ENO Output BOOL Enable out Applies only to LD programs HSC_SET_STS function block language examples Function Block Diagram FBD Ladder Diagram LD 322 Radwell Automation Publication 2080 AVOIBENE Mib 2014 High GosediCounter HY instructions Chapter 14 Structured Text ST i Hoc SET STs l enable hid mid hpr lpr ofo uta 2 Sts Ze HOC SET STS L psen Radwell Automation Publication 2080 AVOIBENE March 2014Vach 2014 323 Chapter 14 High SpesdCauntier ED instructions Using the High Speed Counter instructions 324 This section provides specific detai
100. sub system sets the HSCSTS OVE status flag to 1 whenever the accumulated value HSCSTS Accumulator has counted through the overflow variable HSCAPP OFSetting This bit is transitional and is set by the HSC sub system It is up to the control program to use track and clear 0 the overflow condition Overflow conditions do not generate a controller fault UNF Data type HSC mode User program access BOOL 0 9 read write The HSC sub system sets the HSCSTS UNF status flag to 1 whenever the accumulated value HSCSTS Accumulator has counted through the underflow variable HSCAPP UFSetting This bit is transitional and is set by the HSC sub system It is up to the control program to use track and clear 0 the underflow condition Underflow conditions do not generate a controller fault CountDir Data type HSC mode User program access BOOL 0 9 read only The HSC sub system controls the HSCSTS CountDir status flag When the HSC accumulator counts up the direction flag is set to 1 Whenever the HSC accumulator counts down the direction flag is cleared 0 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 HghSpesdCaunter HD instructions Chapter 14 If the accumulated value stops the direction bit retains its value The only time the direction flag changes is when the accumulated count reverses This bit is updated continuously by the HSC sub system whenever the controller is in a run mode HPRe
101. support americas phone_en html or contact your local Canada Rockwell Automation representative New Product Satisfaction Return Rockwell Automation tests all of its products to ensure that they are fully operational when shipped from the manufacturing facility However if your product is not functioning and needs to be returned follow these procedures United States Contact your distributor You must provide a Customer Support case number call the phone number above to obtain one to your distributor to complete the return process Outside United States Please contact your local Rockwell Automation representative for the return procedure Documentation Feedback Your comments will help us serve your documentation needs better If you have any suggestions on how to improve this document complete this form publication RA DU002 available at http www rockwellautomation com literature Rockwell Otomasyon Ticaret A S Kar Plaza Is Merkezi E Blok Kat 6 34752 I erenk y Istanbul Tel 90 216 5698400 www rockwellautomation com Power Control and Information Solutions Headquarters Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 2496 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Middle East Africa Rockwell Automation NV Pegasus Park De Kleetlaan 12a 1831 Diegem Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asia Pacific Rockwell Automation Level 14 Core F Cyberport 3 100 Cyberport Ro
102. the axis The axis can be reset to normal motion operation without stopping the controller operation Value MACRO ID Description 00 MC_FB_ERR_ The function block execution is successful NO 01 MC FB ERR The function block cannot execute because the axis is not in the correct state Check the axis state WRONG STATE 424 Fockvell Automation Publication 2080 AVOOIBENE Maren2014Vardatt4 Value 02 03 04 05 06 07 08 09 0A 0B MACRO ID MC_FB_ERR_ RANGE MC_FB_ERR_ PARAM MC_FB_ERR_ AXISNUM MC_FB_ERR_ MECHAN MC_FB_ERR_ NOPOWER MC_FB_ERR_ RESOURCE MC_FB_ERR_ PROFILE MC_FB_ERR_ VELOCITY MC_FB_ERR_ SOFT_LIMIT MC_FB_ERR_ HARD_LIMIT Motion contol instructions Chapter 17 Description The function block cannot execute because there is invalid axis dynamic parameter s velocity acceleration deceleration or jerk set in the function block Correct the setting for the dynamic parameters in the function block against Axis Dynamics configuration page The function block cannot execute because there is invalid parameter other than velocity acceleration deceleration or jerk set in the function block Correct the setting for the parameters for example mode or position for the function block The function block cannot execute because the axis does not exist the axis configuration data is corrupted or the axis is not correctly configured The function block cannot execute becaus
103. the counter value in MyInfo Accumulator Tip See HSC status codes STS on page 320 for the complete list of status codes Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 339 Chapter 14 High SpesdCaunter D instructions Results In this example once MyInfo Accumulator reaches a High Preset value of 40 output 0 turns on and the HPReached flag turns on If MyInfo Accumulator reaches a Low Preset value of 40 output 1 turns on and the LPReached flag turns on as well gt Waridabhk Horni oriri og og S Gsese s Add a Programmable Limit Switch PLS function This example shows you how to add a Programmable Limit Switch PLS function to the HSC program 340 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 High SosediCounter HD instructions Chapter 14 Variable values for the counter settings e MyAppData PlsEnable is used to enable or disable the PLS settings It should be set to FALSE disabled if the MyAppData variable is used e MyAppData HscID is used to specify which embedded inputs will be used based on the mode and application type See HSC Inputs and Wiring Mapping to know the different IDs that can be used as well as the embedded inputs and its characteristics e IfID 0Ois used ID 1 cannot be used on the same controller because the inputs are used by Reset and Hold e MyAppData HscMode is used to specify the type of operation the HSC will use to count See HSC Mode
104. underscore followed by letters numbers and single underscores Radwell Automation Publication 2080 RVDOIBENE March 2014 March 2014 21 Chapter 1 Finding information about instructionsand ladder elements The following table lists the instruction set available in Connected Components Instruction set in workbench in alphabetical order alphabetical order Instruction Instruction block type ABL on page 114 Function block ABS on page 66 Function ACB on page 116 Function block ACL on page 118 Function block ACOS on page 68 Function ACOS LREAL on page 70 Function Addition on page 72 Operator AHL on page 120 Function block AND on page 161 Operator AND MASK on page 136 Function ANY TO BOOL on page 268 Function ANY TO BYTE on page 269 Function ANY TO DATE on page 270 Function ANY TO DINT on page 271 Function ANY TO DWORD on page 272 Function ANY TO INT on page 273 Function ANY TO LINT on page 274 Function ANY TO LREAL on page 275 Function ANY TO LWORD on page 276 Function ANY TO REAL on page 277 Function ANY TO SINT on page 278 Function ANY TO STRING on page 279 Function ANY TO TIME on page 280 Function ANY TO UDINT on page 281 Function ANY TO UINT on page 282 Function ANY TO ULINT on page 283 Function ANY TO USINT on page 284 Function ANY TO WORD on page 285 Function ARD on page 122 Function block ARL on page 124 Function block ASCII on page 568 Function ASIN on page 73
105. void PLUGIN READ 1 BOOL Enable UINT SlotID UINT Addroffset UINT DataLength USINT 1 1 Dataarray UINT ADI DataArray Type PLUGIN READ Read data from a generic PLUGIN module PLUGIN READ status codes The following table describes status codes for the PLUGIN READ function block Status code Status description 0x00 Function block not enabled no operation 0x01 Plug in operation success Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 383 Chapter 15 Inout Outout instructions Status code Status description 0x02 Plug in operation fails due to an invalid Slot ID 0x03 Plug in operation fails since it is not a valid Plug in Generic module 0x04 Plug in operation fails due to data operated out of range 0x05 Plug in operation fails due to a data access parity error 384 Fockvell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 PLUGIN RESET PLUGIN_RESET resets any Plug in Generic Module hardware except ES 2080 MEMBAK RTC modules After the hardware reset the Plug in Generic Module is ready for configuration and operation Arguments Parameter Parameter Datatype Description type Enable Input BOOL Function block enable When Enable TRUE execute Plug in reset When Enable FALSE there is no reset operation SlotID Input UINT Plug in slot number Slot ID 1 2 3 4 5 s
106. was successfully written When TRUE indicates the function block has control of the axis When TRUE an error was detected Error identification See also Motion control function block error IDs on page 424 MC_WriteParameter function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 497 Chapter 17 Motion control instructions 498 Ladder Diagram LD MC E ErrorlD Structured Text ST ParameterNumber WriteParameter ur Value WriteParameter 90000 0 Ho WriteParameter 1j xisi Execute WriteParameter ParameterNumber WriteParameter Value WriteParameter MC ExecutionMode WriteParameter Done WriteParameter HC WriteParameter 1 Done Busy WriteParameter HC WriteParameter 1 Busy Error WriteParameter HC WriteParameter 1 Error ErrorID WriteParameter i HC WriteParameter 1l ErrorID NC WriteParameter iff void MC WriteParameter 1 AxIS REF AxisIn BOOL Execute DINT ParameterNumber REAL Value SINT MC_ExecutionMode Type MC WrteParameter Modifies the value af a motion specific REAL parameter Results Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 rm Radwell Automation Publication 2080 HVDOIBENE Mib 2014 499 Function block DERIVATE on page 502 HYSTER on page 504 INTEGRAL on page 506 PWM on page 512 SCALER on page 516 STACKINT on page 51
107. 0 MC Stop on page 483 Description Abort function blocks which are connected to trigger events Controls the power stage ON or OFF Describes general axis errors Returns the value of a vendor specific parameter of type BOOL Returns the value of a vendor specific parameter Returns the status of the axis Resets all internal axis related errors Shifts the coordinate system of an axis by manipulating the actual position Records the axis position at a trigger event Modifies the value of a vendor specific parameter of type BOOL Modifies the value of a vendor specific parameter Stop the axis under normal operating conditions Commands the axis to perform the search home sequence Commands a controlled motion to a specified absolute position Commands a controlled motion of a specified distance relative to the actual position at the time of the execution Commands a never ending controlled motion at a specified velocity Commands a controlled motion stop Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 417 Chapter 17 Motion control instructions The general rules for the Micro800 motion control function blocks follow the General rules for motion PLCopen Motion control specifications The following table provides general control function blocks rules about the interface of motion control function blocks Rule applies to Rule Input parameters With Execute The parameters are used with the rising edge of
108. 014 107 Chapter 5 Arithmetic instructions TAN LREAL calculates the tangent of a Long Real value TAN LREAL s g Arguments Parameter Parameter Data Description Type Type EN Input BOOL Function enable When EN TRUE perform current computation When EN FALSE there is no computation IN Input LREAL Cannot be equal to PI 2 modulo Pl TAN LREAL Output LREAL Tangent of the input value 1E 38 for invalid input ENO Output BOOL Enable out TAN LREAL function language examples Function block diagram Ladder diagram Structured text l ih s 0 5 zr TanLreal TaN LREAL in TAN LEEALJI LREAL TAM LREAL LREAL IN Perform 64 bit real tangent calculation ST Equivalence tangent TAN_LREAL angle result ATAN_LREAL tangent result is equal to angle 108 Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 Results Variable Monitoring Global Variables Mot Logical v alue PhysicalValue Lock E E e e Radwell Automation Publication 2080 HVDOIBENE Mib 2014 109 Chapter 5 Arithmetic instructions TRUNC truncates Real values leaving just the integer TRUNC Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE perform the truncation of Real value computation When EN FALSE there is no computation IN Input REAL Any Real value TRUNC Output REAL If IN
109. 014 49 Chapter 3 50 Lader Diagram D elements The state of the connection line on the right of the contact is the logical AND between the state of the left connection line and the Boolean negation of the value of the variable associated with the contact Example Reverse Contact Pulse Rising Edge Contact Pulse rising edge or positive contacts support a Boolean operation between a connection line state and the rising edge of a Boolean variable LC d wS Left Right connection connection The state of the connection line on the right of the contact is set to TRUE when the state of the connection line on the left is TRUE and the state of the associated variable rises from FALSE to TRUE The state is reset to FALSE in all other cases Example Pulse Rising Edge Contact Recommendation Restrict the use of output variables with edge contacts We recommend you do not use outputs or variables with a Pulse rising edge contact positive or a Pulse falling edge contact negative These contacts are for physical inputs in a ladder diagram If you need to detect the edge of a variable or an output we recommend you use the R_TRIG F_TRIG function block which is supported and works in any language at any location in your program Pulse Falling Edge Contact Pulse falling edge or negative contacts support a Boolean operation between a connection line state and the falling edge of a Boolean variable LC i iN Left Right co
110. 014Vach 2014 365 Chapter 15 Input Cutput instructions IOM Parameter Enable OutputType OutputSlot Sts ENO 366 IOM executes an immediate embedded output data update without waiting for the automatic output scan Arguments Parameter type Input Input Input Output Output Data type BOOL USINT USINT USINT BOOL Description Function block enable When Enable TRUE execute function When Enable FALSE do not execute function Type of output 0 Embedded output 1 Plug in output Output slot For embedded output always 0 For Plug in output output slot is 1 2 3 4 5 Plug in slot number starting with left most slot 1 Immediate output scan status See IOM status codes on page 368 Enable out Applies only to LD programs IOM function block language examples IIM executes an immediate input instruction to update the input data without having to wait until the beginning of the next input scan InputType InputSlot Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 Arguments Parameter Parameter type Data type Description Enable Input BOOL Function block enable When Enable TRUE execute function When Enable FALSE do not execute function InputType Input USINT Type of input 0 Embedded input 1 Plug in input InputSlot Input USINT Input slot For embedded input always 0 For Plug
111. 080 HVDOIBENE Mach 2014Vach 2014 527 Chapter 19 Prograncontol instruction SUS suspends the execution of the Micro800 controller The controller remains SUS in RUN mode but execution is suspended indefinitely Suspend catches User Program errors and aids in User Program debugging Place the SUS instruction in User Program sections where you want to trap unusual conditions In suspend mode RUN LED is set to OFF to indicate the program scan is Idle Arguments Parameter Parameter type Data type Description Enable Input BOOL Function block enable When Enable TRUE execute function When Enable FALSE do not execute function SuslD Input UINT Suspension ID ENO Output BOOL Enable out Applies only to LD programs SUS function block language examples Function Block Diagram FBD Structured Text ST 1 SusID 1 2 SUS lienable SusID 528 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Programcontrol instruction Chapter 19 aU ii void SUS 1 BOOL Enable LIIMT SusIC Type SUS Suspend the execution of the application Results Variable Monitoring gt gi enable ee SuslD ud SUS 1 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 529 Chapter 20 Proportional Integral Derivative PID instruction The Proportional Integral Derivative PID instruction is used to control the process more accurately using PID functionality Function block Description IPIDCON
112. 1 Address offset of the first data to be written calculating from the first byte of the Plug in Generic Module The number of bytes to be written Data to be written to the Plug in Generic Module See PLUGIN_READ status codes on page 383 Enable out Applies only to LD programs PLUGIN_WRITE function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 387 Chapter 15 Input Cutput instructions Ladder Diagram LD Structured Text ST 1 PLUGIN WRITE ifenable ID ao dl daj Ste i PLUGIN WRITE 1 5ts5 PLUGIN WRITE 1l void PLUGIN WRITE 1 BOOL Enable UINT SlotID LIINT AddrOffset UINT DataLength USINT 1 1 DataArray UINT ADI DataArray Type PLLIGIM WRITE Write data bo a generic PLUGIN module 388 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 RCP Parameter EN Enable RWFlag CfglD RcpName Status ErrorlD ENO Recipe C Function Block can be used to read a variable s data value from the recipe data file which exists in the recipe data file folder of SD card and update the value to the run time engine The Recipe C Function Block can be used to write the variable value with the run time engine into the recipe data file in the SD card CiglD FileName RCP operation RCP is supported for Micro820 controllers only RCP
113. 14 What isa High Speed Counter canonas tnan 300 BAS EN 301 FSCO Valles estes depende eI c EUM MA eer 302 Feds PAA as ye Gran Ora ater RS eee ee 303 Radwell Automation Publication 2080 AVOOIBENE March 2014 7 Table of Contents Input Output instructions EISCSTS data yo eener 310 PSG Aba EUDE e errato pt aD obe tuse 318 HASC status E 320 HSC SET CU B NN EAER 321 Using the High Speed Counter instructions eeeeees 324 Updating HSC application ata cueste petat bere 324 High Speed Counter HSC User Interrupt dialog box 324 Configuring High Speed Counter HSC user interrupts 324 Add and configure a High Speed Counter HSC User Interrupt 325 Configuring a Programmable Limit Switch PLS 328 Example How to create a High Speed Counter HSC program 329 Add a Programmable Limit Switch PLS function 340 Example Programmable Limit Switch PLS enabled 342 Chapter 15 EC Dix QUE DI Ma n Ds n 346 EE 349 LCD_BKLT_REM SEtUSCO06Sucin E tud modu tuU BE 351 CD EEN 352 ECD REM status cod6esoo ueniet lectins cence eel ae enema each 356 RHC onis iiie ips eun O Ri Cen cud oou uad uti dus Gun ON s d dn ten Cad ON DU d 357 du ger TS 359 bip cre 360 PEG status CO CS nog aiti dudo t et ete ih a autc t 361 BIER 362 UM RE 363 TUNE SSAC SC OES E 364 LOM pr
114. 1F ID of Expansion Module e 0x01 0x05 ID of Plug in Port 7 4 Trimpot type e x00 Reserved e 0x01 Digital Trimpot Type 1 LCD Module 1 e 0x02 Mechanical Trimpot Module 1 3 0 Trimpot ID inside the module e 0x00 0x0F Embedded e 0x00 0x07 ID of Trimpot for Expansion e 0x00 0x07 ID of Trimpot for Plug in Port The trimpot ID starts from 0 Trimpot operation status values The following table describes Trimpot operation status values Status value Status description 0x00 Function block not enabled no read write operation 0x01 Read write operation success 402 Fockvell Automation Publication 2080 RVDOTBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 Status value Status description 0x02 Read write operation fails due to an invalid Trimpot ID 0x03 Write operation fails due to an out of range value Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 403 Function STIS on page 406 UIC on page 408 UID on page 410 UIE on page 412 UIF on page 414 Chapter 16 Interrupt instructions Interrupt instructions are used to signal the processor that an event needs attention Usually the interrupt signal is used for high priority conditions that require interruption of the current code the processor is executing Description Start the STI timer from the control program rather than starting automatically Clears specific user interrupt Disable specific user interrupt
115. 2014Vach 2014 359 Chapter 15 Inout Outout instructions The Data Logging Function Block can be used to write variable values from the DLG run time engine into a Data Logging File on an SD Card Important When writing to a data log a maximum of 50 group folders are allowed per day Each group folder has a maximum of 50 files with a file size of 4k 8k DLG operation D DLG is supported for Micro820 controllers only DLG arguments Parameter Parameter Datatype Description type Enable Input BOOL Datalogging write enable If Rising Edge Enable is triggered from False to True data logging function block Will execute if the previous FB operation is completed TSEnable Input BOOL Date and time stamp logging enable flag CfgID Input USINT Data logging configuration VA ID number from 1 10 ENO Output BOOL Enable out Applies only to LD programs Status Output USINT Data logging function block current status See DLG status codes on page 361 ErrorlD Output UDINT FB error code refer to Data logging FB error ID See DLG error codes on page 362 DLG function block language examples Function Block Diagram FBD 360 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 Ladder Diagram LD Structured Text ST li DLG 1 EN Enable TSEn CfgID 2j output DLG 1 ENO ai status DLG 1 5tatus z ID DLG 1 ErrorID DLG 1 void DLG 1 BOOL Enable BOO
116. 209 comparison operations equal operator 258 greater than operator 260 greater than or equal operator 261 less than operator 262 less than or equal operator 264 notequaloperator 265 contacts changing type of 49 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Index direct 50 directin FBD 50 inserting 49 parallel inserting 49 pulse falling edge positive 52 pulse rising edge positive 51 pulse rising edge positive in FBD 51 reverse 51 reverseinFBD 51 usage and available types in FBD of 49 usage and available types of 49 COP function block 298 COS function 84 COS LREAL function 86 counter CTD function block 268 CTU function block 270 CTUD function block 272 CTD function block 268 CTU function block 270 CTUD function block 272 D data conversion ANY TO BOOL operator 276 ANY TO BYTEoperator 277 ANY TO DATEoperator 278 ANY TO DINT operator 279 ANY TO DWORD operator 280 ANY TO INToperator 281 ANY TO LINT operator 282 ANY TO LREALoperator 283 ANY TO LWORD operator 284 ANY TO REALoperator 285 ANY TO SINT operator 286 ANY TO STRING operator 287 ANY TO TIME operator 288 ANY TO UDINT operator 289 ANY TO UINT operator 290 ANY TO ULINT operator 291 ANY TO USINT operator 292 ANY TO WORD operator 293 data manipulation AVERAGE function block 296 COP function block 298 MAX function 304 MIN function 302 DERIVATE function block 512 direct coils 46 coils in FBD 46 contacts 50 contacts
117. 28 function blocks The ACL on page 118 function block was aborted The channel configuration mode was changed ABLACB data type The following table describes the ABLACB data type Data type Description UINT Serial port number e 2forthe embedded serial port or e 5 9 for serial port plug ins installed in slots 1 through 5 e 5 for slot 1 e 6for slot 2 e 7 forslot 3 e 8 for slot 4 e 9for slot 5 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Parameter TriggerType Cancel Parameter Channel RXBuffer TXBuffer Parameter DTRstatus DCDstatus DSRstatus RTSstatus CTSstatus Data type USINT BOOL Data type UINT BOOL BOOL Data type UINT UINT UINT UINT UINT ASJ sral port instructions Chapter 6 Description Represents one of the following e 0 Msg Triggered Once when IN goes from False to True e 1 Msg triggered continuously when IN is True e Other value Reserved When this input is set to TRUE this function block does not execute ACL data type The following table describes the ACL data type Description Serial port number e 2forthe embedded serial port or 5 9 for serial port plug ins installed in slots 1 through 5 5 for slot 1 6 for slot 2 7 for slot 3 8 for slot 4 e Oforslot 5 Clears the receive buffer when set to TRUE and removes the receive ASCII function blocks ARL and ARD from the ASCII queue Clears the tra
118. 41 inserting in Function Block Diagrams 41 parallel inserting 41 setting typeof 41 instructions 33 41 INTEGRAL function block 516 interrupt STIS function 414 UlCfunction 416 UID function 418 UIE function 420 UIF function 422 IOM function block 375 IPIDCONTROLLER function block 547 jumps for LD diagrams 53 Function Block Diagram inserting 53 Ladder Diagrams inserting 53 Rungs inserting 37 K KEY READ function block 378 keyboard shortcuts LD language 59 labels Rungs inserting 37 Ladder Diagram LD instructions 33 language 33 language Ladder Diagram LD 33 LCD function 355 LD Ladder Diagram branches 39 coils usage and available typesof 44 contacts usage and available typesof 49 direct coils 46 direct contacts 50 instruction blocks 41 jumps 53 pulse falling edge negative coils 47 pulse falling edge negative contacts 52 pulse rising edge positive coils 47 pulse rising edge positive contacts 51 614 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Index reset coils 48 return statements 52 reverse coils 46 reverse contacts 51 rungs inserting 37 set coils 48 LD language keyboard shortcuts 59 LEFT function 590 lessthan operator 262 less than or equal operator 264 LIM_ALRM function block 64 LIMIT function 535 LOGfunction 92 M MAX function 304 MC_AbortTrigger function block 438 MC_Halt function block 441 MC_Home function block 445 MC_MoveAbsolute function
119. 6 A ABL function block 118 ABS function 68 ACB function block 120 ACL function block 122 ACOS function 70 ACOS LREALfunction 72 addition operator 74 advanced control blocks SCALER 527 Index AHL function block 124 alarms LIM_ALRM function block 64 AND operator 165 AND MASK function 140 ANY TO BOOLoperator 276 ANY TO BYTEoperator 277 ANY TO DATEoperator 278 ANY TO DINT operator 279 ANY TO DWORD operator 280 ANY TO INToperator 281 ANY TO LINT operator 282 ANY TO LREAL operator 283 ANY TO LWORD operator 284 ANY TO REALoperator 285 ANY TO SINT operator 286 ANY TO STRING operator 287 ANY TO TIME operator 288 ANY TO UDINT operator 289 ANY TO UINT operator 290 ANY TO ULINT operator 291 ANY TO USINT operator 292 ANY TO WORD operator 293 ARD function block 126 arithmetic ABS function 68 ACOS function 70 ACOS LREALfunction 72 addition operator 74 ASIN function 76 ASIN LREAL function 78 ATAN function 80 ATAN LREALfunction 82 COS function 84 COS LREAL function 86 division operator 88 EXPT function 90 LOGfunction 92 MOD function 94 MOV operator 96 multiplication operator 97 Neg operator 98 POW function 99 RAND function 101 SIN function 103 Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Verch 2014 609 Index SIN LREALinstruction 105 SQRT function 107 subtraction operator 109 TAN function 110 TAN _LREAL function 112 TRUNCfunction 114 arithmetic operations 1Gain operator 96
120. 647 e Greater than the underflow value e Greater than or equal to the data resident in the high preset HSCAPP HPSetting or an HSC error is generated UFSetting Parameter Data type User program access HSCApp UFSetting DINT read write Radwell Automation Publication 2080 AVOIBENE March nb 2014 307 Chapter 14 High SpesdCauniier HED instructions Underflow setting that defines the lower count limit for the counter e Ifthe counter s accumulated value decrements below the value specified in UFSetting an underflow interrupt is generated e When the underflow interrupt is generated the HSC sub system resets the accumulated value to the overflow value and the counter starts counting from the overflow value counts are not lost in the transition UFSetting values must be e Between 2 147 483 648 and 2 147 483 647 e Less than the overflow value e Less than or equal to the data resident in the low preset HSCAPP LPSetting or an HSC error is generated OutputMask Parameter Data type User program access HSCApp OutputMask UDINT read write Defines the embedded outputs on the controller that the High Speed Counter can directly control The HSC sub system can without control program interaction turn outputs ON or OFF based on the High or Low presets of the HSC accumulator OutputMask bit patterns The bit pattern stored in HSCApp OutputMask defines which outputs are controlled by the HSC and which outputs are not cont
121. 9 Function LIMIT on page 524 TND on page 522 Chapter 18 Process control instructions Process control instructions are used to monitor and maintain process loops for quantities such as pressure temperature flow rate and fluid level Process controls regulate the course by sending an output signal to the control valve Description Differentiation of a real value Boolean hysteresis on difference of reals Integration over time Turns the output for a configured channel on or off Scale input value according to output range Stack of integer Description Limit Stops the current cycle of the user program scan Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 501 Chapter 18 Processcontrol instructions DERIVATE Parameter RUN XIN CYCLE XOUT ENO 502 DERIVATE differentiates a Real value If the CYCLE parameter value is less than the cycle timing of the execution of the device the sampling period is forced to this cycle timing DERIVA L S SN DERIVATE Derivate operation The derivation is performed with a time base of milliseconds that is the derivation ofan input of 1000 that changes to 2000 over a time period of 1 second results in a value of 1 To convert the output of the instruction to units of seconds the output must be multiplied by 1000 Arguments Parameter Data type Description type Input BOOL Mode TRUE normal FALSE reset Input REAL Input any real value
122. ALSE in all other cases R TRIG function block language examples Function Block Diagram FBD Structured Text ST 1 R TRIG i clk j a output R TRIG 1 0 R TRIG 1 void H TRIG 1 BOOL CLK Type H TRIG Rising edge detection ST Equivalence R TRIGI is an instance of a R_TRIG block H TRIGI cmd nb edge ANY_TO_DINT R_TRIG1 Q nb edge 156 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Boolean instructions Chapter 8 Results Variable Monitoring Hame Logical value PhysicalValue Lock E gt ge cg clk vi Naa Bl LE F_TRIG_1 2 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 157 Chapter 8 Boolean instructions RS resets dominant bistable RS Arguments Parameter Parameter Data type Description type SET Input BOOL If TRUE sets Q1 to TRUE RESET1 Input BOOL If TRUE resets Q1 to FALSE dominant 01 Output BOOL Boolean memory state RS function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST 1 set TRUE 2 Eesetl FALSE 3 RS i set reseti 4i output RS 1 01 RS 1l void R amp 1 BOOL SET BOOL RESETI Type R5 Reset dominant bistable 158 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Boolean instructions Chapter 8 ST Equivalence RS1 is an instance of a RS block RS1 start_cmd stop cmd OR alarm command RS1 01
123. BOOL WindowOnly REAL FirstPosition REAL LastPasticn Tyne MC TouchPrebe Records an axis position at a bigger event Results 490 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 Microfl SG Aas Monitor Aen Discrete Motion rer Conant geing 727856 mm Command Velocity SOLD rimae SOOO mem Target Velocity SOC meu Motion fixed input output Motion Signals PTOO PTO1 PTO pulse Output 0 Output 1 PTO direction Output 3 Output 4 Lower Negative Limit switch Input 0 Input 4 Upper Positive Limit switch Input 1 Input 5 Absolute Home switch Input 2 Input 6 Touch Probe Input switch Input 3 Input 7 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 PTO2 Output Output 5 Input 8 Input 9 Input 10 Input 11 491 Chapter 17 Motion control instructions MC WriteBoolParameter Parameter EN AxisIn Execute ParameterNumber Value 492 MC WiiteBoolParameter modifies the value of a vendor specific parameter of FarameterMumber Value MC ExecutionMode MC WriteBoolParameter operation The parameters set by the MC WriteBoolParameter function block are only applied to the application temporarily They are overwritten by the permanent settings which are configured by the user in Connect Component Workbench Motion Configuration when the controller is switched from PRG to RUN or when the controller power is cycled Argum
124. BoolParameter z MC ReadBoolParameter 1 Value HC ReadBoolParameter Li void MC ReadBoolParameter LAT REF AxisIn BOOL Enable DINT ParameterMumber Type MC ReadBoolParameker Returns the value of a mation specific BOOL parameter Results T Var able Mo ont orin Ig Global Variables Micro Local Variables N A System Variables MicroS50 1 0 Enable ReadBoolParameter aia Close Radwell Automation Publication 2080 AVOIBENE Mib 2014 467 Chapter 17 Motion control instructions MC_ReadParameter returns the value of a vendor specific parameter MC ReadParameter FarameterNumber MC ReadParameter operation e When the MC ReadParameter function block Enable input is set to False the Value output is reset to 0 e Only supports the REAL data type Arguments Parameter Parameter Data type Description type EN Input BOOL Function block enable When EN TRUE execute current MC_ReadParameter computation When EN FALSE the Value output is reset to 0 Applies only to LD programs AxisIn Input AXIS REF See also AXIS_REF data type on page 426 Enable Input BOOL When TRUE gets the value of the parameter continuously ParameterNumber Input DINT Parameter identification See also Motion control function block parameter numbers on page 423 ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type o
125. Boolean instructions Communication instructions AGI d3t UDE ouecatotot tet dme eschews tet peeled 131 ANL Chainelotsdata type aevo tera eph maa 131 Fels BEI We llc B ol arene eb reer errr tert ner rr n nbn eiie 132 ARDA RG data pen RN ee ae eee er ee 132 AW AAW E EE 132 Chapter 7 PONTING Rte eccentric rM E 136 EIER o ret nie S TD LL E LEE 138 NIE CNN AMAN 140 i9 Q 142 ROR tee 144 e H EE 146 SS 148 SCOR NDS E N TE ELM MEE 150 Chapter 8 T EE 154 Eeer 156 o ferc 158 od ee 160 AND sere 161 AOR oana 162 NO W EEN 163 je Hm P see 164 EK E DEEN 166 TABLE i pit COmMDINALIONS sesto teta edu d man a estis 169 NIU AS Dosis udo M uU ds DU E LA M 170 ANER NEE 174 Chapter 9 MSC CIPGENERIC ocsssssssssssssecssesssesssssscssscsssssssssscsssssecssssssessseeses 178 CIPADPCEG data DVD some a be Wrap UM 180 CIPCONJTEROELGBCO dabadtyDOutsiduni eaa detenti 180 CIPSTATUS ar ty Decent imeem Pee UE aan 181 CUP TARGET CEG EE 183 MSG CIPSYMBOLIC ice cites Se eg ta CE SE S OPL S Ea eoe YebN EoEN SEI XE IURE 187 CIPSYMBOLIC CEG EE 189 E E ui eU Wee IEEE M UAE Eis 191 Radwell Automation Publication 2080 RVOOTIBENE March 2014 5 Table of Contents Compare instructions CIPCON LROLGCEPG data type ceira 191 CIPSTATUS Gata ty pE aa T E E 192 CIPTARGEFPGCEG data E 194 MS
126. Communtcation instructions MSG MODBUS2 204 Parameter IN Cancel LocalCfg TargetCfg LocalAddr Error MSC MODBUS2 sends a MODBUS TCP message over an Ethernet Channel c NODBUS SubErrorlD LocalAddr Status Bits MSG MODBUS2 operation A maximum of four message requests per channel can be processed in one scan For Ladder Diagram programs message requests are executed at the end of a ladder scan Arguments When the MSG MODBUS2 function block is enabled the receive buffers for Read operations are cleared on the rising edge of Enable Parameter Datatype Description type Input BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed Input BOOL TRUE Cancel the execution of the function block Input MODBUS2LOCPARA Define structure input local device Input Input Output Output Defines the input structure for the local device See MODBUS2LOCPARA data type on page 207 MODBUS2TARPARA Define structure input target device Defines the input structure for the target device See MODBUS2TARPARA data type on page 208 MODBUSLOCADDR MODBUSLOCADDR data type is a 125 Word array that is used by Read commands to store the data 1 125 words returned by the Modbus slave and by Write commands to buffer the data 1 125 words to be sent to the Modbus slave BOOL TRUE MSG instruction is finished FALSE MSG
127. D Il EKY KEY UKY e KEY READ l UKY KEY DKY KEY READ Il DKY KEY RKY KEY READ Il RKY KEY LKY KEY READ I1 LKY Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 371 Chapter 15 Input Cutput instructions KEY READ REM checks Key status on a Remote LCD module when the user display is active This is only available for the Micro820 KEY READ REM KEY READ REM operation e KEY READ REM is supported for Micro820 controllers only e This function block can be used to check Key status on Remote LCD module when user display is active LCD REM instruction is used to make User Display Active When User display is not active KEY READ REM instruction flags an error e l BUTTON property in LCD Function File shall be activated otherwise all key status will be FALSE e Only single key presses are supported for the KEY READ REAM instruction two key press combinations are not supported KEY READ REM arguments Parameter Parameter Data type Description type Enable Input BOOL Function enabled TRUE Enable FALSE Disable KEY_READ_REM Output BOOL TRUE Remote LCD Key data is read successfully FALSE Enable is false there is an error reading Remote LCD Key Data or User Display is not active Sts Output UINT Status of the KEY READ REM operation See KEY READ REM status codes on page 374 KeyData Output UDINT Remote LCD KeyPad Data See KeyData bitfields table on page 374 372 Radwell Au
128. D function 533 TOF function block 603 TON function block 605 TONOFF function block 607 TOW function 617 TP function block 610 TRIMPOT_READ function block 409 TRUNCfunction 114 TTABLE function 170 U UlCfunction 416 UID function 418 UIE function 420 UIF function 422 X XOR operator 166 XOR_MASK function 154 Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Verch 2014 617 Rockwell Automation Support Rockwell Automation provides technical information on the Web to assist you in using its products At http www rockwellautomation com support you can find technical manuals a knowledge base of FAQs technical and application notes sample code and links to software service packs and a MySupport feature that you can customize to make the best use of these tools For an additional level of technical phone support for installation configuration and troubleshooting we offer TechConnect support programs For more information contact your local distributor or Rockwell Automation representative or visit http www rockwellautomation com support Installation Assistance If you experience a problem within the first 24 hours of installation review the information that is contained in this manual You can contact Customer Support for initial help in getting your product up and running United States or Canada 1 440 646 3434 Outside United States or Use the Worldwide Locator at http www rockwellautomation com
129. Data Type Description EN Input BOOL Function enable When Enable TRUE execute the conversion to the 8 bit Unsigned Short Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT BYTE INT Any non Short Integer value UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING o1 Output USINT An Unsigned Short Integer value ENO Output BOOL Enable out Applies only to LD programs ANY TO USINT operator ST language example ST Equivalence bres ANY TO USINT true bres is 1 tres ANY TO USINT t 0s46ms tres is 46 mres ANY TO USINT 0198 mres is 198 284 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO WORD Parameter EN 01 ENO ANY TO WORD converts a value to a 16 bit Word value Arguments Parameter Type Data Type Input BOOL Input BOOL SINT USINT BYTE INT DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output WORD Output BOOL Description Function enable When Enable TRUE execute the conversion to the 16 bit Word computation When Enable FALSE there is no computation Applies only to LD programs Any non Unsigned Integer value An Unsigned Integer value Enable out Applies only to LD programs ANY TO WORD operator ST language
130. Day Hour Minute Second DayOfWeek Input Output instructions Chapter 15 Datatype Description UINT UINT UINT UINT UINT UINT The month setting for the RTC The day setting for the RTC The hour setting for the RTC The minute setting for the RTC The second setting for the RTC The day of the week setting for the RTC This parameter is ignored for RTC SET Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 395 Chapter 15 Input Cutput instructions RI SET Parameter Enable RTCEnable RTCData RTCPresent RTCEnabled RTCBatLow Sts 396 Arguments Parameter Datatype type Input BOOL Input BOOL Input RTC Output BOOL Output BOOL Output BOOL Output USINT RT CEnable HICLData RTIC SET sets RTC status or write RTC information Description Function block enable When Enable TRUE execute RTC set with the RTC info from input When Enable FALSE there is no read operation and output RTC data is invalid TRUE To enable RTC with the RTC data specified FALSE To disable RTC Note This is ignored by Micro810 controllers RTC data information yy mm dd hh mm ss week This RTC data are ignored when RTCEnable 0 See RTC data type on page 394 TRUE RTC hardware is plugged in FALSE RTC hardware is not plugged in TRUE RTC hardware is enabled timing FALSE RTC hardware is disabled not timing TRUE RTC battery is low FALSE RTC bat
131. Day Time Setting of Channel A See TOWDATA Data Type on page 607 TimeB Input TOWDATA Day Time Setting of Channel B See TOWDATA Data Type on page 607 TimeC Input TOWDATA Day Time Setting of Channel C See TOWDATA Data Type on page 607 TimeD Input TOWDATA Day Time Setting of Channel D See TOWDATA Data Type on page 607 TOW Output BOOL If TRUE the value of the real time clock is in the range of the Day Time setting of any one of four channels TOW function language examples Function block diagram Radwell Automation Publication 2080 AVOIBENE Mib 2014 605 Chapter 23 Timer instructions Ladder diagram Structured text 1 output TOW Timea TimeB Timec Timer ST Equivalence TESTOUTPUT TOW TIMEA TIMEB TIMEC TIMED Results 606 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Timer instructions Chapter 23 Name Logical Yalue PhysicalYalue Lock DataType ge gt ge c ge ge Time e a TOWDAT Times Enable HA BOOL Timed Dau eekly A6 BOOL Time D autdn 1 M LISIMT Times Houtln 1 M A LISIMT Time Minn zt M USINT Tine D ay ff z M LISIMT Times Hurl fF Us M LISIMT Times Miniti 30 A6 LISIMT DM Timet TOWDAT TimeB Enable d M BOOL TimeB D ailyfeekly M h BOOL Time DayOn z M LISIMT TimaeB Haourlln 15 M AA LISIMT Tune Miir zt M LISIMT TimeB D aut ff 3 M A LISIMT Tine Hourl fF 10 M LISIMT TimeB Mi
132. E there is no scaling equation Applies only to LD programs Input signal Minimum value of Input Maximum value of Input Minimum value of Output Maximum value of Output Output value Enable out Applies only to LD programs SCALER function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Processcontrol instructions Chapter 18 Ladder Diagram LD 1 input 10 0 zt InputMin 5 0 3 InputMax re 15 0 di oOutputMin re 1 0 5 OutputMax re 10 0 e SCALEE l input InputMin d output is SCALER 1 Qutput SCALER 1l InputMax OutpurMin oOutputMax void GCALER 1 REAL Input REAL InputMin REAL Inputhax REAL OukputMin REAL CuiEpulIMax Type SCALER Scale input value according to output range ST equivalence SCALERI is an instance of SCALER block Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 517 Chapter 18 Processcontro instructions SCATLBERI STGDaL In 44 0 420 0 z 0 0 250 0 7 j Out Temp SCALER1 Output Results ES Variable Monitoring Global Variables Micro Local Variables LIntitledS T System Variables Mio 2 Hame Logical alue PhysicalValue Lock Data Type gt gt ge gt ge input 10 0 N A HEAL InputMin 5 0 MA REAL Input ax 15 0 N HEAL D utputMin 1 0 N h REAL Output ax 10 0 HA REAL output ane N AREAL SCALER 2 in SCALER 518
133. E Mib 2014 533 Chapter 20 Proportional Integral Derivative PD instruction Preventing integral windup If the difference between the setpoint value and the process value is great the output value will increase significantly and during the time it takes to decrease the process will not be in control The IPIDController function block interactively tracks feedback and prevents integral windup When the output is saturated the integral term in the controller is recomputed so that its new value provides an output at the saturation limit 534 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Proportional Integral Derivative PD instruction Chapter 20 IPIDCONTROLLER Parameter EN Process SetPoint FeedBack Auto Initialize Gains AutoTune ATParameters Parametertype Datatype Input Input Input Input Input Input Input Input Input IPIDCONTROLLER is used for proportional integral derivative PID logic which controls physical properties such as temperature pressure liquid level or flow rate using process loops Arguments BOOL REAL REAL REAL BOOL BOOL GAIN_PID BOOL AT_ Param Description Function block enable When EN TRUE execute function When EN FALSE do not execute function Applies only to LD programs Process value which is the value measured from the process output Set point Feedback signal which is the va
134. EAL Deceleration REAL Jerk SINT DirectionIn SINE Bulferfsicde Type PC MpveNvelockey Commands a never ending controled motion at a specfied velocity Results Micro Bez Kantor IS Asin Narra mal Ass state Ciera Wapas Ser dree Mo d Kkbzv mget Coretant Velocity Nun Enor Derrptos HAC Command Faite 13301093 me Cennad vekcge 400 0 rernisex Target Position OG me Target Velocity AC D remy sex D NA MA HA H NS Hi 454 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 MC_Power controls the power stage ON or OFF MC Power Radwell Automation Publication 2080 HVDOIBENE Mib 2014 455 Chapter 17 Motion control instructions MC_Power operation e After axis power On completes the axis Homed status is reset to 0 not homed e The Enable_Positive input and the Enable_Negative input of the MC_Power function block are both level triggered they are checked when the Enable input changes from OFF to ON The on the fly change for the Enable_Positive input and the Enable_Negative input without Enable input toggling is not checked e If power fails during operation when Servo ready has been detected the axis state goes to ErrorStop e Ifthe MC Power function block with Enable set to True is called while the axis state is Disabled the axis state goes to StandStill if there is not an error or the axis state goes to ErrorStop if there is an error
135. Enable out POW function language examples Function block diagram Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 95 Arithmetic instructions Ladder diagram Structured text D dac 2 0 2 exponent I 3 0 3 power DO In exponent REAL POWMTREAL IN REAL EXP Power calculation ST Equivalence result POW xval power Results Variable Monitoring Global Variables Microf10 Local Variables RA_POW_LD 5 ystem Va Logical Value PhysicalValue Lock E e gt e gt gt In 2 0 HA E exponent 3 0 Ye CH HI wer ERR DCH Tp Tru 4 Cancel Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Arithmetic instructions Chapter 5 RAND From a defined range RAND yields random integer values Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the random integer value computation When EN FALSE there is no computation base Input DINT Defines the supported set of numbers RAND Output DINT Random value in set 0 base 1 ENO Output BOOL Enable out RAND function language examples Function block diagram Ladder diagram Structured text 1 hase 10 2 random RAND base RAND DINT BRANDDINT base Randam value e ST Equivalence selected MUX4 RAND 4 1 4 8 16 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 97 Chapter 5 Arithmeti
136. Execute Input BOOL When TRUE starts the motion at rising edge The axis should be in the home position when this execute command is issued or an error occurs MC FB ERR NOT HOMED Position Input REAL Target position for the motion in technical unit negative or positive Note The technical unit is defined in the Motion General configuration page for an axis Velocity Input REAL Value of the maximum velocity The maximum velocity may not be reached when Jerk 0 The sign of Velocity is ignored the motion direction is determined by the input Position Acceleration Input REAL Value of the acceleration always positive increasing energy to the motor user unit sec Deceleration Input REAL Value of the deceleration always positive decreasing energy to the motor u sec Jerk Input REAL Value of the Jerk always positive u sec Note When the value of the input J erk 0 the Trapezoid profile is calculated by Motion Engine When Jerk 0 the S Curve profile is calculated Direction Input SINT This parameter is not used BufferMode Input SINT This parameter is not used ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Done Output BOOL When TRUE command position reached When the In Position Input is configured as Enabled for this axis the drive needs to set In Position Input signal active before this Done bit goes
137. F on page 603 TND on page 522 TOW on page 605 TRUNC on page 110 TTABLE on page 166 UIC on page 408 UID on page 410 UIE UIF on page 414 XOR_MASK on page 150 on page 412 Operators Functional category String manipulation instructions on page 567 Input Output instructions on page 345 String manipulation instructions on page 567 Binary instructions on page 135 Input Output instructions on page 345 Binary instructions on page 135 Arithmetic instructions on page 65 Interrupt instructions on page 405 Arithmetic instructions on page 65 Timer instructions on page 589 Process control instructions on page 501 Timer instructions on page 589 Arithmetic instructions on page 65 Boolean instructions on page 153 Interrupt instructions on page 405 Binary instructions on page 135 The following table lists the operators by functional category Instruction Addition on page 72 AND on page 161 ANY TO BOOL on page 268 ANY TO BYTE on page 269 ANY TO DATE on page 270 Functional category Arithmetic instructions on page 65 Boolean instructions on page 153 Data conversion instructions on page 267 30 Fall Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Instruction Addition on page 72 ANY TO DINT on page 271 ANY TO DWORD on page 272 ANY TO INT on page 273 ANY TO LINT on page 274 ANY TO LREAL on page 275 ANY TO LWORD on p
138. G MODBUS eier 197 regele 199 MODBUSLOGPARA data ty pe asc tun ett tete 199 Message execution process Rung TRUE eee 201 MODBUS EE eegene 203 MSG MODBUS Ac 204 ege 206 MODBUS2EOCPARA data ty pe ais vd tpe ptam 207 MODBUS2TARPARA d ta ty pe ipte trot adven 208 Message execution processes and timing diagrams 211 Message execution process general e 211 Message execution sequence general ue 211 Message execution process Rung TRUE eee 212 Message execution timing diagram Rung TRUE 214 Message execution process Rung FALSE ss 215 Message execution timing diagram Rung FALSE 217 Message execution process Error ee 218 Message execution timing diagram Fron oit ianitor 218 Using the communication message function blocks 220 Configuring object data values for explicit messaging KEE 220 Example How to create a MSG_CIPGENERIC messaging program to read data from a controller eese eene 222 Example How to createa MSG_CIPSYMBOLIC messaging program to write a value to a variable eese enennnenennns 2 32 Example How to configure Modbus communication to read from and EE 244 Communication protocol support ee eee eee eene eee eene eene 249 Embedded communication channels sss 250 Chap
139. ING STRING DINT DINT STRING BOOL Description Function enable When EN TRUE replace parts of strings with new characters When EN FALSE no operation Any string String to be inserted to replace NbC chars Number of characters to be deleted Position of the first modified character first valid position is 1 Modified string The NbC characters are deleted at position Pos then the substring Str is inserted at this position Can be e empty string if Pos lt 0 e strings concatenation IN Str if Pos is greater than the length of the IN string e initial string IN if NbC 0 Enable out REPLACE function language examples Function block diagram Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulation instructions Chapter 22 Ladder diagram Structured text I nhe re 4 B pos 2 3i output REPLACE in str nbc pos REPLACE STRING REPLACE STRIMG IN STRING Str DINT MbC DINT Post Replace sub string Replacing a part of a string with a new set of characters ST Equivalence MyName REPLACE Mr X JONES Frank 1 4 MyName is Mr Frank JONES Results ES Variable Monitoring ge abcdet HA ghi M A nbc 4 By Ady pos 2 H A Po LE Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 587 Chapter 22 otringmenpulation instructions 588 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Function
140. INT Arguments Parameter ParameterType DataType Description EN Input BOOL Function enable When Enable TRUE execute the conversion to the 32 bit Double Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT Any value other than an Unsigned Double Integer BYTE INT UINT WORD DINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING o1 Output UDINT A 32 bit Unsigned Double Integer value ENO Output BOOL Enable out Applies only to LD programs ANY TO UDINT operator ST language example ST Equivalence bres ANY TO UDINT true bres is 1 tres ANY TO UDINT t 1s46ms tres is 1046 mres ANY TO UDINT 0198 mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 281 Chapter 12 Data conversion instructions ANY_TO_UINT converts a value to an Unsigned Integer value ANY TO UINT Bx EN ENO Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When Enable TRUE execute the conversion to the 16 bit Unsigned Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT BYTE Any non Unsigned Integer value INT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING 01 Output UINT An Unsigned Integer value ENO Output BOOL E
141. In the Variables page add the following variables and data types Variable Name Data Type MyCommand USINT MyAppData HSCAPP Mylnfo HSCSTS MyPLS PLS MyStatus UINT Result The Variables page should look similar to the following image UntitledLD VAR Untitled D POU d 7 of USINT T HS APP HS5C5T5 PLS LINT Assign values to the HSC variables After you add variables follow these steps to add values to the variables using the Initial Value column in the Variable Selector A standard program usually uses a routine to assign values to the variables Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 333 Chapter 14 High SpesdCauntier HED instructions To assign values to the HSC variables 1 Expand MyAppData to view all variables z l MyAppData My ppData Pis note My AppData HscID vy ApnData HseMade My AppData Accumulator My AppD ata HPSetting My AppiData LPSetting My DOSS OFSetting My AppData UFSettirg My AppData QutputMask Py App Data HPOutput MlyAppData lPOutput UDINT at om pang LISTMT m MyInFa HscsTs M MyPL5 PLS ai MySratue 2 Assign the HSC mode value e Inthe Initial Value field for the MyAppData HSCMode variable type 6 e See HSCMode in HSCAPP data type on page 303 for more information on the description for each value 3 Assign the rest of the values to the MyAppData variables as shown in the follo
142. L BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL TIME DATE STRING LREAL BOOL ST Equivalence ANY TO LREAL true ANY TO LREAL converts any value to a Long Real value Description Function enable When Enable TRUE execute the conversion to the long Real computation When Enable FALSE there is no computation Applies only to LD programs Any value other than a long Real A long real value Enable out Applies only to LD programs ANY TO LREAL operator ST language example bres is 1 0 gt ANY TO LREAL t 1s46ms tres is 1046 0 ANY TO LREAL 198 ares is 198 0 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 275 Chapter 12 Dataconversion instructions ANY TO LWORD Parameter EN 01 ENO 276 ANY TO LWORD converts a value to a 64 bit Long Word value Arguments Parameter Data Type Type Input BOOL Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT REAL LREAL TIME DATE STRING Output LWORD Output BOOL Description Function enable When Enable TRUE execute the conversion to the 64 bit long Word computation When Enable FALSE there is no computation Applies only to LD programs Any value other than a long Word A 64 bit long Word value Enable out Applies only to LD programs ANY TO LWORD
143. L TRUE if i1 lt i2 Less than or equal lt operator ST language example ST Equivalence aresult 10 lt 25 aresult is TRUE mresult ab lt ab mresult is TRUE Radwell Automation Publication 2080 HVDOIBENE Mib 2014 257 Chapter 10 Compare instructions Not equal Parameter EN 01 258 For Integer Real Time Date and String values Not Equal compares input values to determine whether the first is not equal to the second Arguments Parameter Type Data Type Description Input BOOL Function enable When Enable TRUE execute current compare computation When Enable FALSE there is no computation Applies only to LD programs Input BOOL SINT USINT BYTE INT Al inputs must be the same data type UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output BOOL TRUE if first lt gt second Not equal lt gt operator ST language example ST Equivalence aresult mresult 10 lt gt 25 aresult is TRUE ab lt gt ab mresult is FALSE Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Chapter 11 Counter instructions Counter instructions are used to control operations based on the number of events Function Description CTD
144. L TSEn USINT CfgID Type DLG Save list of data to SD Card Data Log file DLG status codes Status code Description 0 Data logging Idle status 1 Data logging Doing status 2 Data logging Complete Succeed status 3 Data logging Complete Error status Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 361 Chapter 15 362 Input Output instructions DLG error codes The following table describes DLG error codes Error code Error Name 0 DLG ERR NONE 1 DLG ERR NO SDCARD 2 DLG ERR RESERVED 3 DG ERR DATAFILE ACCESS 4 DLG ERR CFG ABSENT 5 DIG ERR CFG ID 6 DLG ERR RESOURCE BUSY 7 DLG ERR CFG FORMAT 8 DIG ERR RIC 9 DLG ERR UNKNOWN Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Comments No error SD card is absent Reserved Access Data logging file error Data logging configuration file is absent Configure ID is absent in data logging configuration file The Data logging operation linked to this Data logging ID is used by another FB operation Data logging configuration file format is invalid Real time clock is invalid Unspecified error has occurred Input Output instructions Chapter 15 IIM executes an immediate input instruction to update the input data without IIM having to wait until the beginning of the next input scan Arguments Parameter Parameter type Data type Description Enable Input BOOL Function block en
145. L When TRUE the function block is not finished Active Output BOOL When TRUE indicates that the function block has control on the axis Error Output BOOL When TRUE an error is detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 MC Power function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 457 Chapter 17 Motion control instructions Ladder Diagram LD Structured Text ST Positive True Negative rs True HC Power 1 amp xisl Enable Positive Negative Status HC Power 1l status Busy Hc Power 1l Busv Active i HC Power 1 Active Error re MC Power 1 Error ErrorID HC Power 1l ErrorID MC Power 8 void MC Power l1 A XIS REF AxisIn BOOL Enable BOOL Enable Positive BOOL Enable Negative Type MC Power Controls the power stage On or OFF Results 458 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Motion control instructions Chapter 17 ad UJ Jj m Gicbal Variable Mieicd5D Local Vmizhinr Miet l up iE Mure Vaus QD mm Ceesmaed Velocity QD mm TangetVelcaty Radwell Automation Publication 2080 HVDOIBENE Mib 2014 459 Chapter 17 Motion contol instructions MC_ReadAxisError 460 Parameter EN AxisIn Enable ENO Axis Valid Busy Error MC ReadAxisError describes general axis
146. LD Radwell Automation Publication 2080 AVOIBENE Mib 2014 513 Chapter 18 Processcontro instructions Structured Text ST 1 PWM EN Enable On Freq DutyCycle ChIype ChSlot ChNum 2 output PWM ENO 3i sts PWM Sts PWM iif void PWM_1 BOOL Enable BOOL On UDINT Freq UINT DutyCycle UINT ChType UINT ChSlot UINT ChNum Type PWM Enable PWM output PWM status codes Status code Description 0 Function block not enabled no operation 1 PWM configuration successful 2 Invalid Duty cycle 3 Invalid Frequency 4 Invalid Channel Type 514 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Processcontrol instructions Chapter 18 Status code Description 5 Invalid Channel Slot 6 Invalid Channel Number 7 Invalid Catalog PWM feature is not supported in the catalog being used Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 515 Chapter 18 Processcontro instructions SCALER Parameter EN Input InputMin InputMax OutputMin OutputMax Output ENO 516 SCALER scales the input value according to the output range Arguments Parametertype Datatype Input BOOL Input REAL Input REAL Input REAL Input REAL Input REAL Output REAL Output BOOL Description Function block enable When EN TRUE execute the scaling equation When EN FALS
147. LOAD Input BOOL Load command CV PV when LOAD is TRUE PV Input DINT Programmed maximum value QU Output BOOL Overflow TRUE when CV gt PV QD Output BOOL Underflow TRUE when CV lt 0 CV Output DINT Counter result CTUD function block language examples Function Block Diagram FBD 264 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Ganter instructions Chapter 11 Ladder Diagram LD Structured Text ST LG cu ze TRUE 2 cd TRUE 3 reset FALSE di load FALSE 5 pw 10 d CTUD l1 cu cd reset load pv void CTUD 1 BOOL CU BOOL CD BOOL RESET BOOL LOAD DINT DN Type CTLID Up down counter ST Equivalence We suppose CTUD1 is an instance of block CTUDI triggerl triggor2 reset cmd Load Gm DUT full CTUD1 QU empty e CTUD1 QD nb elr s CTUD1 CV Radwell Automation Publication 2080 HVDOIBENE Mib 2014 265 Chapter 11 Counter instructions 266 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Data conversion instructions Chapter 12 Data conversion instructions are used to convert the data type of a variable to a different data type Operator ANY TO BOOL on page 268 ANY TO BYTE on page 269 ANY TO DATE on page 270 ANY TO DINT on page 271 ANY TO DWORD on page 272 ANY TO INT on page 273 ANY TO LINT on page 274 ANY TO LREAL on page 275 ANY TO LWORD on page 276 ANY TO REAL on page 277 ANY TO SINT on
148. LSE derivative term is ignored forcing the controller output to track the feedback within the controller limits and allowing the controller to switch back to auto without bumping the output Initialize Initializes AutoTune sequence A change in value from TRUE to FALSE or FALSE to TRUE causes the controller to eliminate any proportional gain during the cycle Gains Establishes the Gains PID for IPIDController DirectActing Defines the type of acting for the output ProportionalGain TRUE direct acting in which the output moves in the same direction as the error That is the actual process value is greater than the SetPoint and the appropriate controller action is to increase the output For example chilling FALSE reverse acting in which the output moves in the opposite direction as the error That is the actual process value is greater than the SetPoint and the appropriate controller action is to decrease the output For example heating Proportional gain for PID gt 0 0001 Timelntegral Time integral value for PID gt 0 0001 The tendency for oscillation increases with a decrease in ti TimeDerivative Time derivative value for PID gt 0 0 Damping increases with an increase in derivative time but decreases if the derivative time value is too large Derivative gain for PID 0 0 When set to TRUE and Auto and Initialize are FALSE the AutoTune sequence is started Initial output value during auto tuning Al
149. Mach 2014Verch 2014 Parameter Enable YearlyCenturial YearOn MonthOn DayOn Timer instructions Chapter 23 Data Type BOOL BOOL UINT USINT USINT Ladder diagram Structured text 1i output zs DOY B C D z oy Ir Turn an output when real time clock value is within year range ST Equivalence TESTOUTPUT DOY TIMEAI TIMEBI TIMECI TIMEDI DOYDATA data type The following table describes the DOYDATA data type Description TRUE Enable FALSE Disable Type of timer 0 Yearly timer 1 Centurial timer Year On value must be in set 2000 2098 Month On value must be in set 1 12 Day On value must be in set 1 31 determined by MonthOn value Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 601 Chapter 23 Timer instructions Parameter Data Type Description YearOff UINT Year Off value must be in set 2000 2098 MonthOff USINT Month Off value must be in set 1 12 DayOff USINT Day Off value must be in set 1 31 determined by MonthOff value 602 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Timer instructions Chapter 23 TDF computes time difference TDF Arguments Parameter ParameterType DataType Description EN Input BOOL Function enable When EN TRUE perform current computation When EN FALSE there is no computation TimeA Input TIME The start time for time diffe
150. Module vendor ID For Allen Bradley products the vendor ID 1 Output UINT Plug in Generic Module product type Output UINT Plug in Generic Module product code Output UINT Plug in Generic Module revision information Output BOOL Enable out Applies only to LD programs PLUGIN INFO function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 379 Chapter 15 Input Cutput instructions Ladder Diagram LD Structured Text ST 1 3lotID n 1 z PLUGIN INFO l enable slotID 3i outputl re PLUGIN INFO 1 M ModIb 4 outputz PLUGIN INFO 1 VendorID 5 outputs re PLUGIN INFO 1 ProductType e output4 PLUGIN INFO 1 ProductcCode d outputs re PLUGIN INFO 1 ModREevision PLUGIN INFO i4 void PLUGIN INFO 1 BOOL Enable WINT SlatID Type PLUGIN INFO Get module information From a generic plug in module 380 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 Results HS Variable Monitoring Global Variables Microg30 Local Variables UntitledST System Variables Micro3U Hame EE E As k DataType bei a REN RUE CNN RO RENE Gol N A UINT output N LINT output M S UIA T outputs N UINT output4 BA LINT nutputb M S UINT PLUGIN_INFO_ PLUGIN_IN Og Ogg Cancel Radwell Automation Publication 2080 HVD
151. NOT MASK on page 138 Function 24 Radwell Automation Publication 2080 HVDDTIBENE Verch2014Varch 2014 Finding information about instructionsand lecber elements Chapter 1 Instruction Instruction block type OR MASK on page 140 Function OR on page 160 Operator PLUGIN INFO on page 379 Function block PLUGIN READ on page 382 Function block PLUGIN RESET on page 385 Function block PLUGIN WRITE on page 387 Function block POW on page 95 Function R_TRIG on page 156 Function block RAND on page 97 Function REPLACE on page 586 Function RHC on page 357 Function RIGHT on page 584 Function ROL on page 142 Function ROR on page 144 Function RPC on page 359 Function RS on page 158 Function block RTC READ on page 393 Function block RTC_SET on page 396 Function block SCALER on page 516 Function block SHL on page 146 Function SHR on page 148 Function SIN on page 99 Function SIN LREAL on page 101 Function SQRT on page 103 Function SR on page 164 Function block STACKINT on page 519 Function block STIS on page 406 Function Subtraction on page 105 Operator SUS on page 528 Function block SYS INFO on page 398 Function block TAN on page 106 Function TAN LREAL on page 108 Function TDF on page 603 Function TND on page 522 Function TOF on page 591 Function block TON on page 593 Function block Radwell Automation Publication 2080 HVDDIBENE Mach 2014 Vern 2014 25 Chapte
152. NT ULINT L WORD REAL LREAL TIME STRING Output DATE Date represented by IN A value of 1 indicates an invalid date Output BOOL Enable out Applies only to LD programs ANY TO DATE operator ST language example ST Equivalence ares ANY TO DATE 1109110199 ares d 2005 02 22 rres ANY TO DATE 1109110199 3 rres d 2005 02 22 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO DINT Parameter EN 01 ENO ANY TO DINT converts a value to 32 bit Double Integer value Arguments Parameter Type Data Type Input BOOL Input BOOL SINT USINT BYTE INT UINT WORD UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output DINT Output BOOL Description Function enable When Enable TRUE execute the conversion to the 32 bit Double Integer computation When Enable FALSE there is no computation Applies only to LD programs Any value other than a Double Integer A 32 bit Double Integer value Enable out Applies only to LD programs ANY TO DINT operator ST language example ST Equivalence bres ANY TO DINT true bres is 1 tres ANY TO DINT t 1s46ms tres is 1046 mres ANY TO DINT 0198 mres is 198 zi Radwell Automation Publication 2080 HVDOIBENE Mib 2014 271 Chapter 12 Data conversion instructions ANY TO DWORD converts
153. OL Enable out ACOS Output REAL Arc cosine of the input value in set p1 2 2 p1 2 0 for invalid input ACOS function language examples Function block diagram Ladder diagram Structured text E value 0 5 2 rcCosine ACOS value ACOST REAL ACUS REAL IM Arc cosine ST Equivalence cosine COS angle 68 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 result ACOS cosine result is equal to angle Results Variable Monitoring Logical alue PhysicalValue Lock E gt ge c gt 0 5 N A RI URN ET Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 69 Chapter 5 Arithmetic instructions ACOS LREAL calculates the Arc cosine of a Long Real value ACOS LREAL j Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current computation When EN FALSE there is no computation IN Input LREAL Must be in set 1 0 1 0 ENO Output BOOL Enable out ACOS LREAL Output LREAL Arc cosine of the input value in set 0 0 PI 0 0 for invalid input ACOS LREAL function language examples Function block diagram Ladder diagram Structured text af value QO Le I Om a Arclosine ACOS LREAL value ACOS LREALT LREAL ACOS LREAL LREAL IN Perform 64 biE real arccasine calculation ST Equivalence cosine COS L
154. OL parameter Radwell Automation Publication 2080 AVOIBENE Mib 2014 Motion control instructions Chapter 17 Results Global Variables Micro850 Local Variables N amp System Variables MicroB50 Name Logical Value Physical C Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 495 Chapter 17 Motion control instructions MC WriteParameter Parameter EN AxisIn Execute ParameterNumber Value 496 MC WiiteParameter modifies the value of a vendor specific parameter FarameterMumber Value MC ExecutionMode MC WriteParameter operation The parameters set by the MC WriteParameter function block are only applied to the application temporarily They are overwritten by the permanent settings which are configured by the user in Connect Component Workbench Motion Configuration when the controller is switched from PRG to RUN or when the controller power is cycled Arguments Parameter Data type Description type Input BOOL Function block enable When EN TRUE execute current MC WriteParameter computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE writes the value of the parameter at the rising edge Input DINT Parameter identification See also Motion control function block parameter numbers on page 423 Input REAL New val
155. OLIC messaging should look similar to the following image Add an Equal operator and a coil Follow these steps to add an Equal operator variables and a coil The Equal instruction is used to trigger writing a value if the data type conversion was successful Radwell Automation Publication 2080 HVDOIBENE Mib 2014 235 Chapter 9 236 Communtcation instructions To add an Equal operator 1 Inthe Toolbox select Rung and drag and drop it directly under the first ladder rung to add a second rung 2 Addan Equal operator e Inthe Toolbox select Block and drag and drop it onto the second ladder rung to display the Block Selector e In Search type the sign and double click to add an instance of the operator to the ladder diagram To add Equal variables 1 Inthe ladder diagram POU double click a variable to display the Variable Selector 2 Inthe Variable Selector assign variable names as listed in the following table Parameter Variable name i1 COPsts i2 1 To add a coil to the Equal operator 1 Inthe Toolbox select Direct Coil and drag and drop it to the right of the Equal operator output on the second ladder rung 2 Inthe Variable Selector type WriteValue in the Name field for the coil Result The second rung of your ladder diagram program for MSG_CIPGENERIC messaging should look similar to the following image P bw Wi ks y 1 Write Value iu COPas i
156. OTBENE March 2014Vach 2014 381 Chapter 15 Input Cutput instructions PLUGIN READ Parameter Enable SlotID Offset DataLength DataArray Sts ENO 382 PLUGIN_READ teads a block of data from any Plug in Generic Module hardware except for 2080 MEMBAK RTC modules When a Plug in Generic Module is not present all values return to zero 0 PLUGIN READ ahr ie Enable sSlotID AddrOftset DataLength DataArray Arguments Parametertype Data type Input BOOL Input UINT Input UINT Input UINT Input USINT Output UINT Output BOOL Description Function block enable When Enable TRUE execute UPM read When Enable FALSE there is no read operation and the data inside the data array is invalid Plug in slot number Slot ID 1 2 3 4 5 starting with the far left slot 1 Address offset of the first data to be read calculating from the first byte of the Plug in Generic Module The number of bytes to be read An array used to store the data read from the Plug in Generic Module See PLUGIN READ status codes on page 383 Enable out Applies only to LD programs PLUGIN READ function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Input Output instructions Chapter 15 Ladder Diagram LD Structured Text ST 1 PLUGIN READ ifenable ID ao dl da sts ze PLUGIN READ 1 Sts PLUG IN READ 1
157. Offset 0 UINT Dest CataloglD Array STRING DestOffset 0 UINT Length 1 UINT Swap FALSE BOOLEAN 2 Forthe CatalogID variable double click in Dimension and change the array size to 1 1 Add a contact 1 Inthe Toolbox select Direct Contact and drag and drop it to the left of che COP function block input on the second ladder rung 2 Inthe Variable Selector select the Convert String variable for the contact Result The second rung of your ladder diagram program for MSG_CIPGENERIC messaging should look similar to the following image 230 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Gmmuncation instructions Chapter 9 Convert String Verify correct IP configuration on Controller B Follow these steps to verify the IP address settings are correct on Controller B 1 Open the application workspace for the controller 2 From the Project Organizer double click the controller to display it in the application workspace 3 Inthe controller configuration workspace expand Ethernet in the controller tree and then click Internet Protocol to display the controller configuration page 4 Verify the IP address settings are correct as identified in the following table IP configuration option Value IP address 192 168 1 19 Subnet Mask 255 255 255 0 Gateway address 192 168 1 1 Results The Internet Protocol options in your controller configuration page should look similar to the following image Rad
158. PCFG data type on page 180 TargetCfg Input CIPTARGETCFG Target device configuration See CIPTARGETCFG data type on page 183 ReqData Input USINT 1 1 CIP message request data The array size should not be less than the ReqLength size See MSG_CIPGENERIC message behavior ReqLength Input UINT CIP message request data length e 0 490 178 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Gmmuncation instructions Chapter 9 Parameter Parametertype Datatype ResData Input USINT 1 1 Q Output BOOL Status Output CIPSTATUS ResLength Output UINT Description CIP message response data The array size should not be less than the ResLength size When a MSG is triggered or re triggered data in the ResData array is cleared TRUE MSG instruction is finished FALSE MSG instruction is not finished Function block execution status When a MSG is triggered or re triggered all elements inside Status are reset See CIPSTATUS data type on page 181 CIP message response data length e 0 490 When a MSG is triggered or re triggered ResLength is reset to 0 MSG_CIPGENERIC function language examples Function block diagram Ladder diagram Radwell Automation Publication 2080 AVOIBENE Mib 2014 179 Chapter 9 Communtation instructions CIPAPPCFG data type The following table describes the CIPAPPCFG data type Parameter Data type Description Service USINT Service code 1 127 Class UINT Logical seg
159. PM4 UIE Output BOOL Rung status same as Enable UIE function language examples Function block diagram 412 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Interrupt instructions Chapter 16 Ladder diagram Structured text 1 enable TRUE 2 IRQTvpe 2 3 output UIE enable IRQTYype UIEN BOOL UIE BOOL Enable LIDINT IROType Enable specific user interrupt ST Equivalence TESTOUTPUT UIE TESTENABLE 2 Results ES Variable Monitoring Sel Global Variables Micro830 Local Variables FRAS_UIE_ST System Varie Hame Logical Value PhysicalValue Lock E T Ka gt 7 gt Ka gt enable d HA DUT ype HAA output Cancel Radwell Automation Publication 20800 HVDOTBENE March 2014Vach 2014 413 Chapter 16 Interrupt instructions UIF flushes removes a pending user interrupt for selected user interrupt s UIF Arguments Parameter Parameter Type Data Type Description Enable Input BOOL Function enable When Enable TRUE perform function When Enable FALSE do not perform function IRQType Input UDINT Use the STI defined words IRQ_HSC3 IRQ_EIIO IRQ_HSC4 IRQ_EII1 IRQ_HSCG IRQ_EII2 IRQ_STIO RU HI IRQ STI IO Ell4 IRQ_STI2 IRQ_EII5 IRQ STI3 IRQ_EII6 IRQ UFR IRQ_EII7 IRQ_UPMO IRQ_HSCO IRQ_UPM1 IRQ_HSC1 IRQ_UPM2 IRQ_HSC2 IRQ_UPM3 IRQ_UPM4 UIF Output BOOL Rung status same as Enable UIF function language e
160. Pite Parameter EE 496 Chapter 18 DERIVAT E Uf E RT 502 PAYS PE RR 525 o ttai it ec ea oda eise 504 INTEGRAL uicissim D ERR II eism e ir ei Cis 506 Ee 512 EE 514 ERR E 516 S EA ed 1 B KE 519 TND oaa Qo Sad Es a bc ca E Coh uoa aa a Cu od DNI Beda dua 522 LIMI ee 524 Chapter 19 SOS e 528 Chapter 20 What is Proportional Integral Derivative PID control 532 How the IPIDController function block implements PID control 533 E IGCHNEREHEER REN 535 GAIN PIDATO Pe enoe n 539 AT Param E 540 IPIDController function block operation 541 Using the Proportional Integral Derivative instruction 543 Using auto tune with the IPIDController function block 543 Example IPIDController with auto tune sss 550 Example How to create a feedback loop for the manipulated value 552 Example How to add a UDFB to a PID program 553 Example How to create an IPIDController program to control Lene at E Gideon anto tt eei oec ian S dela uio teen elei 554 Radwell Automation Publication 2080 RVOOIBENE March 2014 Table of Contents Real Time Clock RTC instructions String manipulation instructions Timer instructions Index Example How to create an IPIDController program to control water SE 556 Chapter 21 RIC RE AD enm EMI i RM S 562 dE OE IIS
161. PushedValue 5 a size 10 3 STACKINT i push pop reset PushedValue 3126 4 empty STACKIHT 1 EMPTT 5 oflo STACKINT 1 OPLO 6 out STACKINT 1 0UT STACKINT iW void STACKINT 1 BOOL PUSH BOOL POP BOOL R1 DINT IN DINT Ni Type STACKIMT Stack of integer analogs ST Equivalence STACKINT is an instance of a STACKINT block STACKINT1 err_detect acknowledge manual mode err code 520 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Processcontrol instructions Chapter 18 max err appli alarm auto mode AND NOT STACKINTI EMPTY err alarm STACKINT1 OFLO last error STAOKINTI OUT Results ES Variable Monitoring Global Variables Microg10 Local Variables UntitledST System Variables Micro810 LH 4 gt Hame Logical Value PhysicalValue Lock DataType E e e e ee push Oo u MN D pap HA BOOL reset MA BB L Pushed alue Nd DINT size Nad BINT empty N BOOL oflo N A O B BE out Nady BINT STACKIMT 1 STACKIN Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 521 Chapter 18 Processcontro instructions TND stops the current cycle of user program scan Then after the output scan TND input scan and housekeeping the user program will be re executed from the start of the first routine Arguments Parameter Parameter Type Data Type Description Enable Input BOOL F
162. REAL angle 70 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Arithmetic instructions Chapter 5 result ACOS_LREAL cosine result is equal to angle Results Variable Monitoring Hame LogicalValue PhysicalValue Lock E K g T E T EA T gt 0 5 L1 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 71 Chapter 5 Arithmetic instructions D Addition adds two or more Integer Real Time or String values Addition Addition operation The Addition function supports additional inputs Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When Enable TRUE execute current addition computation When Enable FALSE there is no computation Applies only to LD programs i1 Input SINT USINT BYTE Addend in Real Time or String data type INT UINT WORD All inputs must be the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME STRING i2 Input SINT USINT BYTE Addend in Real Time or String data type INT UINT WORD All inputs must be the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME STRING o1 Output SINT USINT BYTE Sum of the input values in Real Time or String Tomat INT UINT WORD Input and output must use the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME STRING ENO Output BOOL Enable out Applies only to LD programs Example ST
163. RIG function block 160 RAND function 101 REPLACE function 598 reset coils 48 reset coilin FBD 48 return statements forLD diagrams 52 inserting 52 return symbols inserting FBD elements 52 reverse coils 46 coils in FBD 46 contacts 51 contactsinFBD 51 RHCfunction 366 RIGHT function 596 ROL function 146 ROR function 148 RPCfunction 368 RS function block 162 RTC_READ function block 401 RTC_SET function block 404 rungs Function Block Diagram inserting 37 inserting 37 labels inserting 37 616 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Index S SCALER function block 527 SHL function 150 SHR function 152 SIN function 103 SIN_LREAL function 105 SQRT function 107 SR function block 168 STACKINT function block 530 stencil coils types available for FBD 44 coils types available for LD diagrams 44 contact elements available for LD diagrams 49 rungs inserting in LD containers 37 STIS function 414 string manipulation ASCII function 580 CHAR function 582 DELETE function 584 FIND function 586 INSERT function 588 LEFT function 590 MID function 592 MLEN function 594 REPLACE function 598 RIGHT function 596 subtraction operator 109 SUS function block 540 SYS INFO function block 406 T TAN function 110 TAN _LREAL function 112 TDF function 615 time DOY function 612 TDF function 615 TOF function block 603 TON function block 605 TONOFF function block 607 TOW function 617 TP function block 610 TN
164. Reference Manual Allen Bradley Micro800 Programmable Controllers General Instructions Catalog Numbers 2080 LC10 2080 LC20 2080 LC30 2080 LC50 del EE EE ER d mi T T Aih ze Allen Bradley Rockwell Software Automation Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Safety Guidelines for the Application Installation and Maintenance of Solid State Controls publication SGI 1 1 available from your local Rockwell Automation sales office or online at http www rockwellautomation com literature describes some important differences between solid state equipment and hard wired electromechanical devices Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will Rockwell Automation Inc be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation Rockwell Automation Inc cannot assume responsibility or liability for actual use based on the examples and diagrams No patent liability is assumed by Rockwell Automa
165. S HYSTER function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Processcontrol instructions Chapter 18 Ladder Diagram LD Structured Text ST 1 Zini ze 18507 2 xin2 1 0 3 eps 1 0 4 HYSTER i xinl xine ep3 5 output re HYSTER 1 0 HYSTER iff void HYSTER 1 REAL XIM1 REAL XIMZ REAL EPS Type HYSTER Boolean hysteresis on difference of reals Radwell Automation Publication 2080 AVOIBENE Mib 2014 505 Chapter 18 INTEGRAL 506 Processcontrol instructions INTEGRAL operation When the INTEGRAL function block is first initialized its initial values are not considered Use the R1 parameter to set the initial values for a calculation To prevent loss of the integrated value the integration value is not cleared automatically when the controller transitions from PROGRAM to RUN or when the RUN parameter transitions from FALSE to TRUE Use the R1 parameter to clear the integral value when first transitioning the controller from PROGRAM to RUN mode and when starting a new integration We recommend you do not use the EN or ENO parameters with this function block because the cycle time calculation will be disrupted when EN is FALSE resulting in an incorrect integration If you choose to use the EN or ENO parameters toggle the R1 parameter with EN equal to TRUE to clear the current result and ensure correct integration I
166. S function is enabled relevant HSCApp settings are superseded by the corresponding PLSData settings as shown in the following table HSCApp setting HSCAPP HpSetting HSCAPP LpSetting HSCAPP HPOutput HSCAPP LPOutput PLSData setting HSCHP HSCLP HSCHPOutput HSCLPOutput PLSData parameters example The following figure shows the PLSData parameters in the Variable Selector Radwell Automation Publication 2080 AVOIBENE March nb 2014 319 Chapter 14 High SpesdCaunter HED instructions HSC status codes STS The following table describes the codes that are used to indicate the execution status of the HSC function block Status code 0x00 0x01 0x02 0x03 0x04 Status description No action taken not enabled HSC execution successful HSC command invalid HSC ID out of range HSC configure error 320 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 High GoesdCounter H instructions Chapter 14 HSC SET STS Parameter Enable HsclD Mode1Done HPReached LPReached OFOccurred UFOccurred Sts Arguments Parameter Datatype type Input BOOL Input UINT Input BOOL Input BOOL Input BOOL Input BOOL Input BOOL Output UINT HSC SET STS manually sets or resets the HSC counting status HSC SET STS function block operation The HSC function block must be stopped not counting for the HSC SET STC function block to set or reset its HTS status If the HSC function block is not
167. SCApp HPSetting DINT read write Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 High SosediCounter HD instructions Chapter 14 Upper setpoint in counts that defines when the HSC sub system generates an interrupt The data loaded into the high preset must be less than or equal to the data resident in the overflow HSCAPP OFSetting parameter or an HSC error is generated LPSetting Parameter Data type User program access HSCApp LPSetting DINT read write Lower setpoint in counts that defines when the HSC sub system generates an interrupt e The data loaded into the low preset must be greater than or equal to the data resident in the underflow HSCAPP UFSetting parameter or an HSC error is generated e Ifthe underflow and low preset values are negative numbers the low preset must be a number with an absolute value smaller than the underflow OFSetting Parameter Data type User program access HSCApp OFSetting DINT read write Overflow setting that defines the upper count limit for the counter e Ifthe counter s accumulated value increments above the value specified in OF Setting an overflow interrupt is generated e When the overflow interrupt is generated the HSC sub system resets the accumulator value to the underflow value and the counter continues counting from the underflow value counts are not lost in this transition OFSetting values must be e Between 2 147 483 648 and 2 147 483
168. TCBatLaow RTC READ 20 void RTC READ 1 BOOLEnabl Type RTC READ Read RTC module information Radwell Automation Publication 2080 HVDOIBENE Mib 2014 563 Chapter 21 Real TmeCod RIO instructions RTC_SET Parameter Enable RTCEnable RTCData RTCPresent RTCEnabled RTCBatLow Sts 564 Arguments Parameter Datatype type Input BOOL Input BOOL Input RTC Output BOOL Output BOOL Output BOOL Output USINT RT CEnable HICLData RTIC SET sets RTC status or write RTC information Description Function block enable When Enable TRUE execute RTC set with the RTC info from input When Enable FALSE there is no read operation and output RTC data is invalid TRUE To enable RTC with the RTC data specified FALSE To disable RTC Note This is ignored by Micro810 controllers RTC data information yy mm dd hh mm ss week This RTC data are ignored when RTCEnable 0 See RTC data type on page 394 TRUE RTC hardware is plugged in FALSE RTC hardware is not plugged in TRUE RTC hardware is enabled timing FALSE RTC hardware is disabled not timing TRUE RTC battery is low FALSE RTC battery is not low The read operation status See RTC Set Status values on page 397 RTC SET function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 Peal TimeClock RIO instruct
169. TO Accumulator value is rolled over to 0 or to the opposite Soft Limit if the limit is activated and the execution of the function block continues e Ifthe axis is in a moving state and the MC_MoveVelocity function block issues a motion in which the direction the sign of Velocity Direction is the opposite of the current motion direction the function block reports an error e Once the signal InVelocity is set it indicates the MC_MoveVelocity function block has completed Any subsequent motion event has no effect on the function block outputs except the signal InVelocity e The InVelocity output of the MC MoveVelocity function block stays True once the Velocity of the axis reaches the commanded Velocity until the function block is aborted e The sign of Velocity Direction determines the motion direction for a MC_MoveVelocity function block If the Velocity sign and the Direction sign are the same positive motion is issued If the Velocity sign and the Direction sign are different negative motion is issued e The signal InVelocity is reset when the MC_MoveVelocity is aborted by another function block Motion event or at the falling edge of Execute e To stop or change the motion initiated by the MC_MoveVelocity function block the function block must be interrupted or aborted by another function block which includes executing the MC_MoveVelocity function block again with different parameters e Ifthe MC_Mov
170. TRING DINT STRING BOOL Description Function enable When EN TRUE yield specified number of characters from the right end of the string When EN FALSE no operation Any non empty string Number of characters to be extracted This number cannot be greater than the length of the IN string Right part of the string length NbC Can be e empty string if NbC 0 e complete string if NbC gt string length Enable out RIGHT function language examples Function block diagram Ladder diagram Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulation instructions Chapter 22 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Structured text 1 nhc r Z A output ze RIGHTiin nbc RIGHT STRING RIGHT CSTRING IM DINT Me Extract right of a string ST Equivalence complete string RIGHT 12345678 4 LEFT 12345678 4 5 complete string is 56781234 the value issued from RIGHT call is 5678 the value issued from LEFT call is 1234 Results ES Variable Monitoring Logical Value Physical Yal 7 gt abcde nbc z Lj SS do KEN In Cancel 585 Parameter EN IN Str NbC Pos REPLACE ENO Stringmentoulation instructions REPLACE replaces parts of a string with new sets of characters Arguments Parameter Type Input Input Input Input Input Output Output Data Type BOOL STR
171. TROLLER on page 535 Proportional Integral Derivative Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 531 Chapter 20 Proportional Integral Derivative PD instruction Proportional Integral Derivative PID control allows the process control to What is Proportional accurately maintain the setpoint by adjusting the control outputs A PID function Integral Derivative PID block combines all of the necessary logic to perform control proportional integral derivative PID control 532 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Frooortional Integral Derivative PD instruction Chapter 20 H he IPI il The IPIDController function block available in the Connected Components ow the IPIDController Workbench instruction set is based on PID control theory and combines all of function block implements the necessary logic to perform analog input channel processing and proportional integral derivative PID control In the HMI the IPID faceplate is available for PID control use with the IPIDController function block IPIDController function block description The IPIDController function block uses the following function block components e A Acting 1 e PG Proportional Gain e DG Derivative Gain e td aD e ti al Process Value Auto Mode A l Initialize lt __ Set Point Feedback Tracking Radwell Automation Publication 2080 AVOIBEN
172. Text ST 1 SYS INFO l1 enable 2 output 9 BYS INFO 1 5ts SYS INFO iff void bp IMFO 1i BOOL Enable Type SYS INFO Read Micro system status Results Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 ES Variable Monitoring Global Variables Micro Local Variables LIntiledS T System Variables MicroB10 170 Micro 2 Hame j LogicalYalue Physical Value Lock Data Type e en ee e D Fromm NENNEN DE ONE NE SYSINFO output Booth ajA ev N A LINT output BoothlinA ev M UINT output OS Senes M ey LINT output 0 Shaji ew M UINT output 0S hlinA er M B LINT output Modebehaviour Ye BOOL autput F ault CI veride KR BOOL output StrtUpFrotect HA BOOL output Mat rH alted M a BOOL output Ma mt ode M LINT nutput Maj ErlFH KR BOOL output UFA Pou um HA UINT output MIL oad lwauz M B BOOL output MM LoadU ne rror Yay BOOL output Mbi PivdM match WA BOOL output FreeR unClock M ey LINT nutput Farceslnstall M S BOOL output E mlnFilterki od AY ey BOOL a Grp NEU 1 ge Grp IMFE Grp NEU T Enable M AA BOOL SYS_INFO_1 5ts ab SYSINFO Cancel SYS_INFO data type The following table describes the SYSINFO data type Parameter Data type Description BootMajRev UINT Boot Major Revision BootMinRev UINT Boot Minor Revision Operating System Series UINT Operating System Series 0 indicates a series A device 1 indicates a series B device
173. When using the MM INFO on controllers with an SD card the revision is 0 Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 377 Chapter 15 378 Input Output instructions Parameter Data type UPValid BOOL ModeBehavior BOOL LoadAlways BOOL LoadOnError BOOL FaultOverride BOOL MMPresent BOOL Description User program valid TRUE Valid Mode behavior TRUE Go to RUN on power up Memory Module restore to controller always on power up Memory Module restore to controller if power up with error Override fault on power up Memory Module is present Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Input Output instructions Chapter 15 PLUGIN INFO Parameter Enable SlotlD ModID VendorlID ProductType ProductCode ModRevision ENO PLUGIN_INFO reads the Plug in Generic Module Information It can read any Plug in module information except for 2080 MEMBAK RTC modules When a Plug in Generic Module is not present all values return to zero 0 PLUGIN_INFC Enable ModRewision Arguments Parameter Data Description type type Input BOOL Function block enable When Enable TRUE execute P IM information read When Enable FALSE the function block is not executed All output data values are reset to 0 Input UINT Plug in slot number Slot ID 1 2 3 4 5 starting with far left slot 1 Output UINT Plug in Generic Module physical ID Output UINT Plug in Generic
174. a value to a 32 bit double Word value ANY TO DWORD uM Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When Enable TRUE execute the conversion to the 32 bit double Word computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT BYTE Any value other than a double word INT UINT WORD DINT UDINT LINT ULINT LWORD REAL LREAL TIME DATE STRING o1 Output DWORD A 32 bit double Word value ENO Output BOOL Enable out Applies only to LD programs ANY TO DWORD operator ST language example ST Equivalence bres ANY TO DWORD true bres is 1 tres ANY TO DWORD t 1s46ms tres is 1046 mres ANY TO DWORD 0198 mres is 198 272 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO INT converts a value to a 16 bit Integer value ANY TO INT Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When Enable TRUE execute the conversion to the 16 bit Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT BYTE Any non 16 bit Integer value UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING o1 Output INT A 16 bit Integer value ENO Output BOOL Enable
175. able When Enable TRUE execute function When Enable FALSE do not execute function InputType Input USINT Type of input 0 Embedded input 1 Plug in input InputSlot Input USINT Input slot For embedded input always 0 For Plug in input input slot is 1 2 3 4 5 Plug in slot number starting with left most slot 1 Sts Output USINT Immediate input scan status See IIM status codes on page 364 ENO Output BOOL Enable out Applies only to LD programs IIM function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 363 Chapter 15 InputCutput instructions 364 Ladder Diagram LD Structured Text ST 1 enable TRUE ch InputType re 3i InputS5lot re 0 di IIN i enable InputType Inputsalot B output IIM 1 ate Results Hame Logical Value PhyszicalValue Lock e InputTupe M ty Inputs lot WA output BA IM Cancel IIM status codes The following table describes the codes that are used to indicate the input scan status of the IIM function block Status code Description 0x00 Not enabled no action taken 0x01 Input output scan success 0x02 Input output type invalid Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Inout Outout instructions Chapter 15 Status code Description 0x03 Input output slot invalid Radwell Automation Publication 2080 HVDOTBENE March 2
176. ach input of an instruction block is labeled and has a defined type Input connection Inputs are connected on the left border Output Each output of an instruction block is labeled and has a defined type Output connection Outputs are connected on the right border Calling a function block When a function block is called in a program an instance of the block is actually called The instance uses the same code but the input and output parameters are instantiated which means local variables are copied for each instance of the function block The values of the variables of a function block instance are stored from one cycle to the other A function block can be called by a program or by another function block They cannot be called by functions because functions are not instantiated Defining function block and parameter names The interface of a function block must be explicitly defined with a type anda unique name for each of its calling input parameters or return output parameters Function blocks can have more than one output parameter The value of a return parameter for a function block is different for each programming language FBD LD ST Fall Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 Finding information about instructionsand lecber elements Chapter 1 Function block names and function block parameter names can use up to 128 characters Function block parameter names can begin with a letter or an
177. ached Parameter Data type HSC mode User program access HSCSTS HPReached BOOL 2 9 read write The HSC sub system sets the HSCSTS HPReached status flag to 1 whenever the accumulated value HSCSTS Accumulator is greater than or equal to the high preset variable HSCAPP HPSetting This bit is updated continuously by the HSC sub system whenever the controller is in an executing mode Writing to this element is not recommended LPReached Parameter Data type HSC mode User program access HSCSTS LPReached BOOL 2 59 read only The HSC sub system sets the HSCSTS LPReached status flag to 1 whenever the accumulated value HSCSTS Accumulator is less than or equal to the low preset variable HSCAPP LPSetting This bit is updated continuously by the HSC sub system whenever the controller is in an executing mode Writing to this element is not recommended OFCauselnter Parameter Data type HSC mode User program access HSCSTS OFCauselnter BOOL 0 9 read write The Overflow Interrupt status bit sets 1 when the HSC accumulator counts through the overflow value and the HSC interrupt is triggered This bit can be used in the control program to identify that the overflow variable caused the HSC interrupt If the control program needs to perform any specific control action based on the overflow this bit is used as conditional logic This bit can be cleared 0 by the control program and is also cleared by the HSC sub system whenever these condit
178. ad Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Radwell Automation Publication 2080 RVOOIBENE March 2014 Copyright O 2014 Rockwell Automation Inc All rights reserved Printed in the U S A
179. age 276 ANY TO REAL on page 277 ANY TO SINT on page 278 ANY TO STRING on page 279 ANY TO TIME on page 280 ANY TO UDINT on page 281 ANY TO UINT on page 282 ANY TO ULINT on page 283 ANY TO USINT on page 284 ANY TO WORD on page 285 Division on page 85 Equal on page 252 Greater Than on page 254 Greater Than or Equal on page 255 Less Than on page 256 Less Than or Equal on page 257 MOV on page 92 Multiplication on page 93 Neg on page 94 NOT on page 163 Not Equal on page 258 OR on page 160 Subtraction on page 105 XOR on page 162 Finding information about instructionsand lecber elements Functional category Arithmetic instructions on page 65 Arithmetic instructions on page 65 Compare instructions on page 251 Arithmetic instructions on page 65 Boolean instructions on page 153 Compare instructions on page 251 Boolean instructions on page 153 Arithmetic instructions on page 65 Boolean instructions on page 153 Radwell Automation Publication 2080 RVDOIBENE March 2014 March 2014 Chapter 1 31 Element LD program on page 34 LD program development environment on page 35 Ladder Diagram LD elements on page 37 Instruction blocks in LD programs on page 53 Working in the LD language editor on page 54 Ladder Diagram LD program examples on page 56 Chapter 2 Ladder Diagram LD language Ladder Diagram language r
180. age 352 RHC on page 357 RPC on page 359 Function block DLG on page 360 IIM on page 363 IOM on page 366 KEY READ on page 369 KEY READ REM on page 372 MM INFO on page 376 PLUGIN INFO on page 379 PLUGIN READ on page 382 PLUGIN RESET on page 385 PLUGIN WRITE on page 387 RCP on page 389 RTC READ on page 393 RTC SET on page 396 SYS INFO on page 398 TRIMPOT READ on page 401 Description Display string or number Micro810 only Change remote LCD backlight color and mode Display messages on remote LCD Read high speed clock Reads user program checksum Description Save data and global local variables to an SD Card Data Log file Update inputs prior to normal output scan Update outputs prior to normal output scan Read key status on the optional LCD module Micro810 only Read key status on remote LCD Read memory module header information Get module information from a generic plug in module excluding Memory Module Read data from a generic plug in module Reset a generic plug in module hardware reset Write data to a generic plug in module Read write recipe data to and from an SD memory card Read real time clock RTC module information Set real time cock data to real time clock module Read Micro800 system status Read the trimpot value from a specific trimpot Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 345 Chapter 15 Inout Outout inst
181. age 68 ACOS LREAL on page 70 Addition on page 72 ASIN on page 73 ASIN LREAL on page 75 ATAN on page 77 ATAN_LREAL on page 79 COS on page 81 COS LREAL on page 83 Division on page 85 EXPT on page 86 LOG on page 88 MOD on page 90 MOV on page 92 Multiplication on page 93 Neg on page 94 POW on page 95 RAND on page 97 SIN on page 99 SIN LREAL on page 101 SQRT on page 103 Subtraction on page 105 TAN on page 106 TAN LREAL on page 108 TRUNC on page 110 Chapter 5 Arithmetic instructions Arithmetic instructions give a controller the ability to perform mathematical functions such as addition subtraction multiplication and division on data Description Absolute value of a Real value Arc cosine of a Real value Perform 64 bit real arc cosine calculation Add a value Arc sine of a Real value Perform 64 bit real arc sine calculation Arc tangent of a Real value Perform 64 bit Real arc tangent calculation Cosine of a Real value Perform 64 bit Real cosine calculation Divide Integer or Real value Exponent calculation of Real values Logarithm of a Real value Module Move a copy of a value Multiply an Integer or Real value Negate a value Power calculation of Real values Random value Sine of a Real value Perform 64 bit real sine calculation Square root of a Real value Subtract a value Tangent of a Real value Perform 64 bit real tangent calculation Tr
182. age over a serial port MSG_MODBUS operation A maximum of four message requests per channel can be processed in one scan For Ladder Diagram programs message requests are executed at the end ofa ladder scan Arguments Parameter Datatype type Input Input Input Input Input Output Output Output BOOL BOOL MODBUSLOCPARA MODBUSTARPARA MODBUSLOCADDR BOOL BOOL UINT Description If Rising Edge IN turns from FALSE to TRUE start the function block With the precondition that the last operation has been completed TRUE Cancel the execution of the function block Define structure input local device Defines the input structure for the local device See MODBUSLOCPARA data type on page 199 Define structure input target device Defines the input structure for the target device See MODBUSTARPARA data type on page 203 MODBUSLOCADDR is a 125 Word array that is used by Read commands to store the data 1 125 words returned by the Modbus slave and by Write commands to buffer the data 1 125 words to be sent to the Modbus slave TRUE MSG instruction is finished FALSE MSG instruction is not finished TRUE When error occurs FALSE No error Show the error code when message transfer failed See Modbus error codes on page 199 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 197 Chapter 9 Communtation instructions Note Ifa trigger is set to continuous
183. alue can be adjusted T he number of configurable combinations depends on the number of inputs connected to the function For example Number 0 1 PS Ww N In3 O O O O c In2 In1 Ind 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Boolean instructions Chapter 8 Number In3 In2 In1 Ing 5 0 1 0 1 6 0 1 1 0 l 0 1 1 1 8 1 0 0 0 9 1 0 0 1 10 1 0 1 0 11 1 0 1 1 12 1 1 0 0 13 1 1 0 1 14 1 1 1 0 15 1 1 1 1 TTABLE function language examples Function block diagram Ladder diagram dall Automation Publication 2080 RVOOIBENE Mach 2014IVaich 2014 167 Chapter 8 Boolean instructions Structured text 1 table 217 2 in TRUE a ini i9 TRUE 4 ing ze TRUE 5 ind FALSE 5 output TTABLE table inO inl L in3 TTABLE BOOL TTABLE UINT Table BOOL INO BOOL INI BOOL INZ BOOL INS Provide the value output based on the combination of inputs Variable Monitoring Results Global Variables Microf10 Local Variables UntitledST System Variables Microfl 2 Hame Logical Value PhysicalYalue Lock Data Type e e e e ba table 21r HA UIMT in M AA BOOL m HA BOOL Ine ALAA BOOL n3 Mad BOUL output BY BOOL SOSS 168 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 TTABLE input combinations Bookan instructions Chapter 8 The function has four inputs and therefo
184. ameter Datatype Description DirectActing BOOL The type of acting e TRUE direct acting output moves same direction as error That is the actual process value is greater than the SetPoint and the appropriate controller action is to increase the output For example Chilling e FALSE reverse acting output moves opposite direction as error That is the actual process value is greater than the SetPoint and the appropriate controller action is to decrease the output For example Heating ProportionalGain REAL Proportional gain for PID gt 0 0001 Timelntegral REAL Time integral value for PID gt 0 0001 TimeDerivative REAL Time derivative value for PID 0 0 DerivativeGain REAL Derivative gain for PID gt 0 0 Radwell Automation Publication 2080 AVOIBENE Mib 2014 539 Chapter 20 Proportional Integral Derivative PD instruction AT Param data type The following table describes the AT_Param data type parameters Parameter Datatype Description Load REAL Load parameter for auto tuning This is the output value when starting AutoTune Deviation REAL Deviation for auto tuning This is the standard deviation used to evaluate the noise band needed for AutoTune Step REAL Step value for AutoTune Must be greater than noise band and less than 1 2 Load ATDynamSet REAL Waiting time in seconds before abandoning auto tune ATReset BOOL The indication of whether the output value is reset to zero after an AutoTune seque
185. ample Pulse Rising Edge Coil Set Coil Set coils support a Boolean output of a connection line Boolean state Pd Se Left Right connection connection The associated variable is set to TRUE when the Boolean state of the left connection becomes TRUE The output variable keeps this value until an inverse order is made by a Reset coil The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be output or it must be user defined Example Set Coil Reset Coil Reset coils support a Boolean output of a connection line Boolean state LU E Left Right connection connection The associated variable is reset to FALSE when the Boolean state of the left connection becomes TRUE The output variable keeps this value until an inverse order is made by a Set coil The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be output or user defined Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 47 Chapter 3 Lader Diagram LD elements Example Reset Co
186. an configure its variables from the Block selector or from the Variable selector Follow these steps to add a block element to an LD program or change an existing block element to a different type Add a block element to a program 1 From the Toolbox drag the block element into the language editor and place it in the correct location to display the Block Selector 2 InSearch type the name of the block you want to add or sort and scroll through the list to find it Fall Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Lat Diagram LD elementis Chapter 3 3 Double click the block to add it to the program Change the block element type 1 Inthe language editor double click the block to display the Block Selector 2 InSearch type the name of the block or sort and scroll through the list to find it 3 Double click the block to update it Enable EN ENO You can enable the EN input parameter and ENO output parameter so they will always be added with the instruction block even when there is an available boolean input or output Note The EN and ENO parameters will only be added to instruction blocks you add after you enable the setting instructions blocks already in the LD program will not be affected To enable EN ENO for all blocks added to LD program 1 Onthe Tool menu click Options 2 Select IEC Languages gt Ladder Diagram LD to display the language editor properties In Block Settings set Enable EN
187. an or equal to zero SQRT Output REAL Square root of the input value The returned result is 0 for a negative IN value ENO Output BOOL Enable out SQRT function language examples Function block diagram Ladder diagram Structured text i in i IBJBS 2 SquareRoot SORT in SORT REAL SQRTIREAL IM Square rook ST Equivalence Radwell Automation Publication 2080 HVDOIBENE Mib 2014 103 Chapter 5 Arithmetic instructions xpos ABS xval xroot SORT xpos Results Variable Monitoring 104 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Arithmetic instructions Chapter 5 Subtraction Parameter EN 01 ENO Parameter Type Input Input Input Output Output Subtraction subtracts an Integer Real or Time value from another Integer Real or Time value E Arguments Data Type BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME BOOL Example ST equivalence aolO aod all01 321102 aioli 1 Description Function enable When Enable TRUE execute current addition computation When Enable FALSE there is no computation Ap
188. ation Publication 2080 AVOIBENE Mach 2014Vach 2014 Chapter 9 Communication instructions Communication instructions read write compare and convert communication strings Function block Description MSG CIPGENERIC on page 178 Send a CIP generic explicit message MSG CIPSYMBOLIC on page 187 Send a CIP symbolic explicit message MSG MODBUS on page 197 Send a Modbus message MSG_MODBUS2 on page 204 Send a MODBUS TCP message over an Ethernet Channel Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 177 Chapter 9 Communtation instructions MSG_CIPGENERIC sends a common industrial protocol CIP explicit message over an Ethernet channel or a serial port MSG_CIPGENERIC MSG_CIPGENERIC operation A maximum of four message requests per channel can be processed in one scan For Ladder Diagram programs message requests are executed at the end ofa ladder scan Arguments When the MSG_CIPGENERIC function block is enabled the receive buffers for Read operations are cleared on the rising edge of Enable Parameter Parametertype Datatype Description IN Input BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed CtriCfg Input CIPCONTROLCFG Function block execution control configuration See CIPCONTROLCFG data type on page 180 AppCfg Input CIPAPPCFG CIP service and application path EPATH configuration See CIPAP
189. b 2014 597 Chapter 23 Timer instructions TP Parameter IN PT ET 598 On a rising edge TP increases an internal timer up toa given value If the timer is elapsed it resets the internal timer Arguments Parameter Data type type Input BOOL Input TIME Output BOOL Output TIME TP timing diagram Description If rising edge starts increasing internal timer if not already increasing If FALSE and only if timer is elapsed resets the internal timer Any change on IN during counting has no effect Maximum programmed time See Time data type If TRUE timer is counting Current elapsed time Possible values range from Oms to 1193h2m47s294ms Note f you use the EN parameter with this block the timer starts incrementing when EN is set to TRUE and continues to increment even if EN is set to FALSE See Time data type TP function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Timer instructions Chapter 23 Ladder Diagram LD Structured Text ST 1 MaxTime T 383 2 TP Lin MaxTime SE output TP 1 9 4 elapse TP_1 ET TP ij void TP 1 BOOL IM TIME PT Type TP Pulse timing Results Variable Monitoring Global Variables Micro810 Local Variables UntitledsT System Variables Hame Logical alue PhysicalYalue Lock Data bei m i m i 4 BOOL
190. ble When EN TRUE execute current LIMIT computation When EN FALSE there is no computation Input DINT Minimum value supported Input DINT Any signed integer value Input DINT Maximum value supported Output DINT Input value bounded to the supported range Output BOOL Enable out LIMIT function language examples Function block diagram Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Processcontol instructions Chapter 18 Ladder diagram Structured text 1 minimun ZP cx in re 5 3 Wak iium r 10 4 output LIMIT minimum in maximum LIMITI DINT LIMIT DINT MIN DINT IM DINT MAX Limit ST Equivalence new value LIMIT min value value max value bounds the value to the min value max value set Radwell Automation Publication 2080 HVDOIBENE Mib 2014 525 Chapter 18 Processcontro instructions Results Variable Monitoring minimum Ii masimum output ririmin Ii maximum output minimi Ii maximim output 526 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Chapter 19 Program control instruction Program control instructions are used to control instructions simultaneously from a user program and from an operator interface device Function block Description SUS on page 528 Suspend the execution of the application Radwell Automation Publication 2
191. blication 2080 HVDOIBENE Mib 2014 Arithmetic instructions Chapter 5 COS vields the Cosine of a Real value COS didi Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current cosine computation When EN FALSE there is no computation IN Input REAL Any Real value COS Output REAL Cosine of the input value in set 1 0 1 0 ENO Output BOOL Enable out COS function language examples Function block diagram Ladder diagram Structured text LU in 10 0 2 cosine COZ in COSB REAL COS REAL IN Cosine ST Equivalence cosine COS angle result ACOS cosine result is equal to angle Radwell Automation Publication 2080 HVDOIBENE Mib 2014 81 82 Chapter 5 Arithmetic instructions Results Variable Monitoring Global Variables Micro Local Variables FAA amp _CUS_LD Sustem Vari Hame Logical Value PhysicalValue Lock E gt pti pt N A Al Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 COS_LREAL calculates the cosine of a Long Real value COS_LREAL Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current computation When EN FALSE there is no computation IN Input LREAL Any Long Real value COS LREAL Output LREAL Cosine of the input value in
192. block 450 MC_MoveRelative function block 455 MC_MoveVelocity function block 459 MC_Power function block 464 MC_ReadAxisError function block 469 MC_ReadBoolParameter function block 475 MC_ReadParameter function block 479 MC_ReadStatus function block 482 MC_Reset function block 487 MC_SetPosition function block 490 MC_Stop function block 494 MC_TouchProbe function block 498 MC_WriteBoolParameter function block 503 MC_WriteParameter function block 507 MID function 592 MIN function 302 MLEN function 594 MMINFO function block 385 MOD function 94 motion MC_AbortTrigger function block 438 MC_Halt function block 441 MC_Home function block 445 MC_MoveAbsolute function block 450 MC_MoveRelative function block 455 MC_MoveVelocity function block 459 MC_Power function block 464 MC_ReadAxisError function block 469 MC_ReadBoolParameter function block 475 MC_ReadParameter function block 479 MC_ReadStatus function block 482 MC_Reset function block 487 MC_SetPosition function block 490 MC_Stop function block 494 MC_TouchProbe function block 498 MC_WriteBoolParameter function block 503 MC_WriteParameter function block 507 Motion control function blocks 425 MOV operator 96 MSG CIPGENERIC function block 182 MSG CIPSYMBOLIC function block 191 MSG MODBUS function block 202 Map MODBUS2 function block 209 multiplication operator 97 MUX4B function 178 MUX8B function 174 naming conventions function blocks 19 Neg operator 98 not equal opera
193. borted Output BOOL When TRUE command was aborted by MC Power OFF function block or ErrorStop Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 MC_Stop function block language examples Function Block Diagram FBD 484 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Motion control instructions Chapter 17 Ladder Diagram LD Structured Text ST Deceleration Stop re 10 0 Jerk stop 10 0 HC Stop i xisl Execute stop beceleration stop Jerk stop Done stop re Hc stop 1 Dbone Busy Stop re MG stop i Busv Active Stop re HC Stop 1 Active Command ibort Stop re Hc Stop i Command borted Error Stop HC Stop 1 Error ErrorID Stop re Ho Stop 1 ErrorID MC Stop iff void ML Stop 1 A XIS REF AxisIn BOOL Execute REAL Deceleration REAL Jerk Type MC Stop Commands a controlled motion stop and transfers the axis to the state Stopping Results Radwell Automation Publication 2080 AVOIBENE Mib 2014 485 Chapter 17 Motion control instructions Axis Hamed Yes bireme LGeceler tee Position and Velocity Command Poetic 392456 90 mm Command Velecity 331531 mm sec Targe Postam DO mm Targat Velocity DD mmyzec 486 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 MC TouchProbe Parameter EN Axisln Triggerlnp Execute IVbtioncontrol inst
194. branch before a selected element Inserts an instruction block after a selected element Inserts an instruction block before a selected element Inserts a contact after a selected element Inserts a contact before a selected element Inserts a coil after a selected element Inserts a coil after a selected element Inserts a jump after a selected element Inserts a jump after a selected element Inserts a return after a selected element Inserts a return after a selected element For coils or contacts toggles between the available types Selects clears the grid in the Language Editor workspace Moves to the next rung When an element is selected on a rung moves to the next rung containing the selected element Opens the block selector Moves to the previous rung When an element is selected on a rung moves to the previous rung containing the selected element Moves between branches and sub Removes a selected rung or element Calls the Variable Block Selector depending on the selected element Inserts a line break Opens a line above the current line Opens a line below the current line Removes the current line Removes the next word in the current line Removes the character on the left Removes the previous word in the current line Copies the selected text to the clipboard Fall Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Lat Diagram LD elementis Chapter 3 Short
195. bsolute function block the position input is the absolute location to be commanded to the axis For MC MoveRelative the distance input is the relative location considering current axis position is 0 from current position Velocity input Velocity can be a signed value but it can also use Direction input to define the sign of the velocity negative velocity x negative direction positive velocity The E parameter Direction refers to the velocity input and output for compatibility reasons Direction input For distance position motion with the target position either absolute or relative defined the motion direction is unique The direction input for distance move is ignored For velocity motion direction input value can be 1 positive direction 0 current direction or 1 negative direction For any other value only the sign is considered For example 3 denotes negative direction 2 denotes positive direction and so on For velocity move MC_MoveVelocity the sign velocity x direction determines the actual motion direction if the value is not 0 For example if velocity x direction 300 then direction is positive 418 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Rule applies to Acceleration Deceleration and Jerk inputs Output exclusivity Output status Behavior of Done output Behavior of Busy output Behavior of CommandAborted output Motion contol instructions Chapter 17 Rule
196. c instructions random selection of 1 of 4 pre defined values the value issued of RAND call is in set 0 3 so selected issued from MUX4 will get randomly the value 1 if 0 is issued from RAND or 4 if 1 is issued from RAND or 8 if 2 is issued from RAND or 16 if 3 is issued from RAND Results ES Variable Monitoring Global Variables Micro 0 Local Variables ARA_RAND_LD Sustem V 2 Mame Logical Value PhysicalYalue Lock E T e e e ao qus mi T A Lil random BA L Cancel 98 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 SIN vields the Sine of a Real value SIN i Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current sine computation When EN FALSE there is no computation IN Input REAL Any Real value SIN Output REAL Sine of the input value in set 1 0 1 0 ENO Output BOOL Enable out SIN function language examples Function block diagram Ladder diagram Structured text 1l in lt 0 45 cx sine SIN in SIMI REAL amp IM REAL IM Sine ST Equivalence sine SIN angle Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 99 Chapter 5 Arithmetic instructions result ASIN sine result is equal to angle Results Variable Monitoring Hame LogicalValue PhysicalValue Lock E
197. cause of differences in the way numbers are rounded Two output values may appear equal in a Connected Components Workbench display but will evaluate as false For example 23 500001 compared to 23 499999 will both display as 23 5 in the variable input display but will not be equal in the controller Fall Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Lacoer Diagram LD elements Chapter 3 To test whether two Real data type values are equal you can use a Subtraction instruction to get the difference between the values and then determine if the difference is Less Than an established precision value See the following LD program example for comparing two Real data type values Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 57 Ladder Diagram LD elements LD Keyboard shortcuts The following keyboard shortcuts are available for use with the LD language Shortcut Ctrl 0 Ctrl Alt 0 Ctrl 1 Ctrl Alt 1 Ctrl 2 Ctrl Alt 2 Ctrl 3 Ctrl Alt 3 Ctrl 4 Ctrl Alt 4 Ctrl 5 Ctrl Alt 5 Ctrl 6 Ctrl Alt 6 Space bar Shift2 Ctrl Alt G Ctrlt Down Arrow Ctrl R Ctrl Up Arrow Down Up Right Left Delete Enter Shift Enter Ctrl Enter Ctrl Shift Enter Ctrl Shift L Ctrl Delete Backspace Ctrl Backspace Ctrl C Description Inserts a rung after a selected rung Inserts a rung before a selected rung Inserts a branch after a selected element Inserts a
198. cfg MODBUSTE Var Dz TcFg Addr LIDINT Var i Dz Teg Node LISIMT Var BD laddr 1 WORD Var D2 laddr 2 WORD Var D2 laddr 3 WORD Var Dz laddr 4 WORD Var Dz laddr 5 WORD Var MSG MODBUS Read variables The following table identifies the variables and the values used to configure the MSC MODBUS instruction to read status data from a PowerFlex 4 drive Variable Value Description Channel 5 Channel 5 location of SERIALISOL module TriggerType 0 Trigger on False to True transition 246 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Variable Cmd ElementCnt Addr Node Jaddi 1 Jaddr 2 Jaddr 3 Jaddr 4 Value 8449 data data data data Gmmuncation instructions Chapter 9 Description Modbus Function Code 03 Read Holding Registers Length PowerFlex Logic Status word address 1 PowerFlex Node address PowerFlex Logic Status word PowerFlex Error Code PowerFlex Commanded Speed Speed Reference PowerFlex Speed Feedback Actual Speed MOV instruction example The following images shows an example of using the MOV instruction to move the I 1 array value to a Word which allows you to directly access the individual bits Timer_OnOFEQ Modbus Write example The following MSG MODBUS instruction is used to write control data to a PowerFlex 40 drive Radwell Automation Publication 2080 HVDOIBENE Mib 2014 247 Chapter 9 248
199. ck the rectangular area above the rung then type comments 2 Click anywhere in the Language Editor workspace to save the comments LO_Program POU x Add a label to a rung Every rung in the language editor has an area to the left of the rung for entering a label name Label name requirements Labels can be an unlimited number of characters beginning with a letter or underscore character followed by letters numbers and underscore characters Labels cannot have spaces or special characters for example or V To add a label for a rung e Click the area to the left of the rung then type a label name Example Label To add an element to an LD program To add a rung to the LD language editor do one of the following Fall Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 LecberDegram LD elements Chapter 3 e From the Toolbox drag the rung element into the language editor or e From the Toolbox double click the rung element to add it to the language editor or e Right click and existing rung select Copy and then paste a copy of the rung into the language editor Tip A plus sign appears on top of a Toolbox element when you hover over a valid target Release the mouse button to add the element Tip You can use keyboard shortcut keys to add elements to your LD program See LD Keyboard shortcuts on page 58 Tip If your ladder diagram contains more than 355 rungs use the do
200. cro850 controllers except for 2080 LCxx A WB support up to six HSC inputs HSC functionality is implemented in Micro800 controllers using high speed counter hardware embedded inputs in the controller and the HSC instruction in the application The HSC instruction configures the high speed counter hardware and updates the image accumulator Important The HSC function can only be used with the controller s embedded 1 0 It cannot be used with expansion 1 0 modules Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 High SosediCounter HD instructions Chapter 14 HSC Parameter Enable HscCmd HSCAppData HSCStsInfo PIsData Sts ENO HSC applies high presets low presets and output source values to the high speed counter HscAppData Hsc5tslnfo Fis Data Arguments Parametertype Datatype Input Input Input Input Input Output Output BOOL USINT HSCAPP HSCSTS DINT UDINT UINT BOOL Description Function block enable When Enable TRUE execute the HSC operation specified in the HSC command parameter When Enable FALSE no HSC commands are issued Issues commands to the HSC See HSCCmd values on page 302 HSC application configuration which is usually only needed once See HSCAPP data type on page 303 HSC dynamic status which is continuously updated during HSC counting See HSCSTS data type on page 310 Programmable Limit Sw
201. ctured Text ST Deceleration Halt 10 0 Jerk Halt 10 03 434 Hc Halt l xisl Execute Halt Dbeceleration Halt Jerk Halt ButferMode Halt Done Halt re Hc Halt 1 Dbone Busy Halt Hc Halt 1 Busvy Active Halt HC Halt 1 Active Command bort Halt Hc Halt 1 Command borted Error Halt H c Halt 1 Error ErrorID Halt ren Halt 1 ErrarID MC Halt iW void ML Halt 1 AXIS REF AxisIn BOOL Execute REAL Deceleration REAL Jerk SINT BufferMade Type MC Halt Commands a controlled motion stop The axis is moved to the state Discrete Motion until the velocity is zero Results Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 e i E li ll x See i Merch t Axis Monitor i H a MWanableMonienng 5 I 1 e860 Local Variables MA Segen Variables M Axis State Axis Hemed Yet Position and Velocity Ceocnmand Pesitiea 42223 8b6 mm Command Velceity 413 185 mm sec Target Position DO mm Target Velocity QD mmvser Radwell Automation Publication 2080 HVDOIBENE Mib 2014 435 Chapter 17 MC Home 436 Motion contol instructions Parameter EN AxisIn Execute MC Power commands the axis to perform the search home gt sequence The details of this sequence are manufacturer dependent and can be set by the axis parameters The Position input is used to set the absolute position wh
202. curs If the axis motion is an open loop motion the commanded position not an actual position at the time the trigger event occurs assuming there is no motion delay between the drive and the motor Motion fixed input output Motion Signals PTOO PTO1 PTO2 PTO pulse Output 0 Output 1 Output2 PTO direction Output 3 Output 4 Output 5 Lower Negative Limit switch Input 0 Input 4 Input 8 Upper Positive Limit switch Input 1 Input 5 Input 9 Absolute Home switch Input 2 Input 6 Input 10 488 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Motion control instructions Chapter 17 Motion Signals PTOO PTO1 PTO2 Touch Probe Input switch Input 3 Input 7 Input 11 MC TouchProbe function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 489 Chapter 17 Motion control instructions Ladder Diagram LD Structured Text ST FirstPosition TouchProbe 10000 0 LastPosition TouchProbe S500DO0 0 HC TouchProbe 1 Axisl Trigerlnp TouchProbe Execute TouchProbe UindowsOnly TouchProbe FirstPosition TouchProbe LastPosition TouchProbe Done TouchProbe Hc TouchProbe 1 Done Busy TouchProbe MC TouchProbe 1 Busy Error TouchProbe re MC TouchProbe 1 Error ErrorID TouchProbe MC TouchProbe 1 ErrorID RecordPosition TouchProbe MC TouchProbe 1i RecordedPosition KC TouchProbe i f void MC TouchProbe 1 AxTs REF amp xisIn USINT Triggering BOOL Execute
203. cut Description Ctrl Insert Copies the selected text to the clipboard Ctrl L Cuts the current line to the clipboard Ctrl X Cuts the selected text to the clipboard Shift Delete Cuts the selected text to the clipboard Ctrl V Pastes text saved on the clipboard to the insertion point Shift Insert Pastes text saved on the clipboard to the insertion point Ctrl Z Undoes the previous command Ctrl Y Redoes the previous command Ctrl Shift Z Redoes the previous command Ctrl Left Moves to the previous statement or word Ctrl Right Moves to the next statement or word Home Moves to the start of the line End Moves to the end of the line Ctrlt Home Moves to the start of the document Ctrl End Moves to the end of the document Page Up Moves to the top of the visible code Page Down Moves to the bottom of the visible code Ctrl Page Up Moves to the top of the visible code Ctrl Page Down Moves to the bottom of the visible code Ctrl J moves to the matching bracket Ctrlt Down Scrolls down Ctrl Up Scrolls up Shift Down Selects down Shift Up Selects up Shift Left Selects left Shift Right Selects right Ctrl Shift Left Selects to the previous statement or word Ctrl Shift Right Selects to the next statement or word Shift Home Selects from the insertion point until the start of the line Shift End Selects from the insertion point until the end of the line Ctrl Shift Home Selects from the insertion point until the start of the document Ctrl Sh
204. dbus and CIP message function blocks Messaging Protocol Communication media Use this function block Modbus RTU client and server Through a Serial port configured as Modbus RTU MSG_MODBUS on page 197 Modbus TCP client and server Over the Ethernet instead of through a serial port MSG_MODBUS2 on page 204 Ethernet IP client and server Through an embedded Ethernet channel MSG_CIPSYMBOLIC on page 187 MSG_CIPGENERIC on page 178 CIP Serial client and server Ethernet cable or Serial cable MSG_CIPSYMBOLIC on page 187 ASCII Through an RS 232 port configured with an ASCII See ASCII serial port instructions driver on page 113 Modbus RTU Modbus is a half duplex master slave communications protocol that allows a single master to communicate with a maximum of 247 slave devices The Modbus network master reads and writes bits and registers Modbus RTU is supported by configuring the Serial port as Modbus RTU For more information about the Modbus protocol refer to the Modbus Protocol Specifications available from http www modbus org Modbus TCP The Modbus TCP Server communication protocol uses the same Modbus mapping features as Modbus RTU but it is supported over the Ethernet instead of through a Serial port The Micro850 controller supports up to 16 simultaneous Modbus TCP Server connections No protocol configuration is required other than configuring the Modbus mapping table EtherNet IP Micro850 controllers
205. dbus Mapping ZEE rrbedded Lic Mabion o o New Axis gt Plug In Modules e Empty gt Empty gt e Empty gt e Empty gt a Empty gt 336 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Live ost instructions Chapter 14 3 From the controller tree click Embedded I O and select input filters for your encoder Conlraler Embedded re input Filters input Laich and EI Edge Ingsibe Tres Fiber hs Deli uw 2 3 v 1 4 8 Cre gut w d 6 7 Defaut si 3 8 59 pafat MEM L d 10 11 Defaut 5 12 13 Debat vw b j4 15 Defaut el 7 16 23 Defaut m J 5 24 27 Defiant viv 4 Verify the encoder is connected to the Micro830 controller 5 Start the Micro830 controller and connect it to your computer 6 Build the program and then download it to the controller Test the program and run the High Speed Counter After you download the HSC program to the controller you can test it and then run the High Speed Counter To test the program 1 Enter debug mode by performing one of the following Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 337 Chapter 14 338 High GosediCounter HED instructions e From the Debug menu click Start Debugging or e Click the green play button below the menu bar or e Press the F5 key id Components Workbench l id X Windows La F ark kat p mc et E qt ein gt iS m
206. de Ctrl Shift T Transposes the current and previous word Ctrl Shift Alt T Transposes the current and next line When no rung is selected a rung is added at the end of the rung list When a branch is selected an element is inserted at the end of the branch 60 Radwell Automation Publication 2080 HVDDIBENE Mach 2014Vah 2014 Chapter 4 Alarm instruction Alarm instruction is used to provide alerts when a configured high ora configured low limit has been reached Function block Description LIM_ALRM on page 62 Hysteresis on a real value for high and low limits Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 61 Chapter 4 Alam instruction LIM_ALRM Parameter EN EPS QH QL 62 Arguments Parameter Datatype type Input BOOL Input REAL Input REAL Input REAL Input REAL Output BOOL Output BOOL Output BOOL LIM_ALRM is an alarm with hysteresis on a Real value for high and low limits LIM_ALRM operation A hysteresis is applied on high and low limits The hysteresis delta used for either high or low limit is one half of the EPS parameter Process alarms An alarm occurs when a fault is received and processed by the controller Process level alarms alert you when the module has exceeded the configured high or configured low limits for each channel Description Function block enable When EN TRUE execute current LIM_ALRM computation When EN FALSE there is no computati
207. de BOOL 0 9 read only Displays the error codes detected by the HSC sub system HSC counting Error description error code 0 255 The non zero value for the high byte indicates that the HSC error is due to the PLS data setting The value of the high byte indicates which element of the PLS data triggers the error 0x00 No error occurring 0x01 Invalid HSC counting mode 0x02 Invalid high preset 0x03 Invalid overflow 0x04 Invalid underflow Radwell Automation Publication 2080 AVOIBENE Mib 2014 315 Chapter 14 High SpesdCauntier FES instructions 316 Error code sub element HSC counting Error description error code 0x05 No PLS data Accumulator Parameter Data type User program access HSCApp Accumulator DINT read write Sets the initial accumulator value when the High Speed Counter starts When the HSC is in Counting mode the Accumulator is automatically updated by the HSC sub system to reflect the actual HSC accumulator value HP Parameter Data type User program access HSCSTS HP DINT read only The HSCSTS HP is the upper setpoint in counts that defines when the HSC sub system generates an interrupt The data loaded into the high preset must be less than or equal to the data resident in the overflow HSCAPP OFSetting parameter or an HSC error is generated This is the latest high preset setting which may be updated by PLS function from the PLS data block LP Parameter Data type HSC mode User program access
208. der Diagram LD 354 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 Structured Text ST LCD REM 1 EN Enable Font Linel Line2 Lined Lined Line5 Line Line7 Line8 Output LCD REM 1 ENO LCD REM 1 7 LCD REM 1 LCD REM sts lcd rem LCD REM 31 Gre LCD REH iff t BTE B oda D Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 355 Chapter 15 356 Input Output instructions LCD_REM status codes Status code 0 1 2 5 65535 Description Enable input is false User Message displayed successfully Remote LCD not detected May occur when e Remote LCD is not physically connected to the controller or the wiring is incorrect e Serial port settings are other than what is required for the Remote LCD Connection error May occur when there is an internal state machine error Possibly caused by an incompatibility between Controller FW version and RLCD FW version Invalid font code Reserved Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 RHC Parameter EN ENO RHC Controller Type Micro810 Micro830 Micro850 RHC reads a high speed clock value in the Micro800 controller Arguments Parameter Type Data Type Input BOOL Output BOOL Output UDINT Description Function enable When EN TRUE replace parts of strings wit
209. ding up the ASCII queue while it waits for the required number of characters Arguments Parameter Parameter Data type Description type IN Input BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed ARDInput Input ARDARL Read characters from the buffer maximum is 82 See ARDARL data type on page 132 Q Output BOOL FALSE The function block is not done TRUE The function block is done Destination Output ASCIILOCADDR The string element where you want the characters stored NumChar Output UINT The number of characters Error Output BOOL FALSE No error TRUE An error is detected ErrorlD Output UINT See ABL error codes on page 130 122 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Al serial port instructions Chapter 6 ARD function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST 1 ARD ifin input a output ARD 1 0 des ARD 1 Destination 4 num ze ARD 1 NumChar 5 error ABD 1 Error 6 ID ARD 1 ErrorID ARD iff void ARD 1 BOOL IM ARDARL ARDInput Type ARD Read characters From the input buffer and place Hem into a string Radwell Automation Publication 2080 AVOIBENE Mib 2014 123 Chapter 6 ARL Parameter ARLInput Destination NumChar Error ErrorlD 124 AUlserial port instructions
210. drag and drop it to the right of the MSC CIPGENERIC function block output on the first ladder rung 4 Inthe Variable Selector type Convert String in the Name field for the coil Result The first rung of your ladder diagram program for MSG_CIPGENERIC messaging should look similar to the following image Get Catalog Add a COP function block variables and contact MSG CIPGENERIC Follow these steps to add a COP function block variables and a contact The COP instruction is used to convert data from the source data type for example DINT or REAL to the destination data type In this example the catalog information will be converted to a human readable string Radwell Automation Publication 2080 HVDOIBENE Mib 2014 229 Chapter 9 Communcation instructions Add a COP function block 1 Inthe Toolbox select Rung and drag and drop it directly under the first ladder rung to add a second rung 2 Add the COP function block e Inthe Toolbox select Block and drag and drop it onto the second ladder rung to display the Block Selector e Double click COP to add an instance of the function block to the ladder diagram Add COP variables 1 Add local input variables e Inthe Project Organizer double click Local Variables to display the Local Variables page e Inthe Variables page add the variables and data types listed in the following table Parameter Variable name Data type Src MyResData Array USINT Src
211. e Q NumChar Error ErrorlD 128 AWT writes characters from a source string to an external device Arguments Parameter Data type type Input BOOL Input AWAAWT Input ASCIILOCADDR Output BOOL Output UINT Output BOOL Output UINT Description If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed The channel and length to be operated See AWAAWT data type on page 132 The source string char array FALSE The function block is not done TRUE The function block is done Indicates the number of characters transmitted Updates when the transmission is complete and Q is TRUE NumChar may be less than the Length requested to be transmitted if the length of the Source String is shorter than the requested Length FALSE No error TRUE An error is detected See ABL error codes on page 130 AWT function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 in m e c DS H Ladder Diagram LD Al serial port instructions Chapter 6 Structured Text ST input source AWT 1 0 AWT 1 NumcChar AWT 1 Error AWT 1 ErrorID AUT itin output TL Littl Error ID Radwell Automation Publication 2080 HVDOIBENE Mib 2014 129 Chapter 6 ASCII parameter details Error code 02 03 04 05 06 07 08 Parameter C
212. e Cammand Velacer 1099 men Sec Target Poumon MEO me Target Velocity SOC mee Radwell Automation Publication 2080 AVOIBENE Mib 2014 475 Chapter 17 Motion control instructions MC Reset transitions the axis state from ErrorStop to StandStill by resetting all MC Reset internal axis related errors The outputs of the function block instances are not changed MC Reset operation The MC Reset function block only resets the axis state from ErrorStop to StandStill The application of MC Reset function block in other states including Disabled results in an error and has no impact on on going motion or the status of the axis Arguments Parameter Parameter Data type Description type EN Input BOOL Function block enable When EN TRUE execute current MC Reset computation When EN FALSE there is no computation Applies only to LD programs Axisln Input AXIS REF See also AXIS REF data type on page 426 Execute Input BOOL When TRUE resets the axis to the rising edge ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Done Output BOOL When TRUE the axis state is StandStill Busy Output BOOL When TRUE the function block is not finished Error Output BOOL When TRUE an error is detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424
213. e precondition that the last operation has been completed Set or reset the RTS control line for the modem See AHLI data type on page 132 FALSE The function block is not done TRUE The function block is done Displays the current status 0000 to 001F of the handshake lines for the channel specified See AHL ChannelSts data type on page 131 FALSE No error TRUE An error is detected See ABL error codes on page 130 AHL function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Al serial port instructions Chapter 6 Ladder Diagram LD Structured Text ST i AHL ifin input zt output AHL 1 0 3 channel AHL 1 ChannelSts Zi error ie ARL Ze KEE 5i ID AHL 1 ErrorID AHL 17 void AHL 1 BOOL IM AHLI AHLInput Type AHL Set or reset modem handshake lines Radwell Automation Publication 2080 AVOIBENE Mib 2014 121 Chapter 6 Allserial port instructions ARD reads characters from the buffer and stores them in a string ARD ARD operations e ARD will be executed until all characters are received If another ASCII command is executed it will be queued until ARD is finished An ACL on page 118 instruction can be executed in order to abort the ARD instruction e Use the results of an ACB on page 116 instruction to trigger the ARD instruction This prevents the ARD instruction from hol
214. e Library 1 Goto http literature rockwellautomation com http literature rockwellautomation com 2 Click Advanced Search 3 Enterthe product information and other search criteria This example shows search criteria for Kinetix manuals ADVANCED SEARCH Dram Allen Bi adley Products i e fal Motion Control Integrated Allen Bradley Refine Servo Drives zi Refine Further Kinetix i ei 4 Click Search To access non English language versions of user manuals 1 Select the language from the Publication Language drop down box right corner 2 Enter the full or partial device catalog number in the Search box For example enter 2080 L C30 to view Micro830 user manuals CIP Register object data MSG CIPGENERIC function blocks use the CIP Register object data in the AppCfg parameter The object data includes the following Radwell Automation Publication 2080 HVDOIBENE Mib 2014 221 Chapter 9 Communication instructions e Class Code e Instance e Instance Attribute e Service Values for the MSG_CIPGENERIC AppCfg parameter Use the values from the CIP register object in your input variables to configure the MSG_CIPGENERIC function block parameters The following image shows how the CIP register object data values are used in the MSG_CIPGENERIC function block parameters DataType T RE E gf zm gf Mat ReadDrive DO MSG CIPGENERIC E MyAppCig e EDS
215. e OR of two values XOR Arguments Parameter Parameter Data Type Description Type i1 Input BOOL i2 Input BOOL 01 Output BOOL Boolean exclusive OR of the two input terms XOR operator ST language example ST equivalence Dol bil01 XOR NOT b1102 bob se bibl XOR b152 XOR D1537 162 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Boolean instructions Chapter 8 For Boolean expressions NOT converts values to negated values NOT NOT i al Arguments Parameter Parameter Data Type Description Type i1 Input BOOL Any Boolean value or complex expression 01 Output BOOL TRUE when IN is FALSE FALSE when IN is TRUE NOT operator ST language example ST equivalence bett bil01 NOT Radwell Automation Publication 2080 HVDOIBENE Mib 2014 163 Chapter 8 Boolean instructions SR sets dominant bistable SR Arguments Parameter Parameter Datatype Description type SET1 Input BOOL If TRUE sets Q1 to TRUE dominant RESET Input BOOL If TRUE resets Q1 to FALSE 01 Output BOOL Boolean memory state Dominant bistable example Set Reset 01 Result Q1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 SR function block language examples Function Block Diagram FBD Ladder Diagram LD 164 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Boolean instructions Chapter 8 Structured Text ST 1 seti TRUE B reset i FALSE 3
216. e also AXIS REF data type on page 426 Triggerlnp Input USINT This parameter is ignored Execute Input BOOL When TRUE aborts the trigger event at the rising edge ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 TriggerInput Output USINT This parameter is ignored Done Output BOOL TRUE when the trigger event is aborted Busy Output BOOL TRUE when the function block is not finished Error Output BOOL TRUE when an error is detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 429 Chapter 17 Motion control instructions MC_AbortTrigger function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST 430 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Mbtion contol instructions DL AbortTrigger i A xzisi TrigerInp AbortTrigger Execute AbortTridger Done AbortTrigger re MC AbortTrigger 1 Done Busy AbortTrigger Hc AbortTrigger 1 Busy Error AbortTrigger re MC bortTridger 1 Error ErrorID AbortTrigger HC AbortTrigger 1 ErrorID MC AbortTrigger 1B void ML AborkTrigger 1 A XIS REF AxisIn USINT TriggerInp BOOL Execute Chapter 17 Type MC AbortTrigger Abort Function Blacks connected to trigger events e g MC TauchP
217. e homing process continues Input REAL Value of the deceleration always positive decreasing energy of the motor Note If Deceleration lt 0 and the axis state is not Standstill MC Halt is set to MC FB ERR RANGE Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Parameter Jerk BufferMode ENO Axis Done Busy Active CommandAborted Error ErrorlD Parameter type Input Input Output Output Output Output Output Output Output Output Data type REAL SINT BOOL AXIS_REF BOOL BOOL BOOL BOOL BOOL UINT Mbtion contol instructions Description Value of the Jerk always positive Note If Jerk lt 0 and the axis state is Standstill MC_Halt is set to MC_FB_ERR_RANGE Not used The mode is always MC_Aborting Enable out Applies only to LD programs Axis output is read only in LD programs See also AXIS_REF data type on page 426 Zero velocity reached The function block is not finished Indicates that the function block has control on the axis Command is aborted by another command or error stop FALSE No error TRUE An error is detected Error identification See also Motion control function block error IDs on page 424 MC_Halt function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mib 2014 Chapter 17 433 Chapter 17 Motion control instructions Ladder Diagram LD Stru
218. e is displayed in italics InstanceName Instruction block return parameters e The return parameter of a function has the same name as the function The return parameter is the only output e The return parameters of a function block can have any name Multiple return parameters can provide multiple outputs e Youcan define the parameters of programs for multiple devices by navigating the tabs for individual devices displayed in the Parameter view Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 53 Chapter 3 LackerDragran LD elements Working in the LD language How elements are added to a ladder diagram editor When you add items to a rung in the LD program they are added according to the following criteria e The first element on a rung is inserted at the position you select in the ladder diagram e Subsequent elements are inserted to the right of the selected item on the rung e Ifthe element is too large for the current rung the element is placed on the next rung Add an element to an LD program From the LD Toolbox drag the element into the LD language editor and place it on a rung Tip A plus sign appears on top of a Toolbox element when you hover over a valid target Release the mouse button to add the element Tip You can use keyboard shortcut keys to add elements to your LD program See LD Keyboard shortcuts on page 58 Replace a variable assigned to an element Y
219. e parameter continuously ParameterNumber Input DINT Parameter identification See also Motion control function block parameter numbers on page 423 ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS_REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Valid Output BOOL When TRUE parameter available Busy Output BOOL When TRUE the function block is not finished Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 465 Chapter 17 Motion control instructions Parameter Parameter Datatype Description type Value Output BOOL Value of the specified parameter in the data type as specified by the vendor MC ReadBoolParameter function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST 466 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Motion control instructions Chapter 17 ParameterNumber ReadBoolParameter e 4 Hc ReadBoolParameter l A xisl Enable ReadBoolParameter ParameterNumber ReadBoolParameter Valid ReadBoolParameter HC BReadBoolParameter 1 Valid Busy ReadBoolParameter i MC ReadBoolParameter 1 Busy Error ReadBoolParameter MC ReadBoolParameter 1 Ekrror ErrorID ReadBoolParameter MC ReadBoolParameter 1 ErrorID Value _Read
220. e range for this input is 0x40000000 0x40000000 physical pulse after the position is converted from user position unit to PTO pulse Set the Position value within the Soft Limit An invalid input value results in an error Error ID MC_FB_ERR_PARAM Enum input for Homing mode See Homing modes on page 439 Not used The mode is always mcAborting Enable out Applies only to LD programs Axis output is read only in LD programs See also AXIS_ REF data type on page 426 When TRUE the Homing operation completed successfully and the axis state is set to StandStill When TRUE the function block is not finished When TRUE indicates that the function block has control on the axis When TRUE command was aborted by another command or error stop When TRUE an error was detected Error identification See also Motion control function block error IDs on page 424 MC_Home function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 437 Chapter 17 Motion control instructions Ladder Diagram LD Structured Text ST 438 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Wc rnm Sag Elend Es lame ss up Fun HH omes Motion control instructions Chapter 17 Position Home 50000 0 HomeMode Home 4 Ke DL Home 1 4xis1 Execute Home Position Horme HomeMode Home ButferMode Home Done Home Hc Home 1 Dbone
221. e second For Integer Real Time Date and String values compares input values to determine whether the first is less than the second For Integer Real Time Date and String values compares input values to determine whether the first is less than or equal to the second For Integer Real Time Date and String values compares input values to determine whether the first is not equal to the second Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 251 Chapter 10 Carpare instructions Equal Parameter EN 01 252 Equal 2 compares the first input to the second input to determine equality for Integer Real Time Date and String data types mua Recommendation Using the Equal operator Equality testing of Time values is not recommended for TON TP and TOF functions The Real data type is not recommended when comparing values for equality because numbers in the math operation are rounded differently than those that appear in the variable output display Consequently two output values may appear equal in the display but will still evaluate as false For example 23 500001 compared to 23 499999 will both display as 23 5 in the variable input display but will not be equal in the controller For an alternative method to determine equality see the following topic Arguments Parameter Type Data Type Description Input BOOL Function enable When Enable TRUE execute the equality compari
222. e source and the destination are 1 byte length data Status of the copy operation See COP operation status values on page 293 Enable out Applies only to LD programs COP function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 291 Chapter 13 Datamenipulation instructions Ladder Diagram LD Structured Text ST 292 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Datamenipulation instructions Chapter 13 1 COP l EnableCopy ElementSource SourceOrfrset SourceDest zi DestOffset ElementLength SwapBytes 3 output COP 1 5T35 COP operation status values The following table describes COP operation status values COP Status value Status description 0x00 No action taken not enabled 0x01 COP function block success 0x02 Destination has spare bytes when copying from String 0x03 Source data are truncated 0x04 Copy length is invalid 0x05 Data type mismatch when there is String Data type as either source or destination 0x06 Source data size is too small for copy 0x07 Destination data size is too small for copy 0x08 Source Data offset is invalid 0x09 Destination Data offset is invalid 0x0A Data is invalid in either source or destination Copying to a different data type When a copy to or from a String data type is performed the ODVA short String format is used for data in the USINT array When COP is us
223. e this axis gets a fault due to drive or mechanical issues Check the connection between the drive and the controller Drive Ready and In Position signals and ensure the drive is operating normally The function block cannot execute because the axis is not powered on Power on the axis using MC_Power function block The function block cannot execute because the resource required by the function block is controlled by some other function block or it is not available Ensure the resource required by the function block is available for use Examples e MC_Power try to control the same axis e MC_Stop are executed against the same axis at the same time e MC TouchProbe are executed against the same axis at the same time e MC TouchProbe is executed while touch probe input is not enabled in Motion Configuration The function block cannot execute because the motion profile defined in the function block cannot be achieved Correct the profile in the function block The function block cannot execute because the motion profile requested in the function block cannot be achieved due to current axis velocity Examples e The function block requests the axis to reverse the direction while the axis is moving e Therequired motion profile cannot be achieved due to current velocity too low or too high Check the motion profile setting in the function block and correct the profile or re execute the function block when the axis velocity is compatib
224. eVelocity function block is issued with the axis state in StandStill not controlled by another function block and a function block error occurs the axis state goes to ErrorStop Arguments Parameter Parametertype Datatype Description Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 451 Chapter 17 Motion control instructions Parameter Parametertype Datatype Description EN Input BOOL Function block enable When EN TRUE execute current MC_MoveVelocity computation When EN FALSE there is no computation Applies only to LD programs AxisIn Input AXIS REF See also AXIS REF data type on page 426 Execute Input BOOL When TRUE starts the motion at rising edge Velocity Input REAL Value of the maximum velocity u s Acceleration Input REAL Value of the acceleration increasing energy of the motor u s Deceleration Input REAL Value of the deceleration decreasing energy of the motor u s Jerk Input REAL Value of the Jerk u s DirectionIn Input SINT The valid values are 1 0 1 BufferMode Input SINT This parameter is not used ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS_ REF data type on page 426 InVelocity Output BOOL When TRUE commanded velocity was reached first time Busy Output BOOL When TRUE the function block is not finished Active Output BOOL When TRUE indicates that the function block has contr
225. eared when the ST bit is set Set when the message has been transmitted and is waiting for a reply Cleared when the DN bit is set Set when message transmission fails An error code is written to ErrorlD The ER bit and error code values are cleared the next time the rung goes from false to true Set when the message is transmitted successfully The DN bit is cleared the next time the rung goes from false to true When the Done bit is set all other bits are cleared to indicate the MSG completed successfully When an error is detected and the Error bit is set the other status bits EN EW ST are not cleared CIPSTATUS error codes The following table describes the error codes that are displayed in the ErrorID and SubErrorID fields of the CIPSTATUS parameter when the ER bit is set ErrorlD SubErroriD Error code description code 33 Parameter configuration related errors 32 Bad Channel number 36 Unsupported CIP connection type 40 Unsupported CIP symbolic data type 4 Invalid CIP symbol name 43 Unsupported CIP Class value or MemberlD count 48 The instruction block s input data array size is not sufficient 49 Invalid target path 50 Bad service code 5 The instruction block s transmit data array size is too big for CIP communication Note The maximum length for the user data to be transmitted varies for different message configurations If the total CIP message payload including user data and CIP message overload is beyond 504 byt
226. ec 366 IONS cod Sanan ea MENU 368 E BEA nho cuti e E cot ue 369 KEY READ REM ccscsssssessssssssscssesssssssssssssscsssssssssscsssssscssssssessscsses 372 REY READ RPM petal E 374 KEY READ REM status codes iere tiroteo eee etae triste etin 374 KeyDatabietields table od eene ut 374 IIA TINIE Oss inet tine tec eA e e E 376 MMINTO dita E 377 PLUGIN CHE 379 PLUGIN READ eerte toe tte ettet bot bett setti 382 PLUGIN READ Status CGOGdessnenteduc atr ee he ete oie 383 PLUGIN RESET vescsscssecssscsssssssssscssscssecssscssecesssssessscssscssscssecsscsnses 385 PLUGIN WRITE etes cote ee ee e e S eee 387 Radwell Automation Publication 2080 RVOOTBENE March 2014 Table of Contents Interrupt instructions Motion control instructions i0 389 EE eeh 391 Ee 391 ETC EE 393 RTO dia pe oom Inm or d bMS 394 EEN 396 RTC Set Stars values EEN 397 SYS INEO bee cU CIRCE DR LIES LE NE 398 SS EE 399 TRIMPOI EIERE 401 Tampoc RE 402 Trimpot operation status values essere 402 Chapter 16 STIS nouus MID I ML PIE 406 UI dre n 408 BD H p GE 410 LU B route A Rc TRUM Nu MM e Mor a M EN REIN E 412 Bug 414 Chapter 17 General rules for motion control function blocks 418 Motion control function block parameter details 421 Motioncontrolax
227. ed Initial element to copy If the source or destination is a String data type the other party must also be a String data type or a USINT UCHAR and BYTE data type If it is not a data type mismatch will be reported See also Copying to a different data type on page 293 Source element offset The element offset if the source is an array data type Set the offset to 0 if e fitisnotan array data type or e To copy from the first element for an array data type Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Parameter Dest DestOffset Length Swap Sts ENO Parameter type Input Input Input Input Output Output Data type BOOL SINT USINT BYTE INT UINT WORD DINT UDINT UINT UINT BOOL UINT BOOL DWORD REAL TIME DATE STRING LWORD ULINT LINT Detamenioulation instructions Chapter 13 Description Initial element to be overwritten by the source Destination element offset The element offset if the destination is an array data type Set the offset to 0 if e fitis not an array data type or e To copy from the first element for an array data type Number of Destination Elements to copy When the destination is a String data type it indicates the number of strings to be copied TRUE Swap bytes according to the Data Type A swap operation will not occur if e The source data type or the destination data type is a String or e If both th
228. ed between any other pair of data types the copy operation is valid even if the data type in the source is not the same as the data type in the destination and even when they are not in a valid format The logic must be validated at the application level From a USINT array to a String array To copy a USINT array to a String array the data in the USINT array must be in this format e Byte1 Length of first String e Byte2 First Byte Character e Byte3 Second Byte Character e Byten Last Byte Character e Byte n 1 Length of second String e Byte n 2 First Byte Character for second String e Etc Radwell Automation Publication 2080 AVOIBENE Mib 2014 293 Chapter 13 Datamenpulation instructions MIN Parameter EN IN1 IN2 MIN ENO 294 MIN yields the minimum of two integer values Function enable When EN TRUE execute the minimum integer value computation When EN FALSE there is no computation Any signed integer value Cannot be Real Minimum of both input values Arguments Parameter Data Type Description Type Input BOOL Input DINT Input DINT Output DINT Output BOOL Enable out MIN function language examples Function block diagram Ladder diagram Structured text 1l inl 3 2 inz 10 3 minimum BIN ni ing Radwell Automation Publication 2080 AVOIBENE Mib 2014 Datamenipulation instructions Chapter 13 ST Equivalence new value MAX MIN
229. eference Description Graphical representation of Boolean equations which combines contacts input arguments with coils output results using graphic symbols Example showing the language editor for an Ladder Diagram LD program Components used to build a Ladder Diagram program IEC 61131 3 compliant instruction blocks collectively include function blocks functions and operators Adding elements to a LD program Examples of Ladder Diagram LD programs LD Keyboard shortcuts on Keyboard shortcuts available for the Ladder Diagram LD language page 58 Fall Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 33 Chapter 2 LacderDiagran LD language LD program 34 A Ladder Diagram LD is a graphical representation of Boolean equations that combines contacts input arguments with coils output results Using graphic symbols in a program chart organized like a relay ladder wiring diagram the LD language describes the tests and modifications of Boolean data LD graphic symbols are organized within the chart as an electrical contact diagram The term ladder comes from the concept of rungs connected to vertical power rails at both ends where each rung represents an individual circuit Connected Components Workbench support for Ladder Diagram LD Connected Components Workbench provides an LD language editor and supports the elements and instructions that are supplied with the Connected Components W
230. en a reference signal is detected and the configured Home offset is reached MC Home operation e After MC Power is issued the axis Homed status is reset to 0 not homed In most cases after the axis is powered on the MC Home function block needs to be executed to calibrate the axis position and the Home reference e The MC Home function block can only be aborted usinga MC Stop ora MC Power function block If it is aborted before it completes the previously searched Home position is considered invalid and the axis Homed status is cleared Arguments Parametertype Datatype Description Input BOOL Function block enable When EN TRUE execute current MC Home computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE starts the motion at the rising edge Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Parameter Position HomingMode BufferMode ENO Axis Done Busy Active CommandAborted Error ErrorlD Parameter type Datatype Input Input Input Output Output Output Output Output Output Output Output REAL SINT SINT BOOL AXIS_REF BOOL BOOL BOOL BOOL BOOL UNIT Motion contol instructions Chapter 17 Description Absolute position is set when the reference signal is detected and configured Home offset is reached The valu
231. ents Parameter Datatype Description type Input BOOL Function block enable When EN TRUE execute current MC WriteBoolParameter computation When EN FALSE the Value output is reset to 0 Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE writes the value of the parameter at the rising edge Input DINT Parameter ID See additional topics in See also below Input BOOL When TRUE the specified parameter has a new value Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 Parameter Parameter Data type Description type MC ExecutionMode Input SINT Values are e 0 mcmmediately The functionality is immediately valid e mcQueued The new functionality becomes valid when all previous motion commands set one of the following output parameters Done Aborted or Error the axis is not in a moving state Note When MC ExecutionMode 0 for all parameters except Duty Cycle 1005 this FB can be completed successfully only when the axis state is Disabled or Standstill When MC_ExecutionMode 0 for Parameter Duty Cycle 1005 this FB can be completed successfully except the axis is in Homing or ErrorStop state For MC_ExecutionMode 1 this function block can be successfully completed only when the axis state is Disabled Standstill or the on going motion can complete ending with Standstill state Ot
232. equivalence aol0 ail01 ail02 aos aro 9 352 aib3 72 Fockvell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 ASIN yields the Arc sine of a Real value Input and output values are in radians ASIN Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current arc sine computation When EN FALSE there is no computation IN Input REAL Must be in set 1 0 1 0 ASIN Output REAL Arc sine of the input value in set p1 2 p1 2 0 for invalid input ENO Output BOOL Enable out ASIN function language examples Function block diagram Ladder diagram Structured text 1 in 0 5 a rcSine ASIN in ASIN REAL ASIM REAL IM Arc sine ST Equivalence sine SIN angle Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 73 Chapter 5 Arithmetic instructions result ASIN sine result is equal to angle Results Variable Monitoring Logical Value Physical Yalue Lock E SI T gt T g RI 74 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 ASIN LREAL calculates the Arc sine of a Long Real value ASIN LREAL din i Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current computation Whe
233. er level FBD This application developed in the Function Block Diagram FBD language uses the function blocks described in the following table Function block Description IPIDController function block Provides PID process control PID OutputRegulator UDFB Regulates the output of the IPIDCONTROLLER within a safe range to ensure the hardware used in the process is not damaged Sample code IF RMIN lt RIN lt RMAX then ROUT RIN IF RIN lt RMIN then ROUT RMIN IF RIN gt RMAX then ROUT RMAX Radwell Automation Publication 2080 AVOIBENE Mib 2014 559 Chapter 20 Proportional Integral Derivative PD instruction Function block Description IPIDController function block Provides PID process control PID Feedback UDFB Acts as a multiplexer Sample code IF FB_RST is false FB OUT FB IN If FB_RST is true then FB_OUT FB_PREVAL PID PWM UDFB Provides a PWM function converting a real value to a time related ON OFF output SIM_WATERLVL UDFB Simulates the process in the application example 560 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Chapter 21 Real Time Clock RTC instructions Real Time Clock instructions are used to configure the calendar and the clock Function block Description RTC READ on page 393 RTC READ reads the RTC preset and RTC information RTC_SET on page 396 RTC SET sets RTC status or write RTC information Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach
234. error codes are also continuously cleared To view error codes add a rung before the MSG_MODBUS instruction MSG MODBUS function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST i Mo MODBUS l1 in cancel lc tc Lei 2 Output MSG MODBUS 1 0 3i error MSG MODBUS 1 Error 4 ID MSG MODBUS 1 ErrorID HSG MODBUS 1 veid MSG MDDBLUS L BOOL IN BOOL Cancel MODBLISLOCPARA LocalCfg MODSUSTARPARA TargebChg MODBUSLOCADOR Localider UNT ADI Lecaladdr Type M5 MODBUS Send a modbus message 198 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Parameter Channel Error code 3 20 21 22 33 54 55 217 129 130 131 132 133 134 135 136 137 255 Data type UINT Gmmuncation instructions Chapter 9 Modbus error codes The following table describes error codes for the MSG_MODBUS function block Error description The value of the TriggerType has been changed from 2 255 The local communication driver is incompatible with the MSG instruction A local channel configuration parameter error exists The Target or Local Bridge address is higher than the maximum node address A bad MSG file parameter exists A lost modem The message timed out in the local processor A link layer timeout The user cancelled the message An illegal function An illegal data address An illegal data value A slave device failure Acknowledge The
235. es an error 0x21 subError 0x33 is reported 55 Timeout related errors 112 Message timed out while waiting in the message wait queue 113 Message timed out while waiting for the a connection to the link layer to be established 114 Message timed out while waiting to transmit to the link layer 115 Message timed out while waiting for a response from the link layer 69 Server response format related error codes 65 Message reply does not match request 68 Message reply data type not valid supported MSG_CIPSYMBOLIC Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 193 Chapter 9 Communcation instructions ErroriD code 208 209 210 217 218 222 224 255 Parameter Path CipConnMode UcmmTimeout ConnMsgTimeout 194 SubErrorlD Error code description No IP address configured for the network Maximum number of connections used no connections available Invalid internet address or node address Message execution was canceled by user Cancel parameter was set to TRUE No network buffer space available Reserved CIP response error code SubErrorlD specifies the CIP status and ExtErrorlD specifies the CIP extended status value Refer to the CIP specification for possible error code values Channel is shutdown or recon figuration is in progress Error code occurs immediately after power on until a connection is established and is normal behavior It may also occur if an Ethernet cable is
236. es what happens when the Trigger ype parameter is used with the MSG_MODBUS function block Action Results Message is enabled Trigger timer starts Trigger timer expires before the message Message is immediately triggered in the next completes ladder scan cycle Message completes before the trigger time Message is triggered when the trigger time expires expires Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 CGommunication instructions Chapter 9 Example message triggering In the following example the TriggerType value is set to 100 Message Execution dk X Ladder scan amp 3 X 3 E EN bit DNR LL i i s Trigger Timer iua A Irne MODBUSLOCPARA custom command support Custom Commands in the range of 0 255 that are not already assigned to a Modbus command are also supported If a custom command is used then the LocalCfg ElementCnt contains the number of bytes received The response is received into the Local Address Data and overwrites the request data Example for CMD 0x2B e Local Address Data 1 0x0E READ DEVICE ID MEI e Local Address Data 2 001 READ DEV ID BASIC e Local Address Data 3 0x00 Read Vendor Object Message execution process Rung TRUE The following process diagram describes the message instruction events that occur when the Rung condition is True Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 201 Chapter 9
237. escriptions see Motion control function block error IDs on page 424 ErrorStop Output BOOL When TRUE the axis state is ErrorStop See Motion control axis state values and names Disabled Output BOOL When TRUE the axis state is Disabled Stopping Output BOOL When TRUE the axis state is Stopping See Motion control axis state values and names Referenced Output BOOL When TRUE the absolute reference position is known for the axis axis is homed StandStill Output BOOL When TRUE the axis state is StandStill See Motion control axis state values and names DiscreteMotion Output BOOL When TRUE the axis state is DiscreteMotion See Motion control axis state values and names ContinuousMotion Output BOOL When TRUE the axis state is ContinuousMotion See Motion control axis state values and names SynchronizedMotion Output BOOL This output is always FALSE Synchronized motion is not supported in Micro800 controllers Homing Output BOOL When TRUE the axis state is Homing See Motion control axis state values and names ConstantVelocity Output BOOL When TRUE the velocity for the motor is constant Accelerating Output BOOL When TRUE increasing energy to the motor Decelerating Output BOOL When TRUE decreasing energy to the motor 472 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion contro instructions Chapter 17 MC_ReadStatus function block language examples Function Block Diagram FBD Radwell Automation Pub
238. etup or you can use the HSC function block to load the new parameters while the controller is operating HSCAppData parameters example The following image shows the HSCAppData parameters in the Variable Selector Data l ype Attri buie CCo ee ET MIO HSC application Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 309 Chapter 14 High SpesdCauntier HED instructions HSCSTS data type HSCSTSInfo data type HSCSTS displays the status of the High Speed Counter HSCSTSInfo status actions During HSC counting the following HSC status actions occur e Ifthe HSC function block is counting with command 0x01 the HSC status is continuously updated e Ifan error occurs the Error Detected flag is turned on and an error code is HSCSTSInfo parameters The following table describes the HSCSTSInfo parameters Parameter Data HSC mode User program Description type access CountEnable BOOL 0 9 read only Counting enabled ErrorDetected BOOL 0 9 read write Non zero means error detected CountUpFlag BOOL 0 9 read only Count up flag CountDwnFlag BOOL 2 9 read only Count down flag Mode1Done BOOL Dor read write HSC is Mode 1A or Mode 1B accumulator counts up to the HP value OVF BOOL 0 9 read write Overflow is detected UNF BOOL 0 9 read write Underflow is detected CountDir BOOL 0 9 read only 1 count up 0 count down HPReached BOOL 2 59 read write High preset reached LPReached BOOL 2 9 read only Low p
239. ever the falling edge of Execute does not stop or influence the execution of the actual function block Even if Execute is reset before the function block completes the corresponding outputs are set for at least one cycle If an instance of a function block receives a new Execute command before it completes as a series of commands on the same instance the new Execute command is ignored and the previously issued instruction continues with execution With Enable Valid Enabled Busy Error and ErrorlD outputs are reset with the falling edge of Enable as soon as possible The Done output is set when the commanded action has successfully completed When multiple function blocks are working on the same axis in a sequence the following applies e When one movement on an axis is interrupted with another movement on the same axis without having reached the final goal Done on the first function block will not be set Every function block can have a Busy output indicating the function block is not finished for function blocks with an Execute input or is not working and new output values can be expected in case of Enable input Busy is set at the rising edge of Execute and reset when one of the outputs Done Aborted or Error is set The function block should be kept in the active loop of the application program for at least as long as Busy is TRUE because the outputs may change Function blocks with the same instance that are busy cannot exec
240. example ST Equivalence bres ANY TO WORD true CS bres is 1 zi tres ANY TO WORD t 0s46ms tres is 46 mres ANY TO WORD 0198 mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 285 Function block AVERAGE on page 288 COP on page 290 Function MAX on page 296 MIN on page 294 Chapter 13 Data manipulation instructions Data manipulation instructions are used to alter the output data to change the status without altering the program Description Running average over N samples Copy binary data in the Source Src to the Destination Dest Description Maximum Minimum Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 287 Chapter 13 Datamenipulation instructions AVERAGE AVERAGE stores a value at each cycle and calculates the average value of all already stored values Only the N last values are stored Average function block operation e The number of samples N cannot exceed 128 e Ifthe RUN command is FALSE reset mode the output value is equal to the input value e When the maximum number of stored values is reached the first stored value is erased by the last one Arguments Parameter Parametertype Datatype Description RUN Input BOOL TRUE run FALSE reset XIN Input REAL Any real variable N Input DINT Application defined number of samples XOUT Output REAL Running average of XIN value ENO Output BOOL Enable
241. f Base lt 0 ENO Output BOOL Enable out MOD function language examples Function block diagram Ladder diagram Structured text 1 in 9 B a hase i 3 3 module HoD in base 90 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Arithmetic instructions Chapter 5 MoD DINT MODIDINT IN DINT Base Modula ST Equivalence division_result value divider integer division rest_of_division MOD value divider rest of the division Results Variable Monitoring Hame Logical alue PhysicalValue Lock d e e e oft In H EP im base 3 N A I D mode EG DER ll m Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 91 Chapter 5 Arithmetic instructions MOV moves a copy of the value in input il to the output 01 MOV MOV il al Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the direct link to an output computation When EN FALSE there is no computation Applies only to LD programs Applies only to LD programs i1 Input BOOL DINT REAL TIME STRING SINT Input and output must use the same data type USINT INT UINT UDINT LINT ULINT DATE LREAL BYTE WORD DWORD LWORD 01 Output BOOL DINT REAL TIME STRING SINT Input and output must use the same data type USINT INT UINT UDINT LINT ULINT DATE LREAL BYTE WORD
242. g Write a string with user configured characters appended to an external device Write characters from a source string to an external device Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 113 Chapter 6 Al serial port instructions ABL counts the total number of characters in the input buffer up to and including ABL the end of line termination character Arguments Parameter Parameter type Data type Description IN Input BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed ABLInput Input ABLACB The channel to be operated See ABLACB data type on page 130 Q Output BOOL FALSE The function block is not done TRUE The function block is done Characters Output UINT The number of characters displayed in the buffer up to 82 characters Error Output BOOL FALSE No error TRUE An error is detected ErrorlD Output UINT See ABL error codes on page 130 ABL function block language examples Function Block Diagram FBD Ladder Diagram LD 114 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Al serial port instructions Chapter 6 Structured Text ST 1 ABL ifin input a output AEL 1 0 3 number ABL 1 Characters 4 error ABL 1 Error 5i ID ABL 1 ErrorID AB L LP void ABL_1 BOOL IM ABLACB ABLInput Type ABL Specify number of characters in buffer includi
243. g Edge Coil Pulse falling edge or negative coils support a Boolean output ofa connection line Boolean state PA Ni Left l Right l connection connection The associated variable is set to TRUE when the Boolean state of the left connection falls from TRUE to FALSE The output variable resets to FALSE in all other cases The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be output or it must be user defined Example Pulse Falling Edge Coil Pulse Rising Edge Coil Pulse rising edge or positive coils support a Boolean output of a connection line Boolean state PA N Left Right connection connection The associated variable is set to TRUE when the Boolean state of the left connection rises from FALSE to TRUE The output variable resets to FALSE in all other cases The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be output or user defined Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Lecber Diagram LD elemenis Chapter 3 Ex
244. g Registers 4xxxx 04 Read Input Registers 3xxxx 05 Write Single Coil Oxxxx 06 Write Single Register 4xxxx 15 Write Multiple Coils Oxxxx 16 Write Multiple Registers 4xxxx Others See MODBUS2LOCPARA custom command support Limits For Read Coil Discrete inputs 2000 bits For Read Register 125 words For Write Coil 1968 bits For Write Register 123 words Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 207 Chapter 9 Parameter Addr 208 Communtcation instructions Data type UDINT MSG MODBUS2 message triggering A Modbus message can be triggered periodically by setting a non zero value to the Trigger Type parameter The following table describes what happens when the Trigger Type parameter is used with the MSG_MODBUS2 function block Action Results Message is enabled Trigger timer starts Trigger timer expires before the message Message is immediately triggered in the next completes ladder scan cycle Message completes before the trigger time Message is triggered when the trigger time expires expires MODBUS2LOCPARA custom command support Custom Commands in the range of 0 255 that are not already assigned to a Modbus command are also supported If a custom command is used then the LocalCfg ElementCnt contains the number of bytes received The response is received into the Local Address Data and overwrites the request data Example for CMD 0x2B e Local Address Data 1 0x0E
245. g execution e Error Rising edge of Error informs that an error occurred during the execution of the function block e ErrorlD Error number Note Done and InVelocity outputs are used for successful completion so they are logically exclusive to Error Instance errors do not always result in an axis error bringing the axis to ErrorStop How the error outputs are reset e Error outputs of the relevant function blocks are reset with tje falling edge of Execute and Enable e The error outputs of a function block with Enable can be reset during operation without having to reset Enable Types of errors e Function blocks logics for example parameters out of range state machine violation attempted and so on e HW Limit or SW Limit e Mechanism Motor e Drive Due to the naming constraints in the IEC standard on the uniqueness of variable names the mc reference to the PLCopen Motion Control namespace is used for the ENUMs In this way we avoid the conflict that using the ENUM types positive and negative for instance with variables with these names throughout the rest of the project since they are called mcPositive and mcNegative respectively Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Mbtion contro instructions Chapter 17 The following topics provide details for motion control parameters that are Motion control function relevant to all motion control function blocks block parameter details Motio
246. gent TAN angle result ATAN tangent result is equal to angle Radwell Automation Publication 2080 HVDOIBENE Mib 2014 77 78 Chapter 5 Arithmetic instructions Results Variable Monitoring Hame Logical Value Physical Yalue gt pej cg M LA E Ti 0 463648 URN EET Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Anthmetic instructions Chapter 5 ATAN LREAL Parameter EN IN ATAN LREAL ENO Arguments Parameter Data Type Type Input BOOL Input LREAL Output LREAL Output BOOL ATAN_LREAL calculates the Arc tangent of a Long Real value Description Function enable When EN TRUE execute current computation When EN FALSE there is no computation Any Long Real value Arc tangent of the input value in set PI 2 PI 2 0 0 for invalid input Enable out ATAN LREAL function language examples Function block diagram Ladder diagram Structured text in ArcTan E Z ATAN LREAL in ATAN LREALY LREAL ATAN LREAL LREAL IM Perform 64 bit real arckangent calculation ST Equivalence tangent TAN_LREAL angle result ATAN_LREAL tangent result is equal to angle Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 79 Chapter 5 Arithmetic instructions Results Variable Monitoring Logical Value Physical Value Lock E gt ge gt 80 Radwell Automation Pu
247. gt 0 biggest integer less or equal to the input If IN lt 0 least integer greater or equal to the input ENO Output BOOL Enable out TRUNC function language examples Function block diagram Ladder diagram Structured text D an 9 4 7 zx truncation TRUMC in TRUNCH REAL TRLUNCIREAL IM Truncate decimal part ST Equivalence result TRUNC 42 67 TRUNC 2 0891 110 Radmell Automation Publication 2080 RVO01IBENE Mach 2014MVerch 2014 means result 2 0 2 0 0 0 Results Variable Monitoring Arithmetic instructions Chapter 5 Logical Yalue Physical Yalue Lock E ij bp bt O Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 111 Function block ABL on page 114 ACB on page 116 ACL on page 118 AHL ARD on page 122 on page 120 ARL on page 124 AWA on page 126 AWT on page 128 Chapter 6 ASCII serial port instructions ASCII serial port instructions are communication instructions that use or alter the communication channel for receiving or transmitting data Description Determine number of characters in buffer up to and including end of line character Determine total number of characters in buffer Clear the receive and transmit buffers Set or reset modem handshake lines Read characters from the input buffer and place them into a string Read one line of characters from the input buffer and place them into a strin
248. h new characters When EN FALSE no operation Enable out The value of the high speed clock High speed clock resolution The resolution for the high speed clock instruction differs depending on the controller type Increments 4 every 40 us 1 every 10 us 1 every 10 us Timebase Resolution 10 us 40 us 10 us 10 us 10 us 10 us RHC function language examples Function block diagram Ladder diagram Structured text i rhe RHC Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 357 Chapter 15 Inout Outout instructions LIDINT RHC Read high speed clock ST Equivalence TESTOUTPUT2 RHC 358 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Input Output instructions Chapter 15 RPC reads the user program checksum either from the controller or Memory RPC Module Arguments Parameter Parameter Type Data Type Description MemMod Input BOOL If true the value is taken from the memory module If false the value is taken from the Micro800 controller ENO Output BOOL Enable out RPC Output UDINT The checksum value of the specified user program RPCfunction language examples Function block diagram Ladder diagram Structured text 1 MemMod TRUE 2i rpe RPC MemHod RPCH LIDINT RPC BOOL MemMod Reads user pragram checksum ST Equivalence TESTOUTPUT2 RPC TESTINPUT Radwell Automation Publication 2080 HVDOTBENE March
249. hannel 130 AUllserial port instructions The following topics provide additional details for ASCII parameters and structured data types ABL error codes The following table describes ABL error codes Error description Operation cannot be completed because the modem went offline Transmission cannot be completed because the Clear to Send signal was lost Cannot complete ASCII receives because the communications channel is configured for System Mode While attempting to complete an ASCII transmission System Mode DF1 communication was detected Illegal parameter was detected Cannot complete ASCII send or receive because channel configuration has been shut down via the channel configuration dialog box Cannot complete ASCII Write due to an ASCII transmission already in progress ASCII communication requested is not supported by current channel configuration The Cancel was set stopping instruction execution No action required The requested length for the string is either invalid a negative number greater than 82 or 0 Applies to ARD on page 122 and ARL on page 124 function blocks The length of the source string is either invalid a negative number greater than 82 or 0 Applies to AWA on page 126 and AWT on page 128 function blocks The requested LEN in the control block is a negative number or a value greater than the string size stored with the source string Applies to AWA on page 126 and AWT on page 1
250. he Motion Engine interval configured by the user For WindowOnly TouchProbe functionality there is a maximum response time delay that is equal to the Motion Engine interval for both FirstPosition and LastPosition activation The maximum possible lag in the triggering position both FirstPosition and LastPosition can be calculated by Motion Engine interval moving velocity FirstPosition Input REAL Start position of the window from where trigger events are accepted in technical units u Value included in window LastPosition Input REAL Stop position of the window from where trigger events are not accepted in technical units u Value included in window ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Triggerlnput Output USINT Only embedded motion supported Done Output BOOL When TRUE trigger event was recorded Busy Output BOOL When TRUE the function block is not finished CommandAborted Output BOOL When TRUE the command was aborted by the MC Power OFF or Error Stop function block Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 RecordedPosition Output REAL Position where trigger event occurred in technical units u Motion is an open loop motion The axis position at the time the trigger event oc
251. he message function blocks e Type MSG_ReadDrive in the Instance field e Double click MSG CIPGENERIC to add an instance of the function block to the ladder diagram Add MSG CIPGENERIC variables 1 Add local input variables e Inthe Project Organizer double click Local Variables to display the Local Variables page e Inthe Variables page add the variables and data types listed in the table Parameter Variable Name Data Type CtrlCfg MyCtrlCfg CIPCONTROLCFG AppCfg MyAppCfg CIPAPPCFG TargetCfg MyTargetCfg CIPTARGETCFG ReqData MyReqData USINT ReqLength MyReqLength UINT ResData MyResData USINT array 2 Forthe MyResData variable double click in Dimension and change the array size to 1 81 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 225 Chapter 9 Communication instructions Result The Variables page should look similar to the following image gtt g e EM e DM MSG ReadDrive IO MSG_CIPGENERIC s e MyCiriCtg CIPCONTROLCFG e B o gt MyAppCfg CIPAPPCFG E MyTargetCtg CIPTARGETCFG E MyReqDsts USINT MyRegLength UINT 7 x Configure initial values for variables Follow these steps to add initial values to the input variables you previously created and then assign the variables to the correct MSG_CIPGENERIC function block input parameter To configure initial values for the MyCtrlCfg input variable 1 From the Local Variables page expand MyCtrlCfg to view its parameters
252. her input values are reserved currently and are considered as invalid parameters ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Done Output BOOL When TRUE the parameter was successfully written Busy Output BOOL When TRUE the function block is not finished Error Output BOOL When TRUE an error is detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 MC WriteBoolParameter function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 493 Cha pter 17 Motion control instructions Ladder Diagram LD Structured Text ST ParamererNumhe r Ur iteBaalParameter 5 Hc Wr iceBaolPararmet er 1 Axis1 Exec ure Hr iceBaolParamerer ParameterNHumbis r Wr iceBoaolParameter Value UriteBaoclParameter MC ExecutionMade lriteBaolParameter Done UriteBoolParamerter MC WriteBoolParameter 1 Done Busy lriteBoolParameter i HC UriteBoolParameter 1 Busy Error UriteBoolPar amp meter HC WriteBoolParameter 1 Error Error ID WriteBoolParameter NC WriteBoolParameter l ErrorID Hc WriteBoolParameter iff 494 void MC WriteBoolParameter 1 AHIS REF AxisIn BOOL Execute DINT ParameterNumber BOOL Value SINT MC ExecutionMode Type MC WrtebaslParaimeter Modifies the value of a motion specific BO
253. ift End Selects from the insertion point until the end of the document Shift Page Up Selects from the insertion point until the top of the visible code Shift Page Down Selects from the insertion point until the end of the visible code Ctrl Shift Page Up Selects from the insertion point until the top of the visible code Ctrl Shift Page Down Selects from the insertion point until the end of the visible code Fall Automation Publication 2080 HVDOIBENE Mach nb 2014 59 Chapter 3 Lecker Diagram LD elements Shortcut Description Ctrl A Selects the entire document Ctrl Shift W Selects the next word Ctrl Shift J Selects to the matching bracket Shift Alt Down Selects the current and next lines Shift Alt Up Selects the current and previous lines Shift Alt Left Selects left on the current line Shift Alt Right Selects right on the current line Ctrl Shift Alt Left Selects available columns in lines of code from the left to right Ctrl Shift Alt Right Selects available columns in lines of code from the right to left Ctrl Space Accesses the autocomplete function Ctrl Shift Space Accesses the autocomplete function Ctrl Shift U Changes the selected text into uppercase Ctrl U Changes the selected text into lowercase Esc Deselects the selected text LA Opens the variable selector Ctrl Shift 1 Opens the variable selector Ctrl Alt R Opens the block selector Ctrl Shift Alt R Opens the block selector Insert Toggles between the overwrite insert typing mo
254. il Contact Contacts are graphic components of an LD diagram Depending on the type a contact represents the value or function of an input or of an internal variable Contacts can only be added to a defined rung in the LD language editor After a contact is added its definition can be modified Example Contacts LD _Program POU x DirectContact ReverseContact PulseRse Contact PulseFal Contact You can add the following contact element types to your LD program from the LD Toolbox in Connected Components Workbench Contact element Description Direct contact on page 49 Direct contacts support a Boolean operation between a connection line state and a Boolean variable Reverse contact on page 49 Reverse contacts support a Boolean operation between a connection line state and the Boolean negation of a Boolean variable Pulse rising edge contact on Pulse rising edge or positive contacts support a Boolean operation between a connection line state page 50 and the rising edge of a Boolean variable Pulse falling edge contact Pulse falling edge negative contacts enable a Boolean operation between a connection line state and the falling edge of a Boolean variable Adding contact elements Follow these steps to add a contact element to the ladder rung or change the type of contact used Add a contact element 1 Verify the LD program has a defined rung for the contact 48 Fall Automation Publicat
255. ing CIP connection is used If an EIP connection to the target does not exist an EIP connection is established prior to establishing a CIP connection If an EIP connection to the target does not exist an EIP connection is established If there is only one connection to the target the connection is closed If there is more than one connection to the target the connection is closed when the last message execution is completed When a CIP connection is closed any associated EIP connection is also closed If more than one CIP connection uses the same EIP connection the EIP connection will be closed after all associated CIP connections are closed The connection is not closed The connection is closed All active connections are forcibly closed CIP message timeout timers The following table describes how timers for CIPTARGETCFG timeout parameters UcmmTimeout and ConnMsgTimeout behave based on message requests and status Action Message is enabled Connection is requested ConnMsgTimeout timer is active Connection request is completed Results UcmmTimeout timer is activated ConnMsgTimeout timer is activated UcmmTimeout timer is disabled UcmmTimeout timer is reactivated Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Communtation instructions Chapter 9 MSG_MODBUS Parameter IN Cancel LocalCfg TargetCfg LocalAddr Error ErrorlD MSG_MODBUS sends a Modbus mess
256. ion 2080 AVOOIBENVE Mach 2014Vach 2014 Lat Diagram LD elementis Chapter 3 2 From the Toolbox drag the contact element into the language editor and position it on the rung Tip A plus sign appears on top of a Toolbox element when you hover over a valid target Release the mouse button to add the element Tip You can use keyboard shortcut keys to add elements to your LD program See LD Keyboard shortcuts on page 58 Insert a parallel contact 1 From the Toolbox drag the branch element into the language editor and place it on the existing contact 2 Fromthe Toolbox draga contact element into the language editor and place it on the branch Change the type of contact In the language editor select the contact then press the space bar until the the contact type you want to use is displayed in the language editor Direct Contact Direct contacts support a Boolean operation between a connection line state and a Boolean variable Left Right connection connection The state of the connection line on the right of the contact is the logical AND between the state of the left connection line and the value of the variable associated with the contact Example Direct Contact Reverse Contact Reverse contacts support a Boolean operation between a connection line state and the Boolean negation of a Boolean variable AN Left Right connection connection Radwell Automation Publication 2080 AVOIBENE Mach nb 2
257. ion Publication 2080 RVDOIBENE Varen20t4Mare2014 23 Chapter 1 Finding information about instructionsand ladder elements Instruction Instruction block type LOG on page 88 Function MAX on page 296 Function MC_AbortTrigger on page 429 Function block MC Halt on page 432 Function block MC_Home on page 436 Function block MC MoveAbsolute on page 441 Function block MC MoveRelative on page 446 Function block MC MoveVelocity on page 450 Function block MC Power on page 455 Function block MC ReadAxisError on page 460 Function block MC ReadBoolParameter on page 465 Function block MC ReadParameter on page 468 Function block MC ReadStatus on page 471 Function block MC Reset on page 476 Function block MC SetPosition on page 479 Function block MC Stop on page 483 Function block MC TouchProbe on page 487 Function block MC WriteBoolParameter on page 492 Function block MC WriteParameter on page 496 Function block MID on page 580 Function MIN on page 294 Function MLEN on page 582 Function MM INFO on page 376 Function block MOD on page 90 Function MOV on page 92 Operator MSG CIPGENERIC on page 178 Function MSG CIPSYMBOLIC on page 187 Function MSG MODBUS on page 197 Function MSG_MODBUS2 on page 204 Function Multiplication on page 93 Operator MUX4B on page 174 Function MUX8B on page 170 Function NOT on page 163 Operator Not Equal on page 258 Operator Neg on page 94 Operator
258. ion direction is determined by the Current position and the Target position Arguments Parameter Data type Description type Input BOOL Function block enable When EN TRUE execute current MC MoveRelative computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Parameter Execute Distance Velocity Acceleration Deceleration Jerk BufferMode ENO Axis Done Busy Active CommandAborted Error ErrorlD Parameter type Input Input Input Input Input Input Input Output Output Output Output Output Output Output Output Data type BOOL REAL REAL REAL REAL REAL SINT BOOL AXIS_REF BOOL BOOL BOOL BOOL BOOL UINT Motion contol instructions Chapter 17 Description When TRUE starts the motion at rising edge Relative distance for the motion in technical unit u Value of the maximum velocity not necessarily reached u s As the motion direction is determined by input Position the sign of Velocity is ignored by the function block Note The maximum velocity may not be reached when Jerk 0 Value of the acceleration increasing energy of the motor u s2 Value of the deceleration decreasing energy of the motor u s2 Value of the Jerk u s This parameter is not used Enable out Applies only to LD
259. ion to a specified absolute MC MoveAbsolute position Position Velacity Acceleration Deceleration Jerk Direction Buffermode MC MovehAbsolute operation e Fora Micro800 controller the sign of the input Velocity for a MC MoveAbsolute function block is ignored because the motion direction is determined by the Current position and the Target position e Fora Micro800 controller the input Direction for a MC MoveAbsolute function block is ignored because there is only one mathematical solution to reach the Target position e Ifthe MC MoveAbsolute function block is issued when the Micro800 controller axis state is StandStill and the relative distance to move is zero the execution of the function block is immediately reported as Done e IfaMC_ MoveAbsolute function block is issued to an axis that is not in the Homed position the function block reports an error e The MoveAbsolute function block completes with Velocity zero if it is not aborted by another function block Arguments Parameter Parameter Datatype Description type Radwell Automation Publication 2080 AVOIBENE Mib 2014 441 Chapter 17 Motion control instructions Parameter Parameter Datatype Description type EN Input BOOL Function block enable When EN TRUE execute current MC_MoveAbsolute computation When EN FALSE there is no computation Applies only to LD programs AxisIn Input MAIS REF See also AXIS REF data type on page 426
260. ions are detected Radwell Automation Publication 2080 AVOIBENE Mi nb 2014 313 Chapter 14 High SpesdCauniier HED instructions e Low Preset Interrupt executes e High Preset Interrupt executes e Underflow Interrupt executes UFCauselnter Parameter Data type HSC mode User program access HSCSTS UFCauselnter BOOL 2 9 read write The Underflow Interrupt status bit sets 1 when the HSC accumulator counts through the underflow value and the HSC interrupt is triggered This bit can be used in the control program to identify that the underflow condition caused the HSC interrupt If the control program needs to perform any specific control action based on the underflow this bit is used as conditional logic This bit can be cleared 0 by the control program and is also cleared by the HSC sub system whenever these conditions are detected e Low Preset Interrupt occurs e High Preset Interrupt occurs ge Overflow Interrupt occurs HPCauselnter Parameter Data type HSC mode User program access HSCSTS HPCauselnter BOOL 0 9 read write The High Preset Interrupt status bit sets 1 when the HSC accumulator reaches the high preset value and the HSC interrupt is triggered This bit can be used in the control program to identify that the high preset condition caused the HSC interrupt If the control program needs to perform any specific control action based on the high preset this bit is used as conditional logic This bit can be cleared 0
261. ions chapter 21 Parameter Year Month Day Hour Minute Structured Text ST i ETC SET i in enable data 2 present ETC SET 1 RTCPresent 3 enabled RTC SET 1 RTCEnabled a batlow ETC SET i RTCBatLow 5 sts zs BTC SET 1 3t5 RTC SET ifl void BIC SET 1 BOOL Enable BOOL RTCEnable RTC RTCData Type RTC SET Set RTC data to RTC module RTC data type The following table describes the RTC data type Datatype Description UINT UINT UINT UINT UINT The year setting for the RTC 16 bit value and the valid range is from 2000 Jan 01 00 00 00 to 2098 Dec 31 23 59 59 The month setting for the RTC The day setting for the RTC The hour setting for the RTC The minute setting for the RTC Radwell Automation Publication 2080 HVDOIBENE Mib 2014 565 Chapter 21 Real TimeClock RIO instructions Parameter Datatype Description Second UINT The second setting for the RTC DayOfWeek UINT The day of the week setting for the RTC This parameter is ignored for RTC SET RTC Set status values The following table describes RTCSet values Status value Status description 0x00 Function block not enabled no operation 0x01 RTC set operation success 0x02 RTC set operation fails 566 Radwell Automation Publication 2080 AVOIBENE March nb 2014 Chapter 22 String manipulation instructions String manipulation instructions are used to alter a sequence of symbols that are chosen from a set
262. is is not operational because a motion engine execution error was detected Power cycle the entire machine and download the User Application to the controller again If the fault persists contact your local Rockwell Automation technical support representative For contact information see http www rockwellautomation com support The axis is not operational because the axis is not homed Reset the state of the axis using the MC_Reset function block Execute homing against the axis using MC_Home function block Motion internal warning Warning ID 0x80 Contact your local Rockwell Automation technical support representative For contact information see http www rockwellautomation com support Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Mbtion contro instructions Chapter 17 MC_ReadBoolParameter returns the value of a vendor specific parameter with MC ReadBoolParameter type BOOL FarameterNumber MC ReadBoolParameter operation When the MC ReadBoolParameter function block Enable input is set to False the Value output is reset to O Arguments Parameter Parameter Datatype Description type EN Input BOOL Function block enable When EN TRUE execute current MC ReadBoolParameter computation When EN FALSE the Value output is reset to 0 Applies only to LD programs AxisIn Input AXIS REF See also AXIS REF data type on page 426 Enable Input BOOL When TRUE gets the value of th
263. is statesni nte afse ite eed 421 Motion control function block parameter numbers 423 Motion control function block error IDs s 424 EE 426 AXIS REF dita PUDE epatis beatitudo 426 AUS V EE sede aua comi etc aa e E Lene apnea 427 MCs RRE 429 ME Halena 432 MC Home ecane a a a 436 Homino mode eiiean TAA 439 MC _MoveAbsolute essessessessessessessessessessessessessessessessessessessesseos 441 MC MoveRelative orarie at taa Oa TH de 446 Leg TEE E E 450 MCO DO vo m c m 455 MC Re3d Axis Erot 5 0 ed RED EUR DR ER RE UA REA E RUE UE 460 SE ENTREE e COGS acti etico ied ie eite 462 MC ReadBoolParameter ccccccssscsscssccsccssccsscssccsscssccsscesccssceecs 465 Radwell Automation Publication 2080 RVOOTIBENE March 2014 9 Table of Contents Process control instructions Program control instruction Proportional Integral Derivative PID instruction 10 MC ReadParanmeter coseoseosesi se Rx CxYRE SEE COREN EYE ENS SUI EE REESE TE EUEUR 468 MC Read EE 471 MC E eet ee eae a de qoa ds det te Cua du DuRU 476 MC SetPOoSItIOD corio Ira saa IRIS PUR TER VERE TRIP Edu SV PECES EE b CENE ques 479 MCE rl A 483 MC KT LE cass casccusceasseusecaseeuscenssousecaseeuscenssuesecasees 487 Motion fixed 18 put OUT DUE asistente E orm ettet 49 MC _ WriteBoolParameter cccssccsssssccsscssccsscssccsscssccescesccesceess 492 NEGCAW
264. it floating point value 64 bit floating point value Symbolic Read Write syntax Syntax is the set of rules that defines the combinations of symbols that comprise a valid read write function block Valid symbol names To be valid each symbol name must meet the following requirements e Begin with a letter or underscore character followed by a letter digit or single underscore character e Be A0 characters or less e Notcontain two consecutive underscore characters e Use special characters as separators Symbol syntax The following table defines the valid syntax for symbols Note Only global variables are supported Syntax Example PROGRAM lt program name gt lt symbol name gt PROGRAM POUT MyTag symbol name dim3 dim2 dim1 MyTag1 0 Maximum supported dimension is 3 MyTag2 3 6 MyTag3 1 0 4 symbol name gt lt symbol name of struct field MyTag4 time year MyTag5 local time 1 year Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Parameter Cancel TriggerType StrMode Gmmuncation instructions Chapter 9 The following table describes the CIPAPPCFG data type CIPAPPCFG data type Parameter Data type Service USINT lass UINT Instance UDINT Attribute UINT Member nt USINT Memberld UINT 3 CIPCONTROLCFG data type Description Service code 1 127 Logical segment s Class ID value 1 65535 Logical segment s Instance ID value 0 4294967295 Logica
265. itch PLS data structure See PLS data type on page 318 HSC execution status See HSC status codes Sts on page 320 Enable out Applies only to LD programs HSC function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 AVOIBENE March 2014Vach 2014 301 Chapter 14 High SosediCounter HED instructions Structured Text ST 1 HSC ifenable hc had hei pd Sets x Bec E HsC il void HSC _1 BOOL Enable LISIMT HscCmd HSCAPP Hsc4ppData HSCSTS HscStsInfo PLS 1 1 PlsDbata UINT ADI Plspata Type HSC Apply high lew presets and output source to high speed counter HSCCmd values The following table describes the HSC commands for each HSC command value HSC Command description command 302 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 HSC command 0x01 0x02 0x03 0x04 High SosediCounter HD instructions Chapter 14 Command description HSC RUN e Start HSC if HSC is in Idle mode and the rung is enabled e Update HSC Status Information only if HSC in Run mode and the rung is enabled HSC Stop Stop a HSC counting if HSC is in Run mode and the rung is enabled HSC Load Set reload the HSC Application Data if rung is enabled for 6 input elements HPSetting LPSetting HPOutput LPOutput OFSetting and UFSetting Note This command does not re load the following input element HSC accumulator HSC Accumulator Reset if
266. ith the motor coupled to the flywheel via a shaft with torsional stiffness Rotational kinetic energy and torsion spring energy are the storage units e Anclectric circuit composed ofa current source driving aseries LR inductor and resistor with a shunt C capacitor Inductive energy and capacitive energy are the storage units Motor driven systems and heating systems can typically be modeled by the LR and the C electric circuit Configure auto tuning Following are the general steps for implementing auto tuning using the IPIDController function No Step Example 1 Reset setpoint to zero Wome Lopicalvahe Prrsical F EN F gt D B IPIDCONTROLLER 1 D TempConvest 1 IN My Lang 1 E My AT Param Ba OS NAA BE aore i d E niae N A ER AucMode o N A a at Stan N i bz mor DO H By nanderGan N Bl My Gain raster 544 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 No Proportional integral Derivative PD instruction Step Example Switch Auto mode to False m A My Le 1 rz E f My AT Param IB AT Stats Set Gains parameters Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Chapter 20 545 Chapter 20 Proportional Integral Derivative PD instruction 4 Set Auto Tune parameters Set auto tune parameters including an initial load value step change for the output an estima
267. ity is too low or too high for the requested motion profile Reset the state of the axis using the MC Reset function block Correct the motion profile in the function block or re execute the function block when the axis velocity is compatible with the requested motion profile The axis is not operational because a Soft Limit error was detected or executing the function block would cause a Soft Limit error Reset the state of the axis using the MC Reset function block Check the velocity or target position settings for the function block or adjust Soft Limit setting The axis is not operational because a Hard Limit error was detected Reset the state of the axis using the MC Reset function block and then move the axis away from the Hard Limit switch in the opposite direction Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 463 Chapter 17 464 Motion contol instructions Value 12 13 16 128 MACRO ID MC_FB_ERR_ LOG_LIMIT MC_FB_ERR_ ERR_ENGINE MC_FB_ERR_ NOT_HOMED MC_FB_ERR_ PARAM_MODIFIED Description The axis is not operational because a PTO Accumulator logic limit error was detected or executing the function block would cause a PTO Accumulator logic limit error Reset the state of the axis using the MC_Reset function block Check the velocity or target position settings for the function block Use the MC_SetPosition function block to adjust the axis coordinate system The ax
268. ivated Connection is requested ConnMsgTimeout timer is activated ConnMsgTimeout timer is active UcmmTimeout timer is disabled Connection request is completed UcmmTimeout timer is reactivated 186 Fall Automation Publication 2080 RVDOTBENE Verch2014Vercn 2014 Communtation instructions Chapter 9 MSG_CIPSYMBOLIC Parameter IN CtrlCfg SymbolicCfg TargetCfg Data Status MSG_CIPSYMBOLIC sends a common industrial protocol CIP symbolic message over an Ethernet channel or a serial port Li o SymbolicCtg DataLength TargetCig Data MSG_CIPSYMBOLIC operation When the function block is enabled the receive buffers for the Read operations are cleared on the rising edge of Enable See the Message execution processes and timing diagrams on page 211 for examples Arguments Parameter Datatype type Input BOOL Input CIPCONTROLCFG Input CIPSYMBOLICCFG Input CIPTARGETCFG Input USINT 490 Output BOOL Output CIPSTATUS Description If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed Function block execution control configuration See CIPCONTROLCFG data type on page 180 Information for the symbol to Read Write See CIPSYMBOLICCFG data type on page 189 Target device configuration See CIPTARGETCFG data type on page 183 Read command stores the data returned from the server Write command buffers the data t
269. ject Organizer to display the LD POU in the language editor 3 Adda COP function block In the Toolbox select Block and drag and drop it onto the first ladder rung to display the Block Selector In Search type COP and double click COP to add an instance of the function block to the ladder diagram Add COP variables and initial values 1 Add variables In the ladder diagram POU double click Local Variables to display the Local Variables page In the Variables page add the variables and data types listed in the table below 2 Create Arrays For ValueToWrite double click in Dimension and change the array size to 1 1 For A Data double click in Dimension and change the array size to 1 4 3 Enterthe data from the Value column of the table below into the Initial Value field for each variable Parameter Src SrcOffset Dest Variable name Data type ValueToWrite Array UINT 0 UINT A_Data Array USINT Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Gmmuncation instructions Chapter 9 Parameter Variable name Data type DestOffset 0 UINT Length 4 UINT Swap TRUE BOOLEAN STS COPsts Array UINT Add a contact 1 Inthe Toolbox select Direct Contact and drag and drop it to the left of the COP function block input on the first ladder rung 2 Inthe Variable Selector assign a variable named Convert Data to contact Result The first rung of your ladder diagram program for MSG_CIPSYMB
270. k to an axis with too short a distance given realized by the controller Parameter 426 when the axis is moving AXIS REF data type The AXIS REF data type is a data structure that contains information for a motion axis It is used as an input and output variable in all motion control function blocks An instance of an AXIS REF data type is automatically created when you add a motion axis to the configuration Data type Description Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion contol instructions Chapter 17 Parameter Data type Description Axis ID AXIS REF The logic axis ID automatically assigned by Connected Components Workbench It cannot be edited or viewed by user Error Flag BOOL Indicates whether an error is present in the axis AxisHomed BOOL Indicates whether homing operation is successfully executed for the axis or not When the user tries to redo homing for an axis with AxisHomed already set homing performed successfully and the result is not successful the AxisHomed status is cleared ConstVel BOOL Indicates whether the axis is in Constant Velocity movement or not Stationary axis is not considered in Constant Velocity AccFlag BOOL Indicates whether the axis is in an Accelerating movement or not DecelFlag BOOL Indicates whether the axis is in an Decelerating movement or not AxisState USINT Indicates the current state of the axis ErrorlD UINT Indicates the cause for axis erro
271. kwell Automation technical support representative For contact information see http www rockwellautomation com support The axis is not operational because a drive or mechanical issue was detected Check the connection between the drive and the controller Drive Ready and In Position signals and ensure the drive is operating normally Reset the state of the axis using the MC_Reset function block The axis is not powered on Power on the axis using MC_Power function block Reset the state of the axis using the MC_Reset function block The axis is not operational because it or its related resources required by a function block are under the control of other function block or not available Ensure the axis or its related resources required by the function block are available for use Reset the state of the axis using the MC_Reset function block Review and correct the application if there are multiple instances of the same function block trying to control the axis at the same time The axis is not operational because the motion profile defined in a function block is invalid Reset the state of the axis using the MC_Reset function block Correct the profile in the function block The axis is not operational because the motion profile requested in a function block conflicts with the current axis velocity Possible causes e The function block requests the axis to reverse the direction while the axis is moving e The current veloc
272. l Represents the assignment of outputs or internal variables In an LD program a coil represents an action Represents the value or function of an input or internal variable Represents the conditional end of a diagram output Represents the conditional and unconditional logic in the LD program that control the control the execution of diagrams Rung Rungs are graphic components of an LD diagram that represent a group of circuit elements that lead to the activation of a coil Rungs can have labels to identify them within the diagram Labels along with jumps control the execution of a diagram You can enter comments free format text above the rung for documentation purposes Change the default width of rungs Follow these steps to use a new width for rungs You cannot adjust the width of existing rungs within a project 1 From the Tools menu select Options Click IEC Languages and then Ladder Diagram Under View Settings click Default Cell Width Increase the cell width value and then click OK Create and open a new LD program a 9 Hold down the Ctrl key while rolling the thumb wheel down on your mouse until the entire rung is visible on your computer Radwell Automation Publication 2080 AVOOIBENE March 2014 37 Chapter 3 38 Lackr Diagram D elements Rung comments Comments you enter in the space above the rung are saved in rich text format and stored in the controller 1 Inthe Language Editor double cli
273. l Automation Publication 2080 HVDOIBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO BYTE Parameter EN 01 ENO ANY TO BYTE converts a value to an 8 bit Byte value ANY TO BY EN ENO Arguments Parameter Data Type Description Type Input BOOL Function enable When Enable TRUE execute the conversion to the 8 bit BYTE computation When Enable FALSE there is no computation Applies only to LD programs Input BOOL SINT USINT INT Amy non Byte value UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING Output BYTE An 8 bit Byte value Output BOOL Enable out Applies only to LD programs ANY TO BYTE operator ST language example ST Equivalence bres ANY TO BYTE true bres is 1 tres ANY TO BYTE t 0s46ms tres is 46 mres ANY TO BYTE 0198 mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 269 Chapter 12 Dataconversion instructions ANY TO DATE 270 Parameter EN 01 ENO ANY TO DATE converts a value to a Date value ENG EN Arguments Parameter Data Type Description Type Input BOOL Function enable When Enable TRUE execute the conversion to the Date computation When Enable FALSE there is no computation Applies only to LD programs Input BOOL SINT USINT BYTE Any value other than Date INT UINT WORD DINT UDINT DWORD LI
274. l segment s Attribute ID value 1 65535 0 No Attribute ID used Members ID count Maximum Member ID values used 1 3 0 No Member ID used Member ID values 0 65535 The following table describes the CIPCONTROLCFG data type Data type Description BOOL TRUE Cancel the execution of the function block Bit is cleared when the message is enabled USINT Represents one of the following e 0 Msg Triggered Once when IN goes from False to True e 1t065535 Cydictrigger value in milliseconds Msg is triggered periodically when IN is True Set the value to 1 to trigger the MSG as quickly as possible USINT Reserved for future use Message cancellation If the Cancel parameter is set and the message is enabled EN bit is set and not done DN bit is not set then the message execution is aborted and the ER bit is set CIP message triggering A CIP message can be triggered periodically by setting a non zero value to the Trigger Type parameter The following table describes what happens when the Trigger Type parameter is used Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 191 Chapter 9 Communcation instructions Parameter Error ErrorlD SubErrorlD ExtErrorlD StatusBits 192 Action Results Message is enabled Trigger timer starts Trigger timer expires before the message Message is immediately triggered in the next completes ladder scan cyde Message completes before the trigge
275. lD 126 AW A writes characters from a source string to an external device This instruction adds the two appended characters that you configure on the configuration dialog box Arguments Parameter Datatype type Input Input Input Output Output Output Output BOOL AWAAWT ASCIILOCADDR BOOL UINT BOOL UINT Description If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed The channel and length to be operated See AWAAWT data type on page 132 The source string char array FALSE The function block is not done TRUE The function block is done The number of characters FALSE No error TRUE An error is detected See ABL error codes on page 130 AWA function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Al serial port instructions Chapter 6 Ladder Diagram LD Structured Text ST AWA Ip input source output Ce Ala 1 0 num AWA 1 NumChar error AWA 1 Error ID AWS 1 ErrarID nb Ww D LB AWA id Noid AWA Ll BOOLIM AWAAWT AwWwaInput ASCIILOCADDR Source LIIMT ADI Source Type AWA Write a string with characters appended to an external device Radwell Automation Publication 2080 HVDOIBENE Mib 2014 127 Chapter 6 All serial port instructions AWT Parameter AWTInput Sourc
276. lative NC MoveRelative 1 ErrorID NC MoveRelative AR vod MC_MoweRelative_1 AXIS REF AxisIn BCL Execute REAL Diskance REAL Velocity REAL Acceleration REAL Deosleratian REAL Jerk SINT BufferMade Type i MC MoveRelativa Commands a controlled motion of a specifiad distance relative bo tha actual position at the tima ef the execution Results m Aes Monitor Act Mame amd ei Ans State Discrete Motoen Ans Hzmed ho mum ee Weisen Beie 290 Error Description Accel RA 10 0 Pasitian and Velecity Command Position 0275 53 men Command Veiec e 3000 enee Target Pocito 00000D mea Target Velocity 300 0 enne Radwell Automation Publication 2080 AVOIBENE Mib 2014 449 Chapter 17 Motion control instructions MC_MoveVelocity commands a never ending controlled motion at a specified MC_MoveVelocity velocity 450 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Motion contol instructions Chapter 17 MC_MoveVelocity operation e Ifthe MC_MoveVelocity function block DirectionIn input is equal to 0 and the axis is in a moving state the sign of the Velocity input is ignored the axis continues to move in its current direction and new dynamic parameters are applied e Ifthe MC_MoveVelocity function block DirectionIn input is equal to 0 and the axis is not in a moving state the function block reports an error e Ifthe PTO Pulse limit is reached during execution of the MC_MoveVelocity function block the P
277. le with the requested motion profile This function block cannot execute as it will end up moving beyond the Soft Limit or the function block is aborted as the Soft Limit has been reached Check the velocity or target position settings in the function block or adjust Soft Limit setting This function block is aborted as the Hard Limit switch active state has been detected during axis movement or aborted as the Hard Limit switch active state has been detected before axis movement starts Move the axis away from the Hard Limit switch in the opposite direction Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 425 Chapter 17 Motion control instructions Value MACRO ID 0C MC FB ER LOG LIMIT 0D MC FB ERR ERR ENGINE 10 MC FB ERR NOT HOME 80 MC FB ER PARAM MODIFIED Description This function block cannot execute as it will end up moving beyond the PTO Accumulator logic limit or the function block is aborted as the PTO Accumulator logic limit has been reached Check the velocity or target position settings for the function block Or use MC SetPosition function block to adjust the axis coordinate system A motion engine execution error is detected during the execution of this function block Power cycle the whole motion setup including controller drives and actuators and re download the User Application If the fault persists call Tech support The function block cannot execute because the axis need
278. lerationSystem REAL R Maximal allowed acceleration of the axis in the motion system 13 MaxAccelerationAppl REAL R W Maximal allowed acceleration of the axis in the application 14 MaxDecelerationSystem REAL R Maximal allowed deceleration of the axis in the system 15 MaxDecelerationAppl REAL R W Maximal allowed deceleration of the axis in the application 16 MaxJerk REAL R W Maximal allowed jerk of the axis 1001 TargetPosition REAL R The final target position for current active moving function block 1002 TargetVelocity1 REAL R The final target velocity for current active moving function block 1005 Duty Cycle REAL R W The pulse duty cycle for one pulse The valid value is 0 100 indicating 0 100 PWM function can be realized by adjusting this value This parameter is configurable only using this Function Block The default value is set 50 0 by the controller Note For Duty Cycle the value will be overwritten by the default setting 50 0 when the controller is switched from RUN mode to PRG and RUN again or when the controller power is cycled 1006 PulsePerRevolution REAL R The Pulse per Revolution setting input by user in CCW GUI 1007 TravelPerRevolution REAL R The Travel per Revolution setting input by user in CCW GUI Motion control function block error IDs When a motion control function block ends with an error and the axis state is ErrorStop in most cases MC_Reset function block or MC_Power Off On and MC Reset can be used to recover
279. lication 2080 AVOIBENE Mib 2014 473 Chapter 17 Motion control instructions Ladder Diagram LD Decal Structured Text ST 474 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Motion contro instructions Chapter 17 HC ReadStatus 1 xis1i Enable ReadStatus Valid BeadsStatus MC Readstatus 1 Valid Busy Eeadotatus HC Eeado5tatus 1 Busy Error Readstatus HC ReadStatus 1 Error ErrorID ReadStatus re MC ReadStatus 1 ErrorID Errorsotop Eeadotatus re HC Readstatus 1 Errorstop Disabled Readstatus HC Eeadotatus l Disabled Nc ReadStatus 1 5toppindg stopping Readstatus Referenced Readstatus re MC Readstatus l1 Referenced Stanotill Readstatus re HC Readstatus 1 25tandStill DiscreteMotion Readstatus re MC Readstatus l DbiscreteMotion ContinuausMotion ReadStatus re MC ReadStatus 1 ContinuousHotion oynChronizedMotion Readstatus HC Readstatus 1 5yvnchronizedMotion Homing EeadStatus re MC EeadStatus i Homing ConstantVelocity Readotatus i Hc Readstatus l1 ConstantVelocity Accelerating Readotatus Hc ReadStatus 1 4Acceleratindg Decelerating Readstatus HC ReadStatus 1 Decelesratindg HC ReadStatus Li void MC_ReadStatus 104415 REF AxisIn BOOL Enable Type MC ReadsStatus Returns in detail the status of the axis with respect to the motion currently in progress Results foo Sore Cerere Moon fos Homed r Moers erating Command Position 49815 73 m
280. lowing process diagram describes the message instruction events that occur when the Rung condition is True 212 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Gmmuncation instructions Chapter 9 Rung Condition is TRUE Message requests added to this queue has buffer allocated and processed by communication task Maximum queue size is 4 Wait Queue Messages cannot added to the Com queue are added to this queue for later process No maximum limit EN bt x 1 Examine EN bt Set Clear DN ER ba ClearErmr code Add MSG to Wat Queue DNER D s Examine DuER b t Cancel 1 or Timeout 1 T Cancel 0and Timeout 0 Quewt successtul END Com queue Message requests added to the Com queue have a buffer allocated and processed by the communication task The maximum queue size limit is 4 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 213 Chapter 9 Communcation instructions Wait queue Messages that cannot be added to the Com queue are added to the Wait queue to be processed at a later time The Wait queue does not havea maximum size limit Message execution timing diagram Rung TRUE The following table describes the message conditions and bit status for each execution step identified in the timing diagram while the rung condition remains true Step Message description Bit status 1 Rung condition goes
281. lows the process value to stabilize at the load The standard deviation for a series of stabilized process values For example if the process value stabilized between 31 4 to 32 0 then the deviation value would be 32 0 31 4 2 0 3 Some process values such as temperature take a very long time to stabilize The auto tune process considers how the process value reacts to the changes in step value and derives the Gain parameters Allocated time for the auto tune to complete It must be longer than what is required for the auto tune process A common value for many systems is 600 seconds but some systems may require more time If TRUE the output will be reset to 0 after auto tune completes If FALSE the output will remain at the load value after auto tune completes Description Absolute error Process SetPoint from the controller Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 551 Chapter 20 Proportional Integral Derivative PD instruction Input parameters ATWarning Warning for the Auto Tune sequence Possible values are 0 no auto tune done in auto tune mode 2 auto tune done ERROR 1 input automatically set to TRUE no auto tune possible 2 ERROR 2 auto tune error AT DynaSet expired OutGains Gains calculated after AutoTune sequences Example How to create a feedback loop for the manipulated value Adding a feedback loop for the manipulated value prevents excessive overshooting by
282. ls and examples for using high speed counter instructions in logic programs including the following Updating HSC application data HSC configuration is defined in the HSC application data and is usually only configured once before programming the HSC instruction Changes made to the HSC application data HSCAppData parameter are ignored while the HSC is counting To update the HSC configuration e Update HSCAppData e Call the HSC instruction with command 0x03 set reload High Speed Counter HSC User Interrupt dialog box Use the HSC interrupt dialog box to e Configure the interrupt properties such as ID and the program to use it in e Configure the interrupt parameters e In Interrupt Type select High Speed Counter HSC User Interrupt A Add High Speed Counter HSC User Interrupt Properties breng Type High Speed Counter HSC User Intenupt x HSC ID HSO T HSC Descrpbon HSCO Pragiam Parameters Auto Sait Overflow Mach High Preset Mack Ulrdetkaa Mask Low Preset Mack Cancel Ap He Configuring High Speed Counter HSC user interrupts A user interrupt causes the controller to suspend the task it is currently performing perform a different task and then return to the suspended task at the point where the task was suspended Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Live ost instructions Chapter 14 Micro830 and Micro850 controllers supp
283. lue of the control variable applied to the process For example the feedback can be IPIDCONTROLLER output The operation mode of the PID controller e TRUE controller runs in normal mode e FALSE controller causes reset R to track F GE A change in value TRUE to FALSE or FALSE to TRUE causes the controller to eliminate any proportional gain during that cycle Also initializes AutoTune sequences Gains PID for IPIDController See GAIN PID data type on page 539 When set to TRUE and Auto and Initialize are FALSE the AutoTune sequence is started Auto Tune Parameters See AT Param data type on page 540 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 535 Chapter 20 Proportional Integral Derivative PD instruction Parameter Parametertype Datatype Description Output Output REAL Output value from the controller AbsoluteError Output REAL Absolute error Process SetPoint from the controller ATWarnings Output DINT ATWarning Warning for the Auto Tune sequence Possible values are e noauto tune done e 1 in auto tune mode e 2 auto tune done e 1 ERROR 1 input automatically set to TRUE no auto tune possible e 2 ERROR2 auto tune error ATDynaSet expired OutGains Output GAIN PID Gains calculated after AutoTune sequences See GAIN PID data type on page 539 ENO Output BOOL Enable out Applies only to LD programs IPIDCONTROLLER function block language examples Function Bl
284. lues for defining the HSC ID Output Selection Bit Description First word of HSC Function Data 15 13 Module type of HSC e 0x00 Embedded e x01 Expansion e 0x02 Plug in Port 12 8 Slot ID of the module e 0x00 Embedded e 0x01 0x1F ID of Expansion Module e 0x01 0x05 ID of Plug in Port 7 0 HSC ID inside the module e 0x00 0x0F Embedded e 0x00 0x07 ID of HSC for Expansion e 0x00 0x07 ID of HSC for Plug in Port Note For the initial version of Connected Components Workbench only IDs 0x00 0x05 are supported HSCMode Parameter Data type User program access HSCApp HSCMode UINT read write Set the High Speed Counter to one of 10 types of counting modes The mode value is configured through the programming device and is accessible in the control program HSC operating modes The main HSC and sub HSC support different modes e The main high speed counters support 10 types of operation modes e Sub high speed counters support 5 types of operation modes mode 0 2 4 6 8 e Ifthe main high speed counter is set to mode 1 3 5 7 or 9 then the sub high speed counter will be disabled HSCMode Counting mode 0 Up counter The accumulator is immediately cleared 0 when it reaches the high preset A low preset cannot be defined in this mode Radwell Automation Publication 2080 HVDOIBENE March nb 2014 305 Chapter 14 306 High SpesdCauntier FES instructions HSCMode Counting mode 0 Up co
285. maintains sufficient water in a water supply tank that has an outflow A solenoid valve controls incoming water and fills the tank at a preset rate outflowing water is also controlled at a preset rate Water In NW Water Out Tank Program example information The water supply level program example includes the following information 556 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Roportional Integral Derivative PD instruction Chapter 20 e The sequence of events that occur in the control process e How the setpoint process and manipulated values are used in the control program e Anexample function block diagram that shows the IPIDController and other instruction blocks Setpoint process and manipulated values The following table defines how the SP PV and MV values are used in the water supply level program Item Description Setpoint SP Measurement of height that defines the target water supply level Process value PV The 4 20mA must be converted to the same unit as the SP which is a measurement of height Manipulated value MV Must be converted to an analog value so it can be output to the drive to control the pump Water supply level system The following diagram shows the components in the water supply level system that are controlled by the water supply level program The table following the diagram describes the events that occur when the control program runs Radwell Au
286. ment s Class ID value 1 65535 Instance UDINT Logical segment s Instance ID value 0 4294967295 Attribute UINT Logical segment s Attribute ID value 1 65535 0 No Attribute ID used MemberCnt USINT Members ID count Maximum Member ID values used 1 3 0 No Member ID used Memberld UINT 3 Member ID values 0 65535 CIPCONTROLCFG data type The following table describes the CIPCONTROLCEG data type 180 Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Verch 2014 Parameter Cancel TriggerType StrMode Gnmmuncation instructions Chapter 9 Data type Description BOOL TRUE Cancel the execution of the function block Bit is cleared when the message is enabled USINT Represents one of the following e 0 Msg Triggered Once when IN goes from False to True e 1t065535 Cydictrigger value in milliseconds Msg is triggered periodically when IN is True Set the value to 1 to trigger the MSG as quickly as possible USINT Reserved for future use Message cancellation If the Cancel parameter is set and the message is enabled EN bit is set and not done DN bit is not set then the message execution is aborted and the ER bit is set CIP message triggering A CIP message can be triggered periodically by setting a non zero value to the Trigger ype parameter The following table describes what happens when the Trigger l ype parameter is used Action Results Message is enabled Trigger timer starts Trigger time
287. mmediately valid e 1 mcQueued The new functionality becomes valid when all previous motion commands set one of the following output parameters Done Aborted or Error the axis is not in a moving state For MC ExecutionMode 0 this function block can only successfully complete when the axis state is Disabled or StandStill The execution of this function block reports an error if there is on going non Continuous motion with the axis in this mode For MC ExecutionMode 1 this function block can only successfully complete when the axis state is Disabled Standstill or the on going motion can complete ending with a Standstill state Other input values are reserved currently and are considered as invalid parameters Enable out Applies only to LD programs Axis output is read only in LD programs See also AXIS REF data type on page 426 When TRUE the Position has new value When TRUE the function block is not finished When TRUE an error was detected Error identification See also Motion control function block error IDs on page 424 MC SetPosition function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 Ladder Diagram LD Structured Text ST Position SecPosition 10000 0 Relative SetPosition TRUE HC ExecutionMode SetPosition ze D HC SetPosition r Axisi E
288. monitor and control the high speed counter Function block Description HSC on page 301 HSC applies high presets low presets and output source values to the high speed counter HSC SET STS onpage HSC SET STS manually sets or resets the HSC counting status 321 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 299 Chapter 14 High SpesdCauniier HED instructions What is a High Speed Counter 300 A high speed counter detects and counts narrow fast pulses and then issues specialized instructions to initiate control operations when the detected counts reach their preset values Control operations include the automatic and immediate execution of the high speed counter interrupt routine and the immediate update of outputs based on the configured source and mask pattern High speed counter capabilities Because HSC instructions have high performance requirements their operation is performed by custom circuitry that runs in parallel with the main system processor Enhanced capabilities of High Speed Counters include e 100 kHz operation high speed direct control of outputs 32 bit signed integer data count range of 2 147 483 647 e Programmable high and low presets e Overflow and underflow setpoints e Automatic interrupt processing based on accumulated count e Run time editable parameters from the user control program HSC instruction operation Micro800 controller support for HSC All Micro830 and Mi
289. mparing Real Values using Subtraction ABS and Less E EE 56 LD Keyboard shortcuts otro E Dorv AF UHR RUFI PR E RO bopE da iU Eee dd 58 Chapter 4 LIM_ALRM RORIS 62 Radwell Automation Publication 2080 HVOOTBENE Maran20144 3 Table of Contents Arithmetic instructions ASCII serial port instructions Chapter 5 ADS MC 66 PO OS um 68 ACOS DREAXD E 70 NERO DI 72 SLIN EE 73 E GENEE 75 ATAN ED 77 TRING Eeer 79 COS 81 COS SRE AU E 83 Iu 85 0 dig aee mt 86 EO cm 88 IMO e 90 MOV Aper 92 Multiplication T 93 INEO edita dead had acea ed oda Oba dedo bate tait rd 94 PON Lei dux E MM I I ii 95 RAN DD prm 97 SIN KEE 99 OINCILRE eeh eeh 101 E EE 103 Kl ELE 105 TAN edita dtt duele EI NM AE 106 TGA ING EE Y 108 IRUNG E 110 Chapter 6 Lj 114 y Oi c 116 y d mer 118 P Wl EE dT DON TDI PS 120 ARD mc 122 ydp 124 PAW Wr EN 126 ew ger 128 ASCII parameter details oe o ee Een 130 REENEN 130 ABLACD dat EtyDetanetesutideteur apeirian 130 Radwell Automation Publication 2080 RVOOTBENE March 2014 Table of Contents Binary instructions
290. mples Function Block Diagram FBD 509 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Chapter 18 Processcontro instructions Ladder Diagram LD run Structured Text ST 1 run TRUE xin ze 10 0 InitialValue 5 0 T TH10s INTEGRAL i1 run OverridingReset xin InitialValue T output i NOT OvyerridingReset Integratedoutput INTEGRAL 1 400T m in c r3 INTEGRAL Li void INTEGRAL 1 BOOL RUN BOOL RI REAL SIN REAL 0 TIME CYCLE Type INTEGRAL Integration over time ST Equivalence INTEGRAL is an instance of a INTEGRAL block INTEGRALI manual mode NOT manual_mode sensor_value init value t 100ms controlled value INTEGRALI XQUT Results 510 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Processcontrol instructions Chapter 18 Variable Monitoring Logical Value PhysicalValue Lock Data Type X e e e o run ri N A BOOL LI verndingH eset HA B OL in 10 0 N A REAL Initial value SCH N A REAL T TH1Us N A TIME output C ER BOOL lntegratedQutout 6 31707E 06 N REAL INTEGRAL a INTEGRAI i s Cancel Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 511 Chapter 18 Processcontro instructions PWM Parameter EN On Freq DutyCycle ChType 512 PWM Pulse Width Modulation turns the PWM output for a configured PWM channel on or off It
291. n Inc Trademarks not belonging to Rockwell Automation are property of their respective companies Preface Finding information about instructions and ladder elements Ladder Diagram LD language Ladder Diagram LD elements Alarm instruction Table of Contents In Ne E io ont ooa i ic bo 00i etus ds ie io Od Va acticin ae 14 Supported Controllers ose ike RIP RARI EN RD MEM DPI UE 15 Additional RESOWECES i itor to sae sto En sue arinari tuae Roa HER iiaa 16 Chapter 1 L str ctton plockarna oro Oeo aS OP EDEN Oi o I EO 18 E cfe E E E eee fanaa ee eee een err 18 te EE 18 Egeter geb 19 Instruction set in alphabetical order 22 Instruction set by type and function eceeeeeeeeeeeeeee 27 Chapter 2 LD PRO Grail nu eec GE Ci aie eds ax P crates e OR et 34 LD program development environment cere 35 Chapter 3 hit 37 Dloc E ote IND n DUUM I DM HU EE 40 Co kari es 43 EEN 48 RECON ood aberat utat stet oC eta Eten 51 lege ra meneaaieies 51 Instruction blocks in LD programs cccccscscscssssssssssssssssceeeeseoes 53 Working in the LD language editor eere 54 Ladder Diagram LD program examples eere 56 Example RK TRIG function block rtt tette 56 Example Co
292. n EN FALSE there is no computation IN Input LREAL Must be in set 1 0 1 0 ASIN LREAL Output LREAL Arc sine of the input value in set PI 2 PI 2 0 0 for invalid input ENO Output BOOL Enable out ASIN LREAL function language examples Function block diagram Ladder diagram Structured text i da seu 2 ArcSine ASIN LREAL in ASIN LEEALI LREAL ASIN LREAL LREAL IM Perform 64 bit real arcsine calculation ST Equivalence sine SIN LREAL angle Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 75 Chapter 5 Arithmetic instructions result ASIN_LREAL sine result is equal to angle Results Variable Monitoring 76 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 ATAN Parameter EN ATAN ENO Parameter Type Input Input Output Output ATAN yields the Arc Tangent of a Real value Arguments Data Type Description BOOL Function enable When EN TRUE execute current arc tangent computation When EN FALSE there is no computation REAL Any Real value REAL Arc tangent of the input value in set PI 2 P1 2 0 0 for invalid input BOOL Enable out ATAN function language examples Function block diagram Ladder diagram Structured text i in 0 5 2 i ircTan ATAN ni ATANG REAL ATAM REAL IM Arc Langent ST Equivalence tan
293. n block is represented by a single rectangle and has a fixed number of input connection points and output connection points An elementary instruction block performs a single function Item Description Block name The name of the function to be performed by the instruction block is written inside its rectangle shape at the top Input Each input of an instruction block is labeled and has a defined type Input connection Inputs are connected on the left border Output Each output of an instruction block is labeled and has a defined type Output connection Outputs are connected on the right border Fall Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 Finding information about instructionsand lecber elements Chapter 1 Calling a function Connected Components Workbench does not support recursive function calls When a function of the Functions section is called by itself or one of its called functions a run time error occurs Furthermore functions do not store the local values of their local variables Since functions are not instantiated they cannot call function blocks e A function can be called by a program by a function or by a function block e Any program of any section can call one or more functions A function can have local variables e A function has no instance meaning local data is not stored and so is usually lost from one call to the other e Because the execution of a function is driven by
294. n control axis states The basic rule for the behavior of the axis at a high level when multiple motion control function blocks are activated is that motion commands are always taken sequentially even if the controller has the capability of real parallel processing Any motion command is a transition that changes the state of the axis and as a consequence modifies the way the current motion is computed Motion control axis state diagram The axis is always in one of the defined states as shown in the following diagram MC MoveAbsolute MC MoveRelative MC Halt Discrete Motion MC MowveVelocity MC MoveAbsolute MC MoveRelative MC Halt im Continuous Motion MC MoveVelocity Error Done Note 1 WON MC_MoveAbsolute d CN 2s MC Stop MC MoveRelative f LR OX mm MC MoveVelocity MC Stop D am is M i MC Reset and MC Power Status FALSE i Disabled Motes Motion control axis state behavior The following table describes motion control axis states and parameters Radwell Automation Publication 2080 AVOOIBENVE Mach 2014Vach 2014 421 Chapter 17 Motion control instructions No Note 1 In the ErrorStop and Stopping states all function blocks except MC_Reset can be called although they will not be executed MC_Reset generates a transition to the Standstill state If an error occurs while the state machine is in the Stopping state a tra
295. n instructions Chapter 22 Structured text 1 position re 1 2i code ASCII fin position ASCIIB DINT A SCII STRIMG IM DINT Posi Character gt ASCII cade ST Equivalence FirstChr ASCII message 1 FirstChr is the ASCII code of the first character of the string Results ES Variable Monitoring Global Variables Micro Local Yanables RA_ASCI_LO Sustem va Logical alue PhysicalValue Lock E In abcd M ZA Sg position HA Dl r C E Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 569 Chapter 22 Stringmentoulation instructions For a given ASCII code CHAR provides a string containing one character CHAR Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE provide a single character string When EN FALSE no operation Code Input DINT Code in set 0 255 CHAR Output STRING One character string The character has the ASCII code given in input code ENO Output BOOL Enable out CHAR function language examples Function block diagram Ladder diagram Structured text 1 code OF zi character e CHAR code CHART STRING CHAR DINT Cade ASCII code gt Character ST Equivalence Display CHAR value 48 value is in set 0 9 570 Radwell Automation Publication 2080 AVOIBENE Mib 2014 String menioulation instructions Chapter 22
296. n page 426 Valid Output BOOL When TRUE parameter available Busy Output BOOL When TRUE the function block is not finished Error Output BOOL When TRUE an error was detected 468 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 Parameter Parameter Datatype Description type ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 Value Output REAL Value of the specified parameter in the data type as specified by the vendor MC_ReadParameter function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST Radwell Automation Publication 2080 AVOIBENE Mib 2014 469 Chapter 17 Motion control instructions ParameterNumber ReadParameter 11 MC ReadParameter 1 xis1 Enable ReadParameter ParameterNumber EeadParameter Valid EeadParameter NC EeadParameter 1 Valid Busy ReadParameter MC ReadParameter 1 Busy Error ReadParameter HC ReadParameter 1 Error ErrorID ReadParameter MC EeadParameter 1 ErrorID Value BeadParameter HC ReadParameter 1 Value Mc ReadParameter 1j void MC_ReadParameter_1 4 15 REF AxisIn BOOL Enable DINT ParameterMurmber Type MC ReadParameter Returns the value of a motion specific REAL parameter Results Micro l Axis Monitor ai EE Aen Name Asi Aug Buste Discrete Matan Aag Horned h Movement Consta
297. nable out Applies only to LD programs ANY TO UINT operator ST language example ST Equivalence bres ANY TO UINT true bres is 1 tres ANY TO UINT t 0s46ms tres is 46 mres ANY TO UINT 0198 mres is 198 282 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Dataconversion instructions Chapter 12 ANY TO ULINT converts a value to a 64 bit Unsigned Long Integer value ANY TO ULL ANY TO ULINT Arguments Parameter ParameterType DataType Description EN Input BOOL Function enable When Enable TRUE execute the conversion to the 64 bit Unsigned Long Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT BYTE An value other than an Unsigned Long Integer INT UINT WORD DINT UDINT DWORD LINT LWORD REAL LREAL TIME DATE STRING o1 Output ULINT A 64 bit Unsigned Long Integer value ENO Output BOOL Enable out Applies only to LD programs ANY TO ULINT operator ST language example ST Equivalence bres ANY TO ULINT true bres is 1 tres ANY TO ULINT t 0s46ms tres is 46 mres ANY TO ULINT 0198 mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 283 Chapter 12 Data conversion instructions ANY TO USINT converts a value to an Unsigned Short Integer value ANY TO USINT Arguments Parameter Parameter Type
298. nce e TRUE resets output to zero e FALSE leaves Output at Load value 540 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 IPIDController function block operation Roportional Integral Derivative PD instruction Chapter 20 Input Auto When Input Auto is TRUE the IPIDController runs in normal auto mode When Input Auto is FALSE it causes reset R to track F GE forcing the IPIDController Output to track the Feedback within the IPIDController limits at which time the controller switches back to auto without incrementing the Output SA O01l Ap g Initialize 4 1 Input Initialize For Input Initialize changing from FALSE to TRUE or TRUE to FALSE when AutoTune is FALSE causes the IPIDController to eliminate any proportional gain action during that cycle for example Initialize You can use this process to prevent bumping the Output when changes are made to the SetPoint using a switch function block To run an AutoTune sequence To run an AutoTune sequence the input ATParameters must be completed The Input Gain and DirectActing parameters must be set according to the process and DerivativeGain set typically 0 1 The AutoTune sequence is started with the following sequence 1 Set the input Initialize to TRUE 2 Set the input Autotune to TRUE 3 Change the input Initialize to FALSE 4 Wait until the output AT Warning changes to 2 5 Transfer the val
299. nction block 406 TRIMPOT READ function block 409 INSERT function 588 inserting instruction blocks in Function Block Diagrams 41 jumps to labels FBD elements 53 labelsRungs 37 returns FBD elements 52 rungs FBD elements 37 Instruction block description 182 191 209 296 298 Instruction block description for ABL 118 ACB 120 ACL 122 AHL 124 ARD 126 ARL 128 AVERAGE 296 AWA 130 AWT 132 COP 298 CID 268 CTU 270 CTUD 272 DERIVATE 512 F TRIG 158 HSC 309 HSC SET STS 329 HYSTER 514 IIM 372 INTEGRAL 516 IOM 375 IPIDCONTROLLER 547 KEY READ 378 LIM ALRM 64 MC AbortTrigger 438 MC Halt 441 MC Home 445 MC MoveAbsolute 450 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 613 Index MC MoveRelative 455 MC MoveVelodty 459 MC Power 464 MC ReadAxisError 469 MC ReadBoolParameter 475 MC ReadParameter 479 MC ReadStatus 482 MC Reset 487 MC SetPosition 490 MC Stop 494 MC TouchProbe 498 MC WriteBoolParameter 503 MC WriteParameter 507 MM INFO 385 MSG CIPGENERIC 182 MSG CIPSYMBOLIC 191 MSG MODBUS 202 MSG MODBUS2 209 PLUGIN INFO 388 PLUGIN READ 391 PLUGIN RESET 394 PLUGIN WRITE 396 R TRIG 160 RST 162 RTC READ 401 RTC SET 404 SCALER 527 SRT 168 STACKINT 530 SUS 540 SYS_INFO 406 TOF 603 TON 605 TONOFF 607 TP 610 TRIMPOT_READ 409 instruction blocks ENandENOparameters 41 ENoutput 41 ENO output 41 forLD diagrams 41 inserting
300. nction language examples Function block diagram Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 171 Chapter 8 Boolean instructions Ladder diagram Structured text i selector i y zi inO ze FALSE a inl FALSE Ai inZ zs FALSE 5 in3 zs FALSE 6 ind FALSE 7 in5 zs FALSE 8 in6 ze FALSE 9 in TRUE 10 output MUSSER selector inl inl in ins int in5 ind in MUXS Bf EDOL MUXSBIUSINT Selector BOOL INO BOOL IM1 BOOL INZ BOOL INS BOOL IN4 BOOL INS BOOL INS BOOL INF Multiplexer entries accepts BOOL inputs and output value 172 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Boolean instructions Chapter 8 ST Equivalence range MUXS choice 1 5 10 50 100 500 1000 5000 select from 8 predefined ranges for example if choice is 3 range will be 50 Results Variable Monitoring Global Variables Micro Local Vanables Ho _MUSBB_ST System Variables Mi Hame Logical Value PhysicalValue Lock Data Type Bt gt d bt gt selector d KR USINT in AAA BOOL in N A BOOL Ine AAA BOOL In3 KA BOUL m N A BOOL inb N A BOOL Ing KK l BOQL In AAA BOOL N A BOOL Cancel Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 173 Chapter 8 Boolean instructions MUX4B yields a value between four BOOL type input and output values MUX4B d S Arguments Parameter Parameter Data Ty
301. nditional or unconditional elements that control the execution of an LD diagram Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 51 52 Chapter 3 Lackr Diagram D elements Jump notation The following notation indicates a jump to the LAB label gt gt LAB Jump to a label where the label name is LAB Example Jump LD Program POLJ x DirectContact ReverseContact PulseRs Contact PulseFal Contact Fall Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Instruction blocks in LD programs Lat Diagram LD elementis Chapter 3 The Connected Components Workbench instruction set includes IEC 61131 3 compliant instruction blocks Instruction blocks collectively include function blocks functions and operators You can connect instruction block inputs and outputs to variables contacts coils or other instruction block inputs and outputs Instruction block conventions The IEC61131 3 programming language specification addresses numerous aspects of programmable controllers including the operating system execution data definitions programming languages and instruction sets The IEC61131 3 specification provides a minimum set of functionality that can be extended to meet end user applications Instruction block names Functions and function blocks are represented by a box that displays the name of the instruction and the short version of the parameter names For function blocks the instance nam
302. ne Boolean state 46 Pulse falling edge coil on page Pulse falling edge or negative coils support a Boolean output of a connection line Boolean state 46 Set coil on page 47 Set coils support a Boolean output of a connection line Boolean state Reset coil on page 47 Reset coils support a Boolean output of a connection line Boolean state Example Coils PulseFal_dgeCoil Adding coil elements Follow these steps to add and modify coil elements Add a coil element 1 Verify the LD program has a defined rung for the coil 2 Fromthe Toolbox drag the coil into the LD language editor to the right of a Boolean symbol or of a Boolean output 3 Assign a variable to the coil Tip A plus sign appears on top of a Toolbox element when you hover over a valid target Release the mouse button to add the element 44 Fuckwell Automation Publication 2080 RVDOTBENE Mach 2014Mach 2014 Lat Diagram LD elementis Chapter 3 Tip You can use keyboard shortcut keys to add elements to your LD program See LD Keyboard shortcuts on page 58 Insert a parallel coil l From the Toolbox drag the branch element into the language editor and place it just slightly above the rung element 2 Fromthe Toolbox draga coil element into the language editor and place it on the branch element to display the coil on the branch Change the type of coil In the language editor select the coil then press the space bar until the new coil type is available E
303. ng end of line Radwell Automation Publication 2080 HVDOIBENE Mib 2014 115 Chapter 6 AG Olseral port instructions ACB determines the total characters in the buffer ACB Arguments Parameter Parameter type Data type Description IN Input BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed ACBInput Input ABLACB The channel to be operated See ABLACB data type on page 130 Q Output BOOL FALSE The function block is not done TRUE The function block is done Characters Output UINT The number of characters Error Output BOOL FALSE No error TRUE An error is detected ErrorlD Output UINT See ABL error codes on page 130 116 ACB function block language examples Function Block Diagram FBD Ladder Diagram LD Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Al serial port instructions Chapter 6 Structured Text ST 1 AGB drin input B output i ACE 1 0 d number ACH 1 Characters di error ACE l Errar 5 ID ACH 1 ErrorID void ACB ABOOL IN ABLACE ACBInput Type ACB Determine total number of characters in buffer Radwell Automation Publication 2080 AVOIBENE Mib 2014 117 Chapter 6 A Olseral port instructions ACL ACL clears the Receive and Transmit buffer s and removes instructions from the ASCII queue Arguments Parameter Parameter type Data type Description IN I
304. ng manipulation instructions on page 567 DOY on page 600 Timer instructions on page 589 EXPT on page 86 Arithmetic instructions on page 65 FIND on page 574 String manipulation instructions on page 567 INSERT on page 576 LCD on page 346 Input Output instructions on page 345 LEFT on page 578 String manipulation instructions on page 567 LIMIT on page 524 Process control instructions on page 501 LOG on page 88 Arithmetic instructions on page 65 MAX on page 296 Data manipulation instructions on page 287 MID on page 580 String manipulation instructions on page 567 MIN on page 294 Data manipulation instructions on page 287 MLEN on page 582 String manipulation instructions on page 567 MOD on page 90 Arithmetic instructions on page 65 MUX4B on page 174 Boolean instructions on page 153 MUX8B on page 170 NOT MASK on page 138 Binary instructions on page 135 OR MASK on page 140 POW on page 95 Arithmetic instructions on page 65 Fockwell Automation Publication 20800 RVDOTBENE Marh 2014 Merch 2014 29 Chapter 1 Finding information about instructionsand ladder elements Instruction RAND on page 97 REPLACE on page 586 RHC on page 357 RIGHT on page 584 ROL on page 142 ROR on page 144 RPC on page 359 SHL on page 146 SHR on page 148 SIN on page 99 SIN LREAL on page 101 SQRT on page 103 STIS on page 406 TAN on page 106 TAN_LREAL on page 108 TD
305. ning RSLinx Classic software PanelView Component terminals firmware revisions 1 70 and above or other controllers that support CIP Serial over DF1 Full Duplex such as ControlLogix and CompactLogix controllers that have embedded serial ports The Serial Port driver can be configured as CIP Serial Modbus RTU ASCII or Shutdown through the device configuration tree Embedded communication channels The Micro830 and Micro850 controllers have the following additional embedded communication channels e Anon isolated RS 232 485 combo port e Anon isolated USB programming port e An RJ 45 ethernet port Micro850 only Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Chapter 10 Compare instructions Compare instructions compare values using an expression Ora specific compare instruction Operator Equal on page 252 gt Greater Than on page 254 gt Greater Than or Equal on page 255 lt Less Than on page 256 lt Less Than or Equal on page 257 lt gt Not Equal on page 258 Description Compares the first input to the second input to determine equality for Integer Real Time Date and String data types For Integer Real Time Date and String values compares input values to determine whether the first is greater than the second For Integer Real Time Date and String values compares input values to determine whether the first is greater than or equal to th
306. niti 30 HA USINT I Timec TOWDAT Time Enable i M A BOOL Timel D ail eekly d M BOOL Timel Daun 3 M a LISIMT Timel Houtln 20 HA USINT TimeC Minn 1 M LISIMT Timet D ay ff 4 Aaa LISIMT TimeC Hourl fF 25 MA USINT TimeC Mind tt ao Aad LISIMT I TimeD TOWDAT TimeD Enable d M A BOOL Tmel Dail weekly M ey BOOL TimeD D autin 5 M A LISIMT TimeD Hourin 10 AAA LISIMT TimeD Minn 15 M A USINT Time DayO tf b M LISIMT Time Hoult 35 A6 LISIMT Tine MI 40 M LISIMT CO TOWDATA Data Type The following table describes the TOWDATA data type Radwell Automation Publication 2080 AVOIBENE Mib 2014 607 Chapter 23 Timer instructions Parameter Data Type Description Enable BOOL TRUE Enable FALSE Disable DailyWeekly BOOL Type of Timer 0 daily timer 1 weekly timer DayOn USINT Day of Week On value must be in set TO all HourOn USINT Hour On value must be in set 0 23 MinOn USINT Minute On value must be in set 0 59 DayOff USINT Weekday Off value must be in set 0 6 HourOff USINT Hour Off value must be in set 0 23 MinOff USINT Minute Off value must be in set 0 59 608 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 operator 109 operator 97 operator 88 operator 74 lt lt operator 262 lt operator 264 operator 265 operator 258 gt gt operator 260 gt operator 261 1 1Gain operator 9
307. nnection connection The state of the connection line on the right of the contact is set to TRUE when the state of the connection line on the left is TRUE and the state of the associated variable falls from TRUE to FALSE The state is reset to FALSE in all other cases Fall Automation Publication 2080 AVOIBENE Mib 2014 Lacoer Dagram LD elements Chapter 3 Example Pulse Falling Edge Contact Recommendation Restrict the use of output variables with edge contacts We recommend you do not use outputs or variables with a Pulse rising edge contact positive or a Pulse falling edge contact negative These contacts are for physical inputs in a ladder diagram If you need to detect the edge of a variable or an output we recommend you use the R_TRIG F_TRIG function block which is supported and works in any language at any location in your program Return Returns are outputs that represent a conditional end of an LD diagram Note You cannot place connections to the right of a return element When the left connection line has the TRUE Boolean state the diagram ends without executing the instructions located on the next lines of the diagram When the LD diagram is a function its name is associated with an output coil to set the return value returned to the calling diagram Example Return Insert a return From the Toolbox drag the return element into the language editor and place it on the rung Jump Jumps are co
308. nput BOOL If Rising Edge IN turns from FALSE to TRUE start the function block with the precondition that the last operation has been completed ACLInput Input ACL The state of the transmit and receive buffers See ACL data type on page 131 Q Output BOOL FALSE The function block is not done TRUE The function block is done Error Output BOOL FALSE No error TRUE An error is detected ErrorlD Output UINT See ABL error codes on page 130 118 ACL function block language examples Function Block Diagram FBD Ladder Diagram LD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 A Olseral port instructions Structured Text ST 1 ACL ifin input d output Ce ACL 1 0 d error ACL 1 Error 4i ID ACL 1 ErrorID ACL iff void ACL 1 BOOL IM ACLI ACLInput Type ACL Clear the receive and or transmit butters Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Chapter 6 119 Chapter 6 Al serial port instructions AHL BRL Parameter IN AHLInput ChannelSts Error ErrorlD 120 AHL sets or resets the RS 232 Request to Send RTS handshake control lines for your modem input Arguments Parametertype Datatype Input Input Output Output Output Output BOOL AHLI BOOL WORD BOOL UINT output umm channel L error L ID L Description If Rising Edge IN turns from FALSE to TRUE start the function block with th
309. ns LOG LOG yields the logarithm base 10 of a Real value Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current logarithm computation When EN FALSE there is no computation IN Input REAL Must be greater than zero LOG Output REAL Logarithm base 10 of the input value The returned result is 3 4E 38 for a zero IN value and negative IN value ENO Output BOOL Enable out LOG function language examples Function block diagram Ladder diagram Structured text 1 in 10 0 2i output LOG in LOG REAL LOGIREAL IN Logarithm ST Equivalence xpos ABS xval 88 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Arithmetic instructions Chapter 5 xlog LOG xpos Results Variable Monitoring Hame Logical v alue PhysicalValue Lock E Ri gti gf p pE TEES Al In L 3 COE Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 89 Chapter 5 Arithmetic instructions MOD vields the module of an integer value MOD Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the module computation When EN FALSE there is no computation IN Input DINT Any signed integer value Base Input DINT Must be greater than zero MOD Output DINT Module calculation input MOD base returns 1 i
310. nsition to the ErrorStop state is generated 2 Power Enable TRUE and there is an error in the axis 3 Power Enable TRUE and there is no error in the axis 4 MC_Stop Done AND NOT MC_Stop Execute 5 When MC_Power is called with Enable False the axis goes to the Disabled state for every state including ErrorStop 6 If an error occurs while the state machine is in Stopping state a transition to the ErrorStop state is generated Motion control axis state code values You can monitor the axis state using the Axis Monitor feature The following table identifies the values used to define each of the predefined axis states State value State name 0x00 Disabled 0x01 Standstill 0x02 Discrete Motion 0x03 Continuous Motion 0x04 Homing 0x06 Stopping 0x07 Error Stop Axis state updates On motion execution the axis state update is dependent on when the relevant motion function block is called by the POU scan This is the case even though the motion profile is controlled by the Motion Engine as a background task and is independent from the POU scan For example on a moving axis on a Ladder POU state of a rung true an MC MoveRelative function block in the rung is scanned and the axis starts to move Before MC MoveRelative completes the state of the rung becomes False and MC MoveRelative is no longer scanned In this case the state of the axis cannot switch from Discrete Motion to StandStill even after the axis full
311. nsmit buffer when set TRUE and removes the transmit ASCII function blocks AWA and AWT from the ASCII queue AHL ChannelSts data type The following table describes the AHL ChannelSts data type Description Used for the DTR signal reserved Used for the DCD signal bit 3 of word 1 indicates active Used for the DSR signal reserved Used for the RTS signal bit 1 of word 1 indicates active Used for the CTS signal bit 0 of word 1 indicates active Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 131 Chapter 6 Parameter Channel ClrRts SetRts Cancel Parameter Channel Length Cancel Parameter 132 AUllserial port instructions Data type UINT BOOL BOOL BOOL Data type UINT UINT BOOL Data type AHLI data type The following table describes the AHL data type Description Serial port number e 2 for the embedded serial port or e 5 9 for serial port plug ins installed in slots 1 through 5 e 5 for slot 1 e 6forslot 2 e 7 forslot 3 e 8 for slot 4 e 9for slot 5 Used to reset the RTS control line Used to set the RTS control line When this input is set to TRUE this function block does not execute ARDARL data type The following table describes the ARDARL data type Description Serial port number e 2 for the embedded serial port or e 5 9 for serial port plug ins installed in slots 1 through 5 e 5 for slot 1 e 6forslot 2 e 7 forslot
312. nstructions Neg 94 Parameter EN 01 ENO Neg converts a value toa negated value Arguments Parameter Type Data Type Input BOOL Input SINT INT DINT LINT REAL LREAL Output SINT INT DINT LINT REAL LREAL Output BOOL Example ST equivalence 8023 1 a ail0 rol00 ril ri2 Description Function enable When Enable TRUE execute current convert to negative computation When Enable FALSE there is no computation Applies only to LD programs Input and output must be the same data type Input and output must be the same data type Enable out Applies only to LD programs Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Arithmetic instructions Chapter 5 POW Parameter EN EXP POW ENO When the first argument is base and the second argument is exponent POW yields the Real result of the following base exponent POW operation The Exponent is a real value Arguments Parameter Type Data Type Description Input BOOL Function enable When EN TRUE execute current exponent computation When EN FALSE there is no computation Input REAL Real number to be raised Input REAL Power exponent Output REAL IN EXP 1 0 if IN is not 0 0 and EXP is 0 0 0 0 if IN is 0 0 and EXP is negative 0 0 if both IN and EXP are 0 0 0 0 if IN is negative and EXP does not correspond to an integer Output BOOL
313. nt Velocity Eme Desenpiore Position and Velocity Commend Postion 1723 6 mm Command Velpciby SEL mm sec Target Position iO mm Target Velacity SO mm sec 470 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 MC ReadStatus returns the status of the axis with respect to the motion MC ReadsStatus currently in progress MC ReadStatus operation When the MC ReadStatus function block Enable is set to False all status outputs are reset to False or O Arguments Parameter Parameter Datatype Description type Radwell Automation Publication 2080 HVDOIBENE Mib 2014 471 Chapter 17 Motion control instructions Parameter Parameter Datatype Description type EN Input BOOL Function block enable When EN TRUE execute current MC_ReadStatus computation When EN FALSE there is no computation Applies only to LD programs AxisIn Input AXIS_REF See also AXIS REF data type on page 426 Enable Input BOOL When TRUE gets the value of the parameter continuously ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS_REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Valid Output BOOL When TRUE valid outputs are available Busy Output BOOL When TRUE the function block is not finished Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification For Error ID numbers and d
314. ntegration is performed with a time base of milliseconds that is integrating an input of 1 with an initial value of 0 for 1 second will result in a value of 1000 To convert the output of the instruction to units of seconds divide the output by 1000 If the CYCLE parameter value is less than the cycle timing of the execution of the device the sampling period is forced to the cycle timing XIN sampling and function block executions occur every cycle time Scan Time Jitter For a given user program Scan Time Jitter varies from controller to controller The cycle time determines the sensitivity of the Integral function block Changes occurring in XIN between two samplings or within the cycle Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 XIN Y Axis Parameter RUN R1 XIN X0 CYCLE XOUT Processcontro instructions Chapter 18 time are not taken into account when the integral XOUT value is calculated e Cycle time and Scan Time Jitter both contribute to the overall inaccuracy of Integral output e See also XIN in sync with function block execution example and XIN not in syne with function block execution example Arguments Parametertype Datatype Input BOOL Input BOOL Input REAL Input REAL Input TIME Output BOOL Output REAL Description Mode TRUE integrate FALSE hold Overriding reset Input any real value Initial value Sampling period Possible values range from Oms
315. o be sent to the server When a MSG is triggered or retriggered Data is cleared for the MSG Read command FALSE The function block is not done TRUE The function block is done Function block execution status When a MSG is triggered or re triggered all elements inside Status are reset See CIPSTATUS data type on page 181 Radwell Automation Publication 2080 AVOIBENE Mib 2014 187 Chapter 9 Communtation instructions Parameter Parameter Datatype Description type DataLength Output UDINT Number of data bytes Read Written When a MSG is triggered or retriggered DataLength is reset to 0 for MSG Read command MSG_CIPSYMBOLIC function language examples Function block diagram Ladder diagram Write Value Structured Text ST 188 Radwell Automation Publication 2080 AVOIBENE Mib 2014 ET ptatusi pemiengi Communtation instructions Chapter 9 m TR gomme ini Crtrll Bymbali target datal Ud Status BEESBLTTISgT d void MSG CIPSYMBOLIC 2 BOOL IN CIPCONTROLCFG CtriCla CIPSYMBOLICCFG SymbolicC g CIPTARGETCFG TargetCha USINT L 1 Deai Type MSG CIPSYRIBOLIC Send a CP Smbat message CIPSYMBOLICCFG data type The following table describes the CIPSYMBOLICCFG data type Parameter Data type Description Service USINT Service code e Read default e 1 Write Symbol STRING Name of the variable to Read Write
316. ock Diagram FBD 536 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Frooortional Integral Derivative PD instruction Chapter 20 Ladder Diagram LD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 537 Chapter 20 Proportional Integral Derivative PD instruction Structured Text ST 1 IPIDCONTROLLEE 1 pr0 sp fb auto init gains autotune atp em E output re IPIDCONTROLLER 1 0utput 3 ae e IPIDCONTEOLLER 1 A bsoluteError 4 atw rr IPIDCONTROLLER 1 4TWarning 5 og IPIDCONTROLLER 1 0utGains IPIDCONTROLLER 14 538 ST equivalence IPIDControllerl is an instance of IPIDController block IPIDControllerl1 Proc SP FBK Auto Init G_In Radwell Automation Publication 2080 AVOIBENE Mi nb 2014 Frooortional Integral Derivative PD instruction Chapter 20 A Tune A TunePar Err Out process IPIDController1 Output A Tune Warn IPIDControllerl ATWarning Gain Out IPIDControllerl OutGains Results SCR Variable Monitoring Global Variables Microg10 Local Variables UntitledST 5 vstem Variables Micro81 Hame Logical alue PhysicalYalue Lock Data Typ E e e e o HighLimit 10 0 N A HEAL E 15 0 KZ HEAL Lowy Lirnt 5 0 N A HEAL Hysteresis alue 20 MA REAL QutputH N A BOOL d output AA BOOL OutputL KZ BOOL LIM_ALAM_1 D e Li An GAIN PID data type The following table describes the GAIN PID data type Par
317. ok similar to the following image Micro850 VAR x RE a ae Initial Value Attribute af gf 7 g t gt JO EM_DL27 BOOL d Read A TarCfg CIPTARGETCFC Read Write UDINT ToA UDINT 123456789 Read Write Review the complete program results The following example shows the complete MSG_CIPSYMBOLIC messaging program after it has executed 242 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Communication instructions Chapter 9 Controller B results The following two images show the values for Controller B before and after the messaging program is executed Radwell Automation Publication 2080 AVOIBENE Mib 2014 243 Chapter 9 Communtation instructions Before the program is executed Project Organizer Mame QS CIPG Cirle JO EM DI 06 JO EM DI 01 IO EM DI 03 IO EM DI 04 JO EM DI 05 After the program is executed Project Organizer Mame QS CIPS Ctrl i EN mila AA DM uos EU Name j Logical Yalue Physical Yalue ul WE Cragg ee e e Gem gt E Programs JO EM DI 00 JO EM DI 01 m JO EM pr 92 E 0 8 pro is User Defined Function E JO EM DI 04 IO EM DI 05 aie PM Example How to configure Modbus communication to read from and write to a drive These examples show you how to configure Modbus communication to read status data from and write control data to a PowerFlex 4 drive using the MSC MODBUS function block 244 Radwell
318. ol on the axis Direction Output SINT The valid values are 1 0 1 CommandAborted Output BOOL When TRUE command was aborted by another command or Error Stop Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 MC MoveVelocity function block language examples Function Block Diagram FBD 452 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion contro instructions Chapter 17 Ladder Diagram LD Structured Text ST Radwell Automation Publication 2080 AVOIBENE Mib 2014 453 Chapter 17 Motion control instructions Velocity Velocity 400 0 Acceleration Velocity 100 0 Deceleration Ve locity re 100 0 Jerk Velocity 100 0 DirectionIn Velocity 1 Mc Hoveveloc ity i Axisl Execut E Veloe ity Ve locity Ve Locicy Acceleration Velocity Deceleration Velocity Jerk Velocity DirectioniIn Velocity ButterMode Velocity InVelocity Velocity HC HoveVelocity 1 InVelocity Busy Velocity re MC MoveVelocity 1 Busy Active Velocity re MC MoveVelocity 1 Active Direction Velocity HC HoveVelocity 1 Di irection Cammand amp Abart Velocity NC HoveVelocity 1 CommandAborted Error Velocity H HoveVelocity 1 Ercror Error ID Ve locity HC MoveVe loc ity 1 ErrorID HC MoveVelncicy iff vod C P oveVvelocity Lazio REF AxisIn BIOL Execute REAL Velocity REAL Acceleration M
319. on Applies only to LD programs High limit value Input any real value Low limit value Hysteresis value must be greater than zero High alarm TRUE if X above high limit H Alarm output TRUE if X out of limits Low alarm TRUE if X below low limit L Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Alam instruction Chapter 4 LIM ALRM timing diagram example H H EPS x L EPS L QH UL LIM ALRM function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 63 Chapter 4 Alam instruction Structured Text ST 1 HighLimit 10 0 B E f gH 3 LowLimit 5 0 4 HysteresisValue ze Uj 5 LIH ALEM i iHighLimit x LowLimit HysteresisValusel 6 OutputH LIM ALEM 1 0H 7i utputL re LIM ALRM 1 0L 5 output LIM ALEM 1 0 LIM ALEM 1d void LIM_ALRM_1 REAL H REAL x REAL L REAL EPS Type LIM ALRM Highflow limit alarm with hysteresis Results Variable Monitoring Global Variables Microf10 Local Variables UntitledST System Variables Hame Logical Value PhyszicalValue Lock Data Type gt oE g t gt HighLimit 10 0 HA REAL k 15 0 HA REAL LowiLinit 5 0 HA REAL Hysteresis alue 20 M 5 HEAL OutputH HA BOOL output M 5 BOOL Qutoutl HA BOUL UM SAM i v UM Ab 64 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Function ABS on page 66 ACOS on p
320. on page 260 Block counts integers from a given value down to 0 1 by 1 CTU on page 262 Counts integers from 0 up to a given value 1 by 1 CTUD on page 264 Counts integers from 0 up to a given value 1 by 1 or from a given value down to 0 1 by 1 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 259 Chapter 11 Counter instructions CTD counts integers from a given value down to 0 1 by 1 CTD Arguments Parameter Parametertype Datatype Description CD Input BOOL Counting input down counting when CD is a rising edge LOAD Input BOOL Load command dominant CV PV when LOAD is TRUE PV Input DINT Programmed initial value Q Output BOOL Underflow TRUE when CV lt 0 CV Output DINT Counter result CTD function block language examples Function Block Diagram FBD Ladder Diagram LD cd 260 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Ganter instructions Chapter 11 Structured Text ST 1 InitialValue 10 E CTD Lifted load InitialValue ST Equivalence CTDL is an instance of block zi CTD1 trigger Load cmd 100 underflow CTD1 Q result CTD1 CV Results ES Variable Monitoring Hame Logical alue PhysicalValue Lock EX gt gf ge cg LTD 1 CENE EIN EN leie Sp BOOL Initial alue 10 E BINT Counter esult 4 M B DINT Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014
321. orkbench software only Fall Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Late Diagram LD language Chapter 2 The following illustration shows the language editor for an LD program where LD program development you develop an LD Program Organizational Unit POU Use the LD Toolbox or environment LD keyboard shortcuts to add elements to your LD POU LD Program POU x ll Toolbox s HN l a LD e k Pointer Hel Rung lt gt Return gt Jump LJ Branch XD Direct Coil 4M Reverse Coil cA SetCoil t Reset Coil t Pulse Rising Edge Coil t Pulse Falling Edge Coil Jk Direct Contact JA Reverse Contact F Pulse Rising Edge Contact Pulse Falling Edge Contact TF Block a General Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 35 Element Rung on page 37 Block LD on page 40 Branch on page 39 Coil on page 43 Contact on page 48 Return on page 51 Jump on page 51 Chapter 3 Ladder Diagram LD elements Ladder diagram elements are the components that you use to build a ladder diagram program All che elements listed in the following table can be added to your ladder diagram from the LD Toolbox within Connected Components Workbench Description Represents a group of circuit elements that lead to the activation of a coil Instructions include operators functions and function blocks including user defined function blocks Two or more instructions in paralle
322. ort Ist Target address Local port of the 1st Target Gmmuncation instructions Chapter 9 Description Connection closing behavior e TRUE Close the connection when the message completes e FALSE Do not close the connection when the message completed default e See also CIP EIP message connections on page 185 Target path for CIP messaging The target path for CIP messaging contains parameters which determine the path and destination of the of the CIP message Target path syntax The target path string parameter uses the following syntax e local port 1st target s address lt 1st target s local port 2nd target s address The 1st hop must be present the 2nd hop is optional Description Local port used to send out the message The port should be an active EtherNet IP or CIP Serial port USB ports are not supported Target address of the 1st hop e For EIP specify the target s IP address The IP address should be a unicast address and should not be 0 multicast broadcast local address or a loop back 127 x x x address e For CIP Serial specify the target s node address The supported value is 1 Local port used to send out the message 2nd Target address Target address of the 2nd hop Target path example The following table lists example values used in a target path string and describes the results for each string String example Results 0 0 The target device is the local de
323. ort up to six HSC User Interrupts that can be used to execute selected user logic at a pre configured event E ates Ze fa fr ta fo Ee gy Ce 5 Ap Ze ee Gates ee Ge Ses i te F ap Ze 3p Ze Ze 25 el DU omn o dH S m om Properties ZELT C50 A8Q0wB re Gt gie Inteinupt Type High Speed Counter HSC User interupt e L E EE TII TE a 2 ir eS HSC ID HSCD e PZ EEN L HSC Description HSC Ee oh Program m Parameters Auto Start Lontroller General O venton Mark High Prezel Mack Memory Serial Port Lnderilowu Mack Low Preset Mask USB Port p remet DK Cancel App Help Date and Time Interrupts ij Startups Faults Add and configure a High Speed Counter HSC User Interrupt Follow these steps to add and configure a HSC interrupt from the controller s configuration workspace To add an HSC interrupt 1 Double click the controller to open the controller configuration workspace 2 Inthe controller tree click Interrupts to display the Interrupt configuration page 3 Right click an empty row and click Add to display the Interrupt properties dialog box To configure an HSC interrupt 1 In Interrupt Type select High Speed Counter HSC User Interrupt 2 Select the properties HSC Interrupt properties on page 326 3 Select the parameters HSC Interrupt parameters on page 327 Radwell Automation Publication 2080 AVOIBENE March 2014Vach 2014 325 Chapter 14 326 High
324. ou can replace an assigned variable directly from the language editor or from the Variable Selector To modify a variable from the language editor 1 Inthe language editor click the variable name to display a drop down list of global and local variables 2 Do one of the following e Type anew variable name in the text box Or e Select a different variable name from the drop down list To modify a variable from the Variable Selector l Inthe language editor double click the variable to open the Variable Selector 2 Click the variable name then select a different variable from the drop down list of global and local variables 54 Fall Automation Publication 2080 AVOIBENE Mib 2014 Lacer Diagram LD elementis Chapter 3 3 Clickan existing variable then type constant values in the text box provided Fall Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 55 Chapter 3 Lader Diagram LD elements Ladder Diagram LD program examples 56 See the following examples of Ladder Diagram LD programs Example R_TRIG function block on page 56 Example Comparing Real Values using Subtraction ABS and Less than on page 56 Example R TRIG function block The following is an example program in debug mode that shows the recommended Example Comparing Real Values using Subtraction ABS and Less than The Real data type is not recommended when comparing values for equality be
325. out Applies only to LD programs ANY TO INT operator ST language example ST Equivalence bres ANY TO INT true bres is 1 tres ANY TO INT t 0s46ms tres is 46 mres ANY TO INT 0198 CS mres is 198 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 273 Chapter 12 Data conversion instructions ANY_TO_LINT converts a value to a 64 bit Long Integer value ANY TO LINT Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When Enable TRUE execute the conversion to the 64 bit Long Integer computation When Enable FALSE there is no computation Applies only to LD programs i1 Input BOOL SINT USINT Any value other than a Long Integer BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING o1 Output LINT A 64 bit Long Integer value ENO Output BOOL Enable out Applies only to LD programs ANY TO LINT operator ST language example ST Equivalence bres ANY TO LINT true bres is 1 tres ANY TO LINT t 0s46ms tres is 46 mres t ANY TO LINT 0198 mres is 198 274 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Dataconversion instructions Chapter 12 ANY TO LREAL Parameter EN 01 ENO ANY TC IS EN ENO Arguments Parameter Type Data Type Input Input Output Output bres tres ares BOO
326. out Applies only to LD programs Note Using floating point data types could result in inaccurate calculations due to the rounding limitations inherent in floating point mathematics Note When setting or changing the value for N you need to set RUN to FALSE then set it back to TRUE AVERAGE function block language examples Function Block Diagram FBD 288 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Datamenipulation instructions Chapter 13 Ladder Diagram LD run Structured Text ST E AVERAGE Irun Variable Humber 2 Output AVERAGE 1 XOUT AVERAGE 1M void AWERAGE 1 BOOL RUN REAL SIM DIMT M Tvpe AVERAGE Running average over M samples ST Equivalence AVERAGE an instance of an AVERAGE block AVERAGEl auto mode amp store cmd sensor value 100 ave value AVERAGEI XOUT Radwell Automation Publication 2080 HVDOIBENE Mib 2014 289 Chapter 13 Datamenpulation instructions COP Parameter Enable Src SrcOffset 290 COP copies the binary data in the Source to the Destination and leaves the source value unchanged Arguments Parametertype Datatype Input BOOL Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT Input UINT DWORD REAL TIME DATE STRING LWORD ULINT LINT LREAL Description Function block enable This FB is level triggered When Enable TRUE perform copy When Enable FALSE the function block will not be execut
327. owing table describes Modbus TCP connection behavior Scenario Message request is enabled and a connection to the target does not exist Message execution is completed and ConnClose is set to True Message execution is completed and ConnClose is set to False Connection is not associated with an active message and remains idle for the amount of time specified in ConnTimeOut parameter Controller transitions from an executing mode Run Remote Run Remote Test Single Scan and Remote Single Rung to a non executing mode Results If a connection to the target does not exist a new connection is established If a connection to the target already exists the existing connection is used If there is only one connection to the target the connection is closed If there is more than one connection to the target the connection is closed when the last message execution is completed The connection is not closed The connection is closed All active connections are forcibly closed Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Communtation instructions Chapter 9 M The following topics describe how and when MSG_CIPGENERIC essage execution MSG CIPSYMBOLIC and MSG MODBUS2 message instructions execute processes and timing based on their bit and rung conditions diagrams Message execution process general The following diagram shows how and when messages execute based on the status of
328. p RUN 564 REC E Eo adul ctv atc teen Um Eu eI 565 Ee 566 Chapter 22 PRS ed er 568 CHAR one inan Deae M C 570 DELETE EE 572 FIND ecc M A 574 INSER F em 576 IE DI os EE 578 Ee 580 MELEE EEN 582 RIGH WEE 584 REPLACE care 586 Chapter 23 Timer instruction configuration ssssssssssssessssssssseeeooooeceeeeseeeeeessssseeoo 590 TOF IEEE ME ERE EMI I eI 591 Que ous davis o PER 593 TONOBE EE 595 DD IRERE AR E A IA S AE EIE AIA IE AIE OR EAT 598 DOY irern m 600 IDOL AO arn Gy PE ea dada entra edat nna 601 RR HE 603 dO der E 605 EE Data Eege 607 Radwell Automation Publication 2080 RVOOTIBENE March 2014 11 Preface Radwell Automation Publication 2080 RVOOTBENE March 2014 13 Preface This guide provides reference information about the instruction set available for In This Manual developing programs for use in Micro800 control systems The instruction set includes Structured Text ST Ladder Diagram LD Function Block Diagram FBD programming language support Additionally the ladder elements supported in Connected Components Workbench development environment are defined 14 Radwell Automation Publication 2080 RVOOIBENE March 2014 Supported Controllers following Micro800 controllers 2080 LC10 12AWA 2080 LC10 12DWD 2080 LC10 12QBB 2080 LC10 12QWB 2080 LC20 20AWB 2080 LC20 20QBB 2080 LC20 20QWB 2080 LC30 10QVB
329. page 278 ANY TO STRING on page 279 ANY TO TIME on page 280 ANY TO UDINT on page 281 ANY TO UINT on page 282 ANY TO ULINT on page 283 ANY TO USINT on page 284 ANY TO WORD on page 285 Description Converts to Boolean Converts to BYTE Converts to Date Converts to Double Integer Converts to Double Word Converts to Integer Converts to Long Integer Converts to Long real Converts to Long Word Converts to Real Converts to Short Integer Converts to String Converts to Time Converts to Unsigned Double Integer Converts to Unsigned Integer Converts to Unsigned Long Integer Converts to Unsigned Short Integer Converts to Word Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 267 Chapter 12 Data conversion instructions ANY TO BOOL converts a value to a Boolean value ANY TO BOOL Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When Enable TRUE execute the conversion to BOOLEAN computation When Enable FALSE there is no computation i1 Input SINT USINT BYTE INT UINT Any non Boolean value WORD DINT UDINT DWORD LINT ULINT LWORD REAL LREAL TIME DATE STRING 01 Output BOOL Boolean value ANY TO BOOL operator ST language example ST Equivalence ares ANY TO BOOL 10 ares is TRUE tres ANY TO BOOL t 0s tres is FALSE mres ANY IO BOOL FALSE mres is FALSE 268 Radwel
330. patible with the MSG instruction 21 A local channel configuration parameter error exists 22 The Target or Local Bridge address is higher than the maximum node address 33 A bad MSG file parameter exists 54 A lost modem 55 The message timed out in the local processor A link layer timeout 217 The user cancelled the message 129 An illegal function 130 An illegal data address 131 An illegal data value 206 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Parameter Channel TriggerType Cmd ElementCnt Error code 132 133 134 135 136 137 255 Data type UINT UDINT USINT UINT Error description A slave device failure Acknowledge The slave device is busy Negative acknowledge A memory parity error A non standard reply The channel has been shut down MODBUS2LOCPARA data type Gxmuncation instructions Chapter 9 The following table describes the MODBUSLOCPARA data type parameters Description Local Ethernet port number 4 for Micro850 amp Micro820 embedded Ethernet port Message trigger type 0 Msg Triggered Once when IN goes from False to True e 10 65535 Cyclic trigger value in milliseconds Message triggered periodically when IN is true and the previous message execution completes Set the value to 1 to trigger messages as quickly as possible Modbus command 01 Read Coil Status Oxxxx 02 Read Input Status 1xxxx 03 Read Holdin
331. pe Description Type Selector Input USINT Selector integer value must be in set 0 3 INO Input BOOL Any BOOL input value IN1 Input BOOL Any BOOL input value IN2 Input BOOL Any BOOL input value IN3 Input BOOL Any BOOL input value MUX4B Output BOOL Can be e InO if Selector 0 e In if Selector 1 e In2ifSelector 2 e In3ifSelector 3 Will be FALSE for all other values of the selector MUAR function language examples Function block diagram 174 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Boolean instructions Chapter 8 Ladder diagram Structured text E Selector e 1 2 in FALSE a inl zs TRUE 4 in2 FALSE 5 ind zs FALSE d output MUZ4B selector inl inl in in3 l MUXABH BOOL MUX4B USINT Selector BOOL INO BOOL IM1 BOOL INZ BOOL IN3 Multiplexer 4 entries accepts BOOL inputs and output value ST Equivalence range MUX4 choice 1 10 100 1000 select from 4 predefined ranges for example if choice is 1 range will be 10 Results Radwell Automation Publication 2080 HVDOIBENE Mib 2014 175 Chapter 8 Boolean instructions Variable Monitoring Global Variables Micro Local Variables P MLB ST System Variables Miz Hame Logical value PhysicalValue Lock DataType e e e e selector Na USINT inl HA BOOL m N A BOOL in2 N A BOOL In3 EH BOOL output HA BOOL 176 Radwell Autom
332. phically connect the Axis output parameter of a motion control function block to the AxisIn input parameter of another motion control function Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 427 Chapter 17 Motion control instructions block for convenience For example connect MC_POWER Axis output parameter to MC HOME AxisIn input parameter j In a Ladder Diagram You cannot assign a variable to the Axis output parameter of a motion control function block because it is read only Monitoring an AXIS REF variable You can monitor an AXIS REF variable in the software while in the controller debug mode when the motion engine is active or in the user application as part of user logic You can also monitor the AXIS REF variable remotely through various communication channels 428 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Mbtion control instructions Chapter 17 MC_AbortTrigger aborts other function blocks that are connected to trigger MC_AbortTrigger events For example MC_TouchProbe MC_AbortTrigger operation e The MC_AbortTrigger function block only executes when it is assigned to an axis that is controlled by MC_TouchProbe Arguments Parameter Parametertype Datatype Description EN Input BOOL Function block enable When EN TRUE execute current MC_AbortTrigger computation When EN FALSE there is no computation Applies only to LD programs AxisIn Input AXIS REF Se
333. plies only to LD programs Minuend in any Integer Real or Time data type All inputs must be the same data type Subtrahend in any Integer Real or Time data type All inputs must be the same data type Difference of the minuend and the subtrahend in any Integer Real or Time data type Output must be the same data type as inputs Enable out Applies only to LD programs 0c Radwell Automation Publication 2080 HVDOIBENE Mib 2014 105 Chapter 5 Arithmetic instructions TAN yields the tangent of a Real value TAN d Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE perform current tangent computation When EN FALSE there is no computation IN Input REAL Cannot be equal to PI 2 modulo Pl TAN Output REAL Tangent of the input value 1E 38 for invalid input ENO Output BOOL Enable out TAN function language examples Function block diagram Ladder diagram Structured text 1i in 0 5 a tangent TAN tinj TANT REAL TANM REAL IM Tangent ST Equivalence tangent TAN angle 106 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Arithmetic instructions Chapter 5 result ATAN tangent result is equal to angle Results ES Variable Monitoring E E e e Ces ess Hame Logical Yalue Physical Yalue Lock E F wm In 0 5 N A Radwell Automation Publication 2080 HVDOIBENE Mib 2
334. program Perform the following tasks to create a MSG_CIPSYMBOLIC messaging program that can be used to write a value to a global variable on another controller No Task 1 Add a COP function block variables and a contact MSG_CIPSYMBOLIC on page 233 2 Add an Equal operator and a coil on page 235 3 Add a MSG_CIPSYMBOLIC function block variables and a contact on page 237 4 Verify correct IP configuration on Controller B on page 231 5 Create global variable for Controller B on page 241 6 Review the complete program results on page 242 Add a COP function block variables and a contact Map CIPSYMBOLIC Follow these steps to add a COP function block variables and a contact The COP instruction is used to convert the data you enter to the destination data type so it will be compatible with the controller variable Add a COP function block 1l Addacontroller Radwell Automation Publication 2080 HVDOIBENE Mib 2014 233 Chapter 9 234 Communtcation instructions Expand the Controllers folder and the Micro850 folder to view all Micro850 controllers Double click a controller 2080 LC50 48QVB to add it to the Project Organizer 2 Addaladder diagram program In the Project Organizer right click Programs click Add and then click New LD Ladder Diagram Right click the ladder diagram icon in the Project Organizer click Rename and type CIPSymbolicMessage Double click the ladder diagram program in the Pro
335. providing a minimum and maximum value for the MV Temperature feedback loop example At the beginning of the temperature control process the difference between the process value PV and the setpoint value SP is large as shown in the following graph In this example of a temperature feedback loop the PV starts at 0 degrees Celsius and moves towards the SP value of 40 degrees Celsius Notice also that the fluctuation between the high and low manipulated value MV decreases and stabilizes with time The behavior of the MV depends on the values used in each of the P I and D parameters Temperature feedback Process Value PV temperature Output Input Thermal Contact 5095 A time Control Signal Manipulated Value MV IPIDController with a feedback loop The following function block diagram includes a feedback loop for the manipulated value that prevents excessive overshooting by providing a minimum and maximum value for the MV 552 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Frooortional Integral Derivative PD instruction Chapter 20 Prevent excessive i overshooting Example How to add a UDFB to a PID program You can add UDFBs outside the main program to perform specialized functions such as converting units or transferring values Transfer the auto tune gain value This UDFB transfers the Autotune gain value to My Gain Transfer so it can be used by the controller Convert a manipulated value
336. r 1 26 Finding information about instructionsand ladder elements Instruction TONOFF on page 595 TOW on page 605 TP on page 598 TRIMPOT READ on page 401 TRUNC on page 110 TTABLE on page 166 UIC on page 408 UID on page 410 UIE UIF on page 414 XOR_MASK on page 150 XOR on page 162 on page 412 Instruction block type Function block Function Function block Function block Function Function Function Function Function Function Function Operator Fall Automation Publication 2080 HVDOIBENE Mib 2014 Finding information about instructionsand lecber elements Chapter 1 Instruction set by type and Function blocks function The following table lists the function blocks by functional category Instruction Functional category ABL on page 114 ASCII serial port instructions on page 113 ACB on page 116 ACL on page 118 AHL on page 120 ARD on page 122 ARL on page 124 AWA on page 126 AWT on page 128 AVERAGE on page 288 COP on page 290 CTD on page 260 CTU on page 262 CTUD on page 264 DERIVATE on page 502 F TRIG on page 154 HSC on page 301 HSC SET STS on page 321 HYSTER on page 504 IIM on page 363 INTEGRAL on page 506 IOM on page 366 IPIDCONTROLLER on page 535 KEY_READ on page 369 LIM_ALRM on page 62 MC_AbortTrigger on page 429 MC Halt on page 432 MC Home on page 436 Data manipulation instruction
337. r diagram and add variables on page 330 2 Assign values to the HSC variables on page 333 3 Assign variables and build the program on page 335 4 Test the program and run the High Speed Counter on page 337 5 Add a Programmable Limit Switch PLS function on page 340 Create a ladder diagram and add variables Follow these steps to create a ladder diagram and then add local variables to the rung This sample program uses a 2080 LC50 24QVB controller The HSC is supported on all Micro830 and Micro850 controllers except 2080 LCxx xxA WB controller types To create a ladder diagram and add variables 1 Inthe Device Toolbox expand the Catalog tab to view the device folders 330 Radwell Automation Publication 2080 AVOIBENE Mach 2014IVerch 2014 High GosediCounter HY instructions Chapter 14 2 Expand he Controllers folder and the Micro830 folder to view all Micro830 controllers Double click a controller 2080 LC50 24QVB to add it to the Project Organizer Device Toobos tr Discover IIT eDan Lc10 1209v8 JIT 2D50 LC30 100 8 Il zDa80 LC30 100w8 JI SUD LC20 LCD AL zD3D LC30 1608 JI 2080 4 C30 16n w IIT 2DB8D LC3O 240EB JI zZDaD LC3O 240 vB TT 20906520240 JIT ALC ca TLL acce IIT 2090 20 00 ALT zooocezo ieon 3 Inthe Project Organizer right click Programs click Add and then click New LD Ladder Diagram to add a new ladder logic program 4 Right dick UntitledLD and select Open 5 In the Toolbo
338. r expires before the message Message is immediately triggered in the next completes ladder scan cycle Message completes before the trigger time Message is triggered when the trigger time expires expires Example message triggering In the following example the TriggerType value is set to 100 Message Execution X 5 4 Ladder scan e 3 3 ENbt DNR LH Trigger Timer Ea A Tae CIPSTATUS data type The following table describes the CIPSTATUS data type Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 181 Chapter 9 Communcation instructions Bit Name 0 EN 1 EW 2 ST 3 ER 4 DN 182 Parameter Data type Description Error BOOL This bit is set to TRUE when the function block execution encounters an error condition ErrorlD UINT Error code value See CIPSTATUS error codes on page 182 SubErrorlD UINT Sub Error code value See CIPSTATUS error codes on page 182 ExtErrorlD UINT CIP extended status error code value StatusBits UINT This parameter can be used to verify control bits Description Enable Enable Waiting Start Error Done e Bit 0 EN Enable Bit 1 EW Enable Wait Bit 2 ST Start Bit 3 ER Error e Bit DN Done e Other bits are reserved e See CIPSTATUS status bits on page 182 CIPSTATUS status bits The CIPSTATUS status bits are set based on the status of the message execution the communication buffers
339. r time Message is triggered when the trigger time expires expires Example message triggering In the following example the Trigger l ype value is set to 100 Message Execution dk dk Ladder scan he 3 EN bit OWERbE LL Trigger Timer R M leng T 0rma CIPSTATUS data type The following table describes the CIPSTATUS data type Data type Description BOOL This bitis set to TRUE when the function block execution encounters an error condition UINT Error code value See CIPSTATUS error codes on page 182 UINT Sub Error code value See CIPSTATUS error codes on page 182 UINT CIP extended status error code value UINT This parameter can be used to verify control bits e Bit 0 EN Enable e Bit 1 EW Enable Wait e Bit 2 ST Start e Bit 3 ER Error e Bit DN Done Other bits are reserved See CIPSTATUS status bits on page 182 CIPSTATUS status bits The CIPSTATUS status bits are set based on the status of the message execution the communication buffers and the rung conditions Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Name EN EW ST ER DN Description Enable Enable Waiting Start Error Done Gmmuncation instructions Chapter 9 Behavior Set when the rung goes true and remains set until either the DN bit or the ER bit is set and the rung goes false Set when the communication buffer is allocated for the message request Cl
340. r when error is indicated by ErrorFlag This error usually results from motion control function block execution failure ExtraData UINT Reserved TargetPos REAL Indicates the final target position of the axis for MoveAbsolute and MoveRelative function blocks For MoveVelocity Stop and Halt function blocks TargetPos is 0 except when the TargetPos set by previous position function blocks is not cleared CommandPos REAL During motion this is the current position the controller commands the axis to take There may be a slight delay between the axis actual position and this CommandPos TargetVel REAL The maximum target velocity instructed to the axis for a moving function block The value of TargetVel in current function block or smaller than it depending on the other parameters in the same function block CommandVel REAL During motion this element indicates the current velocity the controller instructs the axis to use Note that there may be a slight difference between the axis actual velocity and CommandVel due to the drive delay or drive adjustment overshoot Important Once an axis is flagged with and error and the error ID is not zero the axis must be reset using MC Reset before issuing any other movement function block Axis variables Axis variables are used to control position speed acceleration and error for a given motion control axis Assigning a variable to an Axis output parameter In a Function Block Diagram You can gra
341. rabe Results ul Variable Monitoring m Name Logical Value Physical Value Lock Data Typ z I NENEI NIC Tngerlnp AbortTric 0 Execute AbortTrig mum Trigerlnput AbortT 2 _AbortT rigger N A Error AbortTrigger N A ErrorlD AbortTrigg 0 AA Done_AbortTrigger EA C E Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 T 431 Chapter 17 Motion control instructions MC Halt Parameter EN AxisIn Execute Deceleration 432 MC Halt commands a controlled motion stop Use MC Halt to stop the axis under normal operating conditions The axis state changes to DiscreteMotion until velocity is zero When velocity reaches zero Done is set to True and the axis state changes to StandStill MC Halt operation e tis possible to execute another motion command during deceleration of the axis which aborts the MC Halt function block e Ifan MC Halt function block is issued when the axis state is Homing the function block reports an error and the homing process is not interrupted Arguments Parameter type Data type Description Input BOOL Function block enable When EN TRUE execute current MC Halt computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE start the motion at rising edge Note Executing MC Halt during homing MC Halt is set to MC FB ERR STATE and th
342. re 16 combinations These combinations can be found in a truth table for each combination the output value can be adjusted The number of configurable combinations depends on the number of inputs connected to the function For example Number 0 Oo won nd Wo A WO NO wech a Aa wo N O Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 In3 Co c O O O O O c wh sch In2 CO c o oO O O O c In1 0 O O a O c eO CH Ind 169 Chapter 8 Boolean instructions MUXS8B yields a value between eight BOOL type input and output values MUX8B i Arguments Parameter Parameter Data Type Description Type Selector Input USINT Selector integer value must be in set 0 7 INO Input BOOL Any BOOL input value IN1 Input BOOL Any BOOL input value IN2 Input BOOL Any BOOL input value IN3 Input BOOL Any BOOL input value IN4 Input BOOL Any BOOL input value IN5 Input BOOL Any BOOL input value IN6 Input BOOL Any BOOL input value IN7 Input BOOL Any BOOL input value MUX8B Output BOOL Can be e InO if Selector 0 e In if Selector 1 e In2ifSelector 2 e n3 if Selector 3 e In4ifSelector 4 e In5if Selector 5 e In6ifSelector 6 e n7 if Selector 7 Will be FALSE for all other values of the selector 170 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Boolean instructions Chapter 8 MUX8B fu
343. re blank MyTargetCfg ConnClose FALSE For Connected messaging the CIP connection could be closed immediately after completion of the message instruction by setting the Initial Value to TRUE Result The parameters in the Variables page should look similar to the following image Lad vw CIPGENERIC j JPCONTROLDAJ BOR Abert the execution of message LEI D Tagger once n Cychc igge USNT reserved Eege CPAPECIG aint L CF Service cone 127 UNT Di CP Oan ID 1 655335 UOT 01 CI Instance ID 0 04600 PI ER J UNT j7 OF Anriute 1 63813 0 No ariribute LNT CIS kiembe Diot 1 7 0 hore l EMEND CI Member ID D 65535 i OPTARGETCEG THING 14192168 10 OF deztrucion path UGINT i O Unecnnected 1 Deh connection WONT Linc ones ac muri Las eg cut Lee FALSE TRUE Close OF connection upon erage USINT i LENT e beer Su l To assign the variables to the parameters 1 Inthe ladder diagram POU click the top portion of the variable input block to display the variable drop down list Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 227 Chapter 9 Communtation instructions Parameter CtrlCfg AppCfg Target ReqData ReqLength ResData 228 2 From the list assign each input parameter to its correct input variable as identified in the following table Input variable MyCtrlCfg MyAppCfg MyTargetCfg MyReqData MyReqLength MyResData Result Comments
344. rence computation TimeB Input TIME The end time for time difference computation ENO Output BOOL Enable out TDF or Q Output TIME The time difference for the two time inputs TDF is name or PIN ID Qis PIN ID TDF function language examples Function block diagram Ladder diagram Radwell Automation Publication 2080 HVDOIBENE Mib 2014 603 604 Chapter 23 Timer instr ctions Structured text 1 Timea T 10s 2 TimeB T 5s 3i output TDF Timea TimeB TDF TIME TDF TIME Timed TIME Tire Compute time difference ST Equivalence TESTTIMEDIFF TDF TESTTIMEI TESTTIME2 Results ES Variable Monitoring Hame Tires Times output Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Timer instructions Chapter 23 The TOW function has four channel inputs it turns on an output if the value of the real time clock RTC is in the range of the Time of Week setting of any one of four channels Ifan RTC is not present the output is always off TOW Note Make sure you configure any TimeX input parameter with valid ranges as specified in the TOWDATA Data Type table An invalid value will fault the controller if TimeX Enable is set to TRUE and an RTC is present and enabled Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE perform the function When EN FALSE do not perform the function TimeA Input TOWDATA
345. reset reached OFCauselnter BOOL 0 9 read write Overflow caused a HSC interrupt UFCauselnter BOOL 2 9 read write Underflow caused a HSC interrupt HPCauselnter BOOL 0 9 read write High preset reached causing a HSC interrupt LPCauselnter BOOL 2 9 read write Low Preset reached causing a HSC interrupt PlsPosition UINT 0 9 read only Position of the Programmable Limit Switch PLS ErrorCode UINT 0 9 read write Displays the error codes detected by the HSC sub system Accumulator DINT read write Actual accumulator reading HP DINT read only Last high preset setting LP DINT read only Last low preset setting HPOutput UDINT read write Last high preset output setting 310 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Parameter Data type CountEnable BOOL LPOutput UDINT Parameter HSCSTS CountEnable Parameter HSCSTS ErrorDetected Parameter HSCSTS CountUpFlag Parameter HSCSTS CountDownFlag High SosediCounter HD instructions Chapter 14 HSC mode User program Description access 0 9 read only Counting enabled read write Last low preset output setting HSCSTSInfo parameter details HSCSTSInfo data type HSCSTS parameters are used to determine the status of the High Speed Counter CountEnable Data type HSC mode User program access BOOL 0 9 read only Indicates the status of the High Speed Counter whether counting is enabled 1 or disabled 0 default ErrorDetected Data type HSC mode User
346. ressions converts values to negated values Boolean exclusive OR of two values Boolean OR of two or more values Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 153 Chapter 8 Boolean instructions F TRIG detects a falling edge of a Boolean variable F TRIG s Arguments Parameter Parameter Data type Description type CLK Input BOOL Any Boolean variable Q Output BOOL TRUE when CLK changes from TRUE to FALSE FALSE in all other cases F TRIG function block language examples Function Block Diagram FBD Structured Text ST ii F TRIG 1 ENABLE 2j IF F TRIG 1 0 THEN 3 output TRUE 4j END IF F TRIG iff void FLTRIG_1 BOOL CLE Type E TRIG Falling edge detection ST Equivalence F TRIGI is an instance of a F_TRIG block F TRIGI cmd nb edge ANY_TO_DINT F_TRIG1 Q nb edge 154 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Boolean instructions Chapter 8 Results Variable Monitoring Hame DO i BRE eg Physical Value Lock E v gf gi bi d EMABLE VERA L Em mmm En ER F_TRIG_1 Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 155 Chapter 8 Boolean instructions R_TRIG detects a rising edge of a Boolean variable R HE R TRIG Arguments Parameter Parameter Data type Description type CLK Input BOOL Any Boolean variable Q Output BOOL TRUE when CLK rises from FALSE to TRUE F
347. ription Type Input Input Output Output BOOL Function enable When EN TRUE execute the bit to bit negation mask computation When EN FALSE there is no computation DINT Must have integer format DINT Bit to bit negation on 32 bits of IN BOOL Enable out NOT_MASK function language example Function block diagram NOT MASK Parameter EN IN NOT_MASK ENO 138 Ladder diagram Structured text T in 1 amp 2i NotMask NOT MASK in HOT MASE DINT NOT MA SK DIMT IN bit to bik negation ST equivalence result NOT_MASK 16 1234 result is 16 FFFF_EDCB Radwell Automation Publication 2080 AVOOIBENVE Mib 2014 Binary instructions Chapter 7 Results Variable Monitoring Logical Value PhysicalValue Lock E HA a Radwell Automation Publication 2080 AVOIBENE Mib 2014 139 Chapter 7 Binary instructione Integer OR bit to bit mask OR MASK turns bits on OR MASK Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the Integer OR bit to bit mask computation When EN FALSE there is no computation IN Input DINT Must have integer format MSK Input DINT Must have integer format OR MASK Output DINT Bit to bit logical OR between IN and MSK ENO Output BOOL Enable out OR MASK function language examples Function block diagram Ladder diagram Structured text I in 2 37 Zi mask
348. rolled by che HSC The HSCAPP OutputMask bit pattern corresponds to the output bits on the controller and can only be configured during initial setup e Bits that are set 1 are enabled and can be turned on or off by the HSC sub system e Bits that are set 0 cannot be turned on or off by the HSC sub system For example to use the HSC to control outputs 0 1 3 assign e HscAppData OutputMask 271011 or e HscAppData OutputMask 11 HPOutput Parameter Data type User program access 308 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 High SosediCounter HEC instructions Chapter 14 Parameter Data type User program access HSCApp HPOutput UDINT read write Defines the state 1 ON or 0 OFF of the outputs on the controller when the high preset is reached For more information on how to directly turn outputs on or off based on the high preset see OutputMask You can configure the high output bit pattern during initial setup or you can use the HSC function block to load the new parameters while the controller is operating LPOutput Parameter Data type User program access HSCApp LPOutput UDINT read write LPOutput HSCApp LPOutput defines the state 1 on 0 off of the outputs on the controller when the low preset is reached For more information on how to directly turn outputs on or off based on the low preset see OutputMask You can configure the low output bit pattern during initial s
349. rs are determined by the Axis configuration Emergency stop setting including E Stop type E stop Deceleration and E stop Jerk e The axis goes to StandStill after the Done bit is SET and the Execute input is changed to False if there is no error detected during the stop sequence e The MC Stop function block is primarily intended for emergency stop functionality or exception situations For normal motion stop MC Halt function block is usually used Arguments Parameter type Data type Description Input BOOL Function block enable When EN TRUE execute current MC Stop computation When EN FALSE there is no computation Applies only to LD programs Input AXIS REF See also AXIS REF data type on page 426 Input BOOL When TRUE starts the action at the rising edge Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 483 Chapter 17 Motion control instructions Parameter Parameter type Data type Description Deceleration Input REAL Value of the deceleration u s Jerk Input REAL Value of the Jerk u s ENO Output BOOL Enable out Applies only to LD programs Axis Output AXIS REF Axis output is read only in LD programs See also AXIS REF data type on page 426 Done Output BOOL When TRUE zero velocity was reached without error during the stop sequence Busy Output BOOL When TRUE the function block is not finished Active Output BOOL When TRUE indicates the function block has control on the axis CommandA
350. ructions LCD LCD displays a string or a number on the optional LCD module LCD function operation The LCD function is only supported by the Micro810 controller Arguments Parameter Parameter Type Data Type Description Enable Input BOOL Function enable When Enable TRUE the LCD switches to the user defined screen strings displayed on the LCD from the 1 0 status screen When Enable FALSE the LCD displays the contents of the 1 0 status screen Line1 Input STRING String to be displayed on line 1 of the LCD Line2 Input STRING String to be displayed on line 2 of the LCD Line3 Input STRING String to be displayed on line 3 of the LCD Line4 Input STRING String to be displayed on line 4 of the LCD LCD Output BOOL When TRUE function is enabled LCD function language examples Function block diagram 346 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 Ladder diagram Structured text 1 enable TRUE 2 linel ze Bi a line2 o Ai Linen C 5 line4 EI d output LCD enable linel linez lines lined BOOL LUD BOOL Enable STRING Linel STRING Linez STRING Line3 STRING Linet Display string ar number according to user requirements iF option LCD mounts ST Equivalence TESTOUTPUT LCD LCDENABLE LINE1 LINE2 LINE3 LINEA Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 347
351. ructions Chapter 17 MC TouchProbe records an axis position at a trigger event Tnggerlnp Execute WindowOnly FirstPosition LastPosition ErrorlD RecordedPosition MC_TouchProbe operation e Ifthe window direction first position gt last position is in the opposite direction of the motion direction the touch probe window will not be activated e Ifthe window setting FirstPosition or LastPosition is invalid the MC TouchProbe function block reports an error e Ifasecond instance of the MC TouchProbe function block is issued on the same axis and the first function block instance is in a Busy state the second function block instance reports an error e Onlyone MC TouchProbe function block instance should be issued to one axis Arguments Parameter Datatype Description type Input Input Input Input BOOL Function block enable When EN TRUE execute current MC TouchProbe computation When EN FALSE there is no computation Applies only to LD programs AXIS REF See also AXIS REF data type on page 426 USINT Only embedded motion supported BOOL When TRUE starts touch probe recording at the rising edge Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 487 Chapter 17 Motion control instructions Parameter Parameter Datatype Description type WindowOnly Input BOOL When TRUE only use the window defined here to accept trigger events Motion resolution is limited to t
352. s on page 287 Counter instructions on page 259 Process control instructions on page 501 Boolean instructions on page 153 Input Output instructions on page 345 Process control instructions on page 501 Input Output instructions on page 345 Process control instructions on page 501 Input Output instructions on page 345 Proportional Integral Derivative PID instruction on page 531 Input Output instructions on page 345 Alarm instructions see Alarm instruction on page 61 Motion control instructions on page 417 MC MoveAbsolute on page 441 MC MoveRelative on page 446 MC MoveVelocity on page 450 Radwell Automation Publication 2080 RVDOIBENE March 2014 March 2014 27 Finding information about instructionsand ladder elements Instruction MC Power on page 455 MC ReadAxisError on page 460 MC ReadBoolParameter on page 465 MC ReadParameter on page 468 MC ReadStatus on page 471 MC Reset on page 476 MC SetPosition on page 479 MC Stop on page 483 MC TouchProbe on page 487 MC WriteBoolParameter on page 492 MC WriteParameter on page 496 MM INFO on page 376 MSG CIPGENERIC on page 178 MSG CIPSYMBOLIC on page 187 MSG MODBUS on page 197 MSG MODBUS2 on page 204 PLUGIN INFO on page 379 PLUGIN READ on page 382 PLUGIN RESET on page 385 PLUGIN WRITE on page 387 R_TRIG on page 156 RS on page 158 RTC READ on page 393 RIC SET on page 396 SCALER
353. set 1 0 1 0 ENO Output BOOL Enable out COS LREAL function language example Function block diagram Ladder diagram Structured text 1 in 10 0 E cosine COS LREAL in COS LREAL LREAL COS LREAL LREAL IN Perform 64 bit real cosine calculation ST Equivalence cosine COS LREAL angle Radwell Automation Publication 2080 HVDOIBENE Mib 2014 83 Chapter 5 Arithmetic instructions result ACOS_LREAL cosine result is equal to angle Results Variable Monitoring Hame Logical Value PhysicalValue Lock d gf Be BE 84 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 Division Parameter EN 01 ENO Division divides the first Integer or Real input value by the second Integer or Real input value Arguments Parameter Data Type Description Type Input BOOL Function enable When Enable TRUE execute current division computation When Enable FALSE there is no computation Applies only to LD programs Input SINT USINT BYTE Dividend in non zero Integer or Real data type INT UINT WORD All inputs must be the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL Input SINT USINT BYTE Divisor in non zero Integer or Real data type INT UINT WORD All inputs must be the same data type DINT UDINT DWORD LINT ULINT LWORD REAL LREAL Output SINT
354. sition and number of characters provided MID yields required parts of strings Arguments Parameter Type Input Input Input Input Output Output Data Type BOOL STRING DINT DINT STRING BOOL Description Function enable When EN TRUE generate portion of a string When EN FALSE no generate operation Any non empty string Number of characters to be extracted cannot be greater than the length of the IN string Position of the sub string The sub string first character will be the one pointed to by Pos first valid position is 1 Middle part of the string its length NbC When the number of characters to extract exceeds the length of the IN string NbC is automatically recalculated to get the remainder of the string only When NbC or Pos are zero or negative numbers an empty string is returned Enable out MID function language examples Function block diagram Ladder diagram Radwell Automation Publication 2080 AVOIBENE Mib 2014 String menioulation instructions Chapter 22 Structured text L number 3 2i position 2 3 middle MID in number position MIDI STRING MID STRIMG IM DINT bc DINT Pos Extract middle of a string ST Equivalence sub string MID abcdefgh 2 4 sub string is de Results HS Variable Monitoring number position mid dle h KR d Radwell Automation Publication 2080 HVDOIBENE Mib 2014 581
355. son When Enable FALSE there is no comparison Applies only to LD programs Input BOOL SINT USINT BYTE INT All inputs must be the same data type UINT WORD DINT UDINT The Time input applies to the ST LD and FBD languages DWORD LINT ULINT LWORD Note The Real data type is not recommended REAL LREAL TIME DATE STRING Input BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD LINT ULINT L WORD REAL LREAL TIME DATE STRING Output BOOL TRUE if i1 i2 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Qnae instructions Chapter 10 Example Comparing Real Values using Subtraction ABS and Less than The Real data type is not recommended when comparing values for equality because of differences in the way numbers are rounded Two output values may appear equal in a Connected Components Workbench display but will evaluate as false For example 23 500001 compared to 23 499999 will both display as 23 5 in the variable input display but will not be equal in the controller To test whether two Real data type values are equal you can use a Subtraction instruction to get the difference between the values and then determine if the difference is Less Than an established precision value See the following LD program example for comparing two Real data type values Equal 2 operator ST language example Example ST Equivalence aresult
356. ss than 250 minimum will be set to 250 e Avalue greater than 10 000 maximum will be set to 10 000 See also Modbus TCP message timeout timers on page 209 TCP Connection establishment timeout in milliseconds Amount of time to wait for establishing successful TCP connection to the Target device e 250 10 000 e Set to 0 to use the default value 3000 e Avalue less than 250 minimum will be set to 250 e Avalue greater than 10 000 maximum will be set to 10 000 See also Modbus TCP message timeout timers on page 209 TCP connection closing behavior e True Close the TCP connection upon message completion e False Do not close the TCP connection upon message completion Default See also Modbus TCP message connections on page 210 Modbus TCP message timeout timers The following table describes how timers for MODBUS2TARPARA timeout parameters UcmmTimeout and ConnMsgTimeout behave based on message requests and status Action Results Message is enabled UcmmTimeout timer is activated Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 209 Chapter 9 Communtcation instructions 210 Action Connection is requested ConnMsgTimeout timer is active Connection request is completed Results ConnMsgTimeout timer is activated UcmmTimeout timer is disabled UcmmTimeout timer is reactivated Modbus TCP message connections Modbus TCP client supports a maximum of 16 connections The foll
357. support up to 16 simultaneous EtherNet IP server connections through an embedded Ethernet communication channel The Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 249 Chapter 9 250 Communtcation instructions channel can be used to connect a Micro850 controller to various devices through a local area network using a 10 Mbps 100 Mbps transfer rate Common Industrial Protocol CIP The CIP protocol is a transport and application layer protocol used for messaging over EtherNet IP ControlNet and DeviceNet networks that allows HMIs to easily connect to a Micro830 or a Micro850 controller CIP explicit messaging The CIP protocol is used for explicit messaging Explicit Messaging configuration data collection and diagnostics is used to transfer data that does not require continuous updates Explicit messaging is supported using CIP Generic client messaging through the MSG_CIPGENERIC function block and using CIP Symbolic client messaging through the MSG_CIPSYMBOLIC function block CIP Serial CIP serial uses DF1 Full Duplex protocol and provides point to point connection between two devices It combines data transparency American National Standards Institute ANSI X3 28 1976 specification subcategory D1 and 2 way simultaneous transmission with embedded responses subcategory F1 Micro830 and Micro850 controllers support CIP Serial through an RS 232 connection to external devices such as computers run
358. t UINT Error identification See AxisErrorlD error codes on page 462 MC ReadAxisError function block language examples Function Block Diagram FBD Ladder Diagram LD Structured Text ST Radwell Automation Publication 2080 HVDOIBENE Mib 2014 461 Chapter 17 Mbtion contol instructions HL Read xisError lr xisl Enable Bead xisError Valid Bead xisError HC REead ixisError 1 Valid Busy ReadAxisError MC Eead xisError 1 Busy Error Bead xisError HC Reads amp xiskrror 1 Error ErrorID Read xisError re MC Eead xisError 1 ErraorID A AxisErrorID Read xisError re MC Eead xisError 1 xisErrorId HC Read xisError ig void MC ReadAxisError LLDT REF AxisIn BOOL Enable Type MC ReadAxisError Reads the error information For an axis Results Vue ais Me a Igic Monia z o oe fe aa HERE e m Mac Local Vanabies 15 System vanables og D k Gert Sapte Error Sang VR Sun Home hu L e Kzengz Oe i Error Danse reefer Phe ao iz not operational because the sin not C red i m tthe va F1 hg ML R 5 Feet the late of Dur ax wing the MC Ree bumnekaun Bk p Position and Velocity i Coas Lomrnard St er QD mm Laenmaed Velocity DO meus i a Target Pusitian DI mm Taget Velocity DO messer e H L x ail AxisErrorlD error codes The following table describes the Axis error codes identified in the AxisErrorID for the MC ReadAxis Error
359. tablished If a connection to the target already exists the existing CIP connection is used If an EIP connection to the target does not exist an EIP connection is established prior to establishing a CIP connection If an EIP connection to the target does not exist an EIP connection is established If there is only one connection to the target the connection is closed If there is more than one connection to the target the connection is closed when the last message execution is completed When a CIP connection is closed any associated EIP connection is also closed If more than one CIP connection uses the same EIP connection the EIP connection will be closed after all associated CIP connections are closed The connection is not closed Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 185 Chapter 9 Communcation instructions Scenario Results Connection is not associated with an active message and The connection is closed remains idle for the amount of time specified in ConnTimeOut parameter Controller transitions from an executing mode Run Remote All active connections are forcibly closed Run Remote Test Single Scan and Remote Single Rung to a non executing mode CIP message timeout timers The following table describes how timers for CIPTARGETCFG timeout parameters UcmmTimeout and ConnMsgTimeout behave based on message requests and status Action Results Message is enabled UcmmTimeout timer is act
360. tarting with the far left slot 1 Sts Output UINT See PLUGIN READ status codes on page 383 ENO Output BOOL Enable out Applies only to LD programs PLUGIN RESET function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 385 Chapter 15 Input Cutput instructions Structured Text ST I SGIGLID i 1 2i PLUGIN RESET 1 ensble SlotID 3i output PLUGIN RESET 1 Sts PLUGIN RESET 1l void PLUGIN RESET 1 BOOL Enable UINT Sot Type PLUGIN RESET Reset a generic PLUGIN madulerhardware reset Results Variable Monitoring Hame Logical alue Physical Yalue Slat D ERU output N PLUGIN_AESET_1 386 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Inout Outout instructions Chapter 15 PLUGIN WRITE Parameter Enable SlotlD Offset DataLength DataArray Sts ENO PLUGIN_WRITE writes a block of data to any Plug in Generic Module hardware except 2080 MEMBAK RTC modules PLUGIN ju Enable slotID AddrOftset DataLength DataArray Arguments Parametertype Datatype Input Input Input Input Input Output Output BOOL UINT UINT UINT USINT UINT BOOL Description Function block enable When Enable TRUE execute Plug in write When Enable FALSE there is no data write operation Plug in slot number Slot ID 1 2 3 4 5 starting with the far left slot
361. te HC Movelbsolute 31 Error In D P NC Movelbsolute iff vor ME MoweAbsolite 1 AXIS REF Axisin BOOL Execute REAL Poston REAL Velocity REAL Acceleration REAL Deceleration REAL Jerk SINT Direction SENT Bulfermode Type MC MoyeAbsolute Commands a contraled motion ba speafied absolute potion Results 444 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Motion control instructions Chapter 17 Radwell Automation Publication 2080 AVOIBENE Mib 2014 445 Chapter 17 Motion control instructions MC MoveRelative Parameter EN AxisIn 446 MC MoveRelative commands a controlled motion of a specified distance relative to the actual position at the time of the execution Velocity Acceleration Deceleration Jerk BufferMode MC MoveRelative operation e Because the motion direction for a MC MoveRelative function block is determined by the current position and the target position the sign of the Velocity is ignored e The MoveRelative function block completes with Velocity zero if it is not aborted by another function block e Ifthe MC MoveRelative function block is issued when the Micro800 controller axis state is StandStill and the relative distance to move is zero the execution of the function block is immediately reported as Done e Fora Micro800 controller the sign of the input Velocity for a MC MoveRelative function block is ignored because the mot
362. ted User Interrupt s UIC Arguments Parameter Parameter Data Type Description Type Enable Input BOOL Function enable When Enable TRUE perform function When Enable FALSE do not perform function IRQType Input UDINT Use the STI defined words IRQ HSC3 IRQ_EIIO IRQ_HSC4 IRQ_EII1 IRQ_HSC5 IO HI IRQ STIO RU HI IRQ STI IO Ell4 IRQ_STI2 RU Hi IRQ STI3 IRQ_EII6 IRQ UFR IRQ_EII7 IRQ_UPMO IRQ_HSCO IRQ_UPM1 IRQ_HSC1 IRQ_UPM2 IRQ_HSC2 IRQ_UPM3 IRQ_UPM4 UIC Output BOOL Rung status same as Enable UIC function language examples Function block diagram 408 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Interrupt instructions Chapter 16 Ladder diagram Structure text 1 enable TRUE 2 IRQTyne 2 S output UIC enable IRQTynpe Results User Global Variables Micro250 Local Variables Prog3 System Varial Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 409 Chapter 16 Interrupt instructions UID UID disables selected user interrupt s Arguments Parameter Parameter Data Type Description Type Enable Input BOOL Function enable When Enable TRUE perform function When Enable FALSE do not perform function IRQType Input UDINT Use the STI defined words RQ HSC3 RQ Ell IRQ_HSC4 IRQ_EII1 IRQ_HSCG IRQ_EI2 IRQ_STIO IRQ_EII3 IRQ STI IRQ_Ell4 IRQ_STI2 RU Hi IRQ STI3 IRQ_EII6
363. ted time to complete the auto tuning and the auto tune reset HER bc 7 sss a 5 Set Initialize and AutoTune to True 546 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Proportional Integral Derivative PD instruction Chapter 20 No 6 Step Example Notice the Output changes to the value of Load when you set AutoTune to True emma de Se 2 Paro M M a3 Variable Monitoring YM H M M M Global Variables Miro85Q Local Venables IPID System Variables M LogicalValus prom 1 Observe the process value rises quickly until it gets closer to its saturation point Observe the stabilization of the process value and its fluctuation Set the deviation tarsterGan LS e My GainTranider i Radwell Automation Publication 2080 AVOIBENE Mib 2014 547 Chapter 20 Proportional Integral Derivative PD instruction No Step Example 10 Set Initialize to False T vueia i E Global Variables Man pt Local Variables IPID System Variables M 11 Controller starts auto tuning Wait for ATWarning to become 2 12 Set AutoTune to False 13 Observe the tuned values appear in OutGains 548 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Frooortional Integral Derivative PD instruction Chapter 20 No Step Example 14 Transfer parameter
364. teger value ROR on page 144 Rotate Right an integer value SHL on page 146 Shift Left an integer value SHR on page 148 Shift Right an integer value XOR MASK on page 150 Integer bit to bit Exclusive OR mask Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 135 Chapter 7 Binary instructione Integer bit to bit AND mask AND MASK Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute the Integer AND bit to bit mask computation When EN FALSE there is no computation IN Input DINT Must have integer format MSK Input DINT Must have integer format AND MASK Output DINT Bit to bit logical AND between IN and MSK ENO Output BOOL Enable out AND MASK function language examples Function block diagram Ladder diagram Structured text l1 m iem 2 mask Ze B 3 AndMask AND H isE in mask 136 Radwell Automation Publication 2080 RVDOTBENE Mach 2014Mach 2014 Binary instructions Chapter 7 AND MASE DINT AND MASK DINT IN CINT MSK Analog bit to bit AMD mask ST Equivalence parity AND MASK xvalue 1 1 if xvalue is odd result AND MASK 16 abc 16 f0f equals 16 a0c Results Variable Monitoring Radwell Automation Publication 2080 AVOIBENE Mib 2014 137 Chapter 7 Binary instructione Integer bit to bit negation mask NOT MASK inverts a parameter value Arguments Parameter Data Type Desc
365. ter 10 lur ep 252 EE 254 Greater thai orequal eene 255 Less GAG croi qu didt as eG GU Dad ha P tO Paddle ee 256 Less than egene 257 Notequalac ud REORUM MA RN UNS MURUS NE Dd 258 Radwell Automation Publication 2080 RVOOTBENE March 2014 Table of Contents Counter instructions Data conversion instructions Data manipulation instructions High Speed Counter HSC instructions Chapter 11 d re 260 adu b c 262 CIL ETIN E 264 Chapter 12 ANY TO MBO OL RENT 268 ANS 10 LS EE 269 ANY EON AEE EES 270 ANY TO DINE KEE 271 ANY TO Dorop 272 ANY TO INT EES 273 ANYCPOUEIN e tatit i ae e ake 274 See RESI onto mE LU C LR e 275 ANY TO LWORD cisscscsssssscsssssecsscssessscsscssscsscssscsscssssascsscsasceseeses 276 ANY TO RPA ENEE 277 ANY TO SEN EE 278 ANY TO STRING ciccccscsssssssssessessscssecsscsscssscsscsascsscssssascsscsascescenes 279 ANY e ID eU LSU AIL 280 EE 281 ANM DO UIN LUN e pesca C eec rt e 282 ANY TO ULINT vcccssssscssessscsscssecsscssessscssessscsscssscsscssssascsscsascaseenes 283 ANY TO _USINT Geister ieiunii eie itn 284 ANY EO WORD EE 285 Chapter 13 o a EN E E GE 288 COD onn d NEM MM EIE 290 COP operation status values eoe Eb RU 293 Copying tod dilterentdata EE 293 INDE 2050020019060 9000 20089000900 050008 0092 00020 oO OO eve E 6 A Den adu debet A 294 MAN qe CN 296 Chapter
366. tery is not low The read operation status See RTC Set Status values on page 397 RTC SET function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Input Output instructions Chapter 15 Structured Text ST i ETC SET i in enable data 2 present ETC SET 1 RTCPresent 3 enabled ETC SET 1 ETCEnabled a batlow ETC SET i RTCBatLow 5 sts zs BTC SET 1 3t5 RTc SET 1g void BIC SET 1 BOOL Enable BOOL RTCEnable RTC RTCData Type RTC SET Set RTC data to RTC module RTC Set status values The following table describes RTCSet values Status value Status description 0x00 Function block not enabled no operation 0x01 RTC set operation success 0x02 RTC set operation fails Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 397 Chapter 15 Inout Outout instructions SYS_INFO Parameter Enable Sts ENO 398 SYS_INFO reads the status data block d j P i bk i oul i e L L D LA d WE m e e Arguments Parametertype Datatype Description Input BOOL Function block enable When Enable TRUE execute function When Enable FALSE do not execute function Output SYSINFO System status data block See SYS INFO data type on page 399 Output BOOL Enable out Applies only to LD programs SYS INFO function block language examples Function Block Diagram FBD Structured
367. the Com queue See the table below for a detailed description of each the sequence Ladder Scan Communication Task End of Scan a a iu at ents pending and Ce from 10mg nat elapsed com task bw e Fase e e Message execution sequence general The following table describes the sequence of events identified in the preceding diagram No Description of events 1 The message is enabled If the Com queue is empty the buffer is allocated for the message and the message is added to the Com queue for transmission The Com queue size is 4 and each channel has a separate queue Radwell Automation Publication 2080 HVDOIBENE Mib 2014 211 Chapter 9 Communcation instructions No Description of events 2 Ifthe Com queue is full the message is added to the Wait Queue When the Com queue is empty the message in the Wait queue is added to the Com queue There is no size limit for the Wait Queue and each channel has a separate queue 3 The communication task executes the messages in the Com queue on every End of Scan for transmission Each channel s queue is processed one by one in a round robin fashion One message from each channel is executed and the process continues until all messages are executed or the communication schedule 10ms expires The channel next to the last processed channel is scheduled to appear first in the next End of Scan Message execution process Rung TRUE The fol
368. the execute input To modify any parameter change the input parameter s and trigger the motion again Note If an instance of a function block receives a new Execute before it finishes as a series of commands on the same instance the new Execute is ignored and the previously issued instruction continues with its execution With Enable The parameters are used with the rising edge of the enable input and can be modified continuously Missing input parameters Missing input is captured during User Application compilation There is no missing input error handling at the controller level Inputs exceeding application limits If a function block is commanded with parameters that result in a violation of application limits the instance of the function block generates an error In this case the Error output is flagged On and error information is indicated by the output ErrorlD The controller in most cases remains in Run mode and there is no Motion Error reported as a major controller fault Sign rules for inputs The Acceleration Deceleration and Jerk inputs are always positive values Velocity Position and Distance inputs can have positive and negative values Position versus Distance Position is a value defined within a coordinate system Distance is a relative measure related to technical units Distance is the difference between two positions Position Distance input Only linear motion is supported on Micro800 controllers For MC MoveA
369. there is an internal state machine error Possibly caused by an incompatibility between Controller FW version and RLCD FW version 4 User Display is not active 5 65535 Reserved KeyData bitfields table Bit No in Name Parameter Description KeyData 0 UKY TRUE Up key pressed 1 DKY TRUE Down key pressed 2 LKY TRUE Left key pressed 374 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 Bit No in Name KeyData 3 RKY 4 FIKY 5 F2KY 6 F3KY 7 FAKY 8 F5KY 9 F6KY 10 EKY 11 CKY 12 EKYL 13 CKYL 14 31 Input Output instructions Chapter 15 Parameter Description TRUE Right key pressed TRUE F1 key pressed TRUE F2 key pressed TRUE F3 key pressed TRUE F4 key pressed TRUE F5 key pressed TRUE F6 key pressed TRUE Enter key pressed TRUE Cancel key pressed TRUE Enter key pressed for more than 2 seconds TRUE Cancel key pressed for more than 2 seconds Reserved Radwell Automation Publication 20800 HVDOTBENE March nb 375 Chapter 15 Input Cutput instructions MM INFO checks Memory Module information When a Memory Module is not present all values return zero 0 MM INFO Arguments Parameter Parametertype Datatype Description Enable Input BOOL Function block enable When Enable TRUE read Memory Module header information When Enable FALSE there is no read operation and the output Memory Module information is invalid MMInfo Output
370. tion Inc with respect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of Rockwell Automation Inc is prohibited Throughout this manual when necessary we use notes to make you aware of safety considerations AN WARNING Identifies information about practices or circumstances that can cause an explosion in a hazardous environment which may lead to personal injury or death property damage or economic loss ATTENTION Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you identify a hazard avoid a hazard and recognize the consequence present BURN HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that surfaces may reach dangerous temperatures AN SHOCK HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that dangerous voltage may be Important Identifies information that is critical for successful application and understanding of the product Allen Bradley Rockwell Automation Logix5000 RSLogix 5000 Studio 5000 Connected Components Workbench ControlLogix GuardLogix CompactLogix Micro800 PowerFlex SoftLogix Rockwell Software PLC 2 PLC 3 PLC 5 SLC SLC 500 and TechConnect are trademarks of Rockwell Automatio
371. to 23h59m59s999ms Not R1 Integrated output Example XIN in sync with function block execution The following pictures show the effect of Scan Time Jitter on the XOUT value Scan Tima Jitter Ideal Sampling Cycle Time Actual Sampling FB Execution A 8 o M E GEO NEED 96 DO eee eee ee ee E Emo mw MO Number of Cycles Radwell Automation Publication 2080 HVDOIBENE Mib 2014 507 Chapter 18 Processcontro instructions V n Ideal Sarmphng e dp cM Cycle Tire A Difference in Aclual Sampling Ps Pp E Pele dl IFB Execution Berg a Actual i r il value XOUT a He T Y Axis d X Axi Number of Cycles Example XIN not in sync with function block execution The following pictures show an example in which an error is introduced in the XOUT value of an Integral function block 508 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Chapter 18 Processcontrol instructions Ideal Sampling Cycle Time Scar Time Actual Sampling FB Execution NIX Number of A AXI Cycles idan SOUT Ero im XOLUT ideal Sampling Cycle Time Actual Sarnpling FB Execulicn Se oe Number of zm mmm pm mm mm mm rm pm em mm mm mm mm mm m EE GEO mn e mm Oe em DD mm USD COGNO mm Pm pe 1 p APA 1nox SPNA Cycles INTEGRAL function block language exa
372. to True This action completes with velocity zero unless it is aborted Busy Output BOOL When TRUE the function block is not finished 442 Radvell Automation Publication 2080 AVOOIBEVE Mach 2014Verch 2014 Motion control instructions Chapter 17 Parameter Parameter Datatype Description type Active Output BOOL When TRUE indicates that the function block has control of the axis CommandAbort Output BOOL When TRUE the Command was aborted by another command or error stop ed Error Output BOOL When TRUE an error was detected ErrorlD Output UINT Error identification See also Motion control function block error IDs on page 424 MC MovehAbsolute function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOIBENE Mib 2014 443 Chapter 17 Motion control instructions Ladder Diagram LD Structured Text ST Position Absolute 50000 0 Velocity Absolute 500 0 Acceleration Absolute e 1000 Deceleration Absolute 1000 Jerk Absolute re 10 0 MC NoveAbsolute_1 Axisl Execute_Absolute Position Absolute Velocity_Absolute Acceleration Absolute Deceleration Absolute Jerk Absolute Direction Absolute Buftfertode Absolute Done Absolute NC_Movedbsolute_1 Done Busy Absolute MC MoveAbsolute 1 Busy Active Absolute MC HoveA bsolute 1 ctive CommandAbort Absolute MC HMoveAbsolute 1 CommandAborted Error Absolute HC HoveAbsolute 1 Error ErrorID Absolu
373. to a digital output This UDFB converts a manipulated value MV to a digital output DO so it can be used to control a digital input n DI Radwell Automation Publication 2080 HVDOIBENE Mib 2014 553 Chapter 20 Proportional Integral Derivative PD instruction Item Setpoint SP Process value PV Manipulated value MV 554 Converting a manipulated value to an analog output This UDFB converts a manipulated value MV to an analog output AO so it can be used to control an analog input AI JO P1 AO DO Example How to create an IPIDController program to control temperature The temperature control program maintains the temperature within the control Zone Setpoint process and manipulated values The following table defines how the SP PV and MV values are used in the temperature control program Description Measurement of temperature in degrees Celsius that defines the temperature for the control zone Must be converted to the same unit as the SP which is a measurement of degrees Celsius Must be converted to an analog value so it can be output to the PWM to control the heating element Radwell Automation Publication 2080 AVOIBENE Mib 2014 No oo OO Oe Item Controller output Frooortional Integral Derivative PD instruction Chapter 20 Temperature control system The following diagram shows the components in the temperature control system that are controlled by the temperature control
374. to be homed first Execute homing against the axis using MC_Home function block Warning The requested velocity for the axis has been adjusted to a lower value The function block executes successfully at a lower velocity Axis error scenarios In most cases when a movement function block instruction issued to an axis results in a function block error the axis is also flagged as being in an Error state and the corresponding ErrorID element is set on the AXIS_REF data for the axis However in the following situations an axis error may not always be flagged and it is still possible for the user application to issue a successful movement function block to the axis after the axis state changes Scenario Example A movement function block instructs an axis but the axis is in a state in which the The axis has no power or the axis is in a Homing function block cannot be executed properly sequence or in an Error Stop state A movement function block instructs an axis but the axis is still controlled by another The new function block commands the axis to change movement function block The axis cannot allow the motion to be controlled by the new motion direction function block without going to a full stop When one movement function block tries to control an axis but the axis is still controlled User Application issues an S Curve MC_MoveAbsolute by another movement function block and the newly defined motion profile cannot be function bloc
375. to wait for a reply for connected messages The connection closes when the timeout expires e Valid values 800 10 000 e Set to 0 to use the default value of 3000 e A value set to less than 800 will be set to 800 minimum e Avalue set to greater than 10 000 will be set to 10 000 maximum See also CIP message timeout timers on page 186 Connection closing behavior e TRUE Close the connection when the message completes e FALSE Do not close the connection when the message completed default e See also CIP EIP message connections on page 185 Target path for CIP messaging The target path for CIP messaging contains parameters which determine the path and destination of the of the CIP message Target path syntax The target path string parameter uses the following syntax e lt local port 1st target s address gt lt 1st target s local port 2nd target s address gt The 1st hop must be present the 2nd hop is optional Description Local port used to send out the message The port should be an active EtherNet IP or CIP Serial port USB ports are not supported Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 String element Description Ist Target address Target address of the 1st hop Gnmmuncation instructions Chapter 9 e For EIP specify the target s IP address The IP address should be a unicast address and should not be 0 multicast broadcast local address or a
376. tomation Publication 2080 AVOIBENE Mach 2014Vach 2014 Binay instructions Cancel Chapter 7 143 Chapter 7 Binary instructione ROR Parameter EN NbR ROR ENO 144 For 32 bit integers ROR rotates integer bits to the right Arguments Parameter Data Type Type Input BOOL Input DINT Input DINT Output DINT Output BOOL Description Function enable When EN TRUE execute the rotate bit right integer value computation When EN FALSE there is no computation Any integer value Number of 1 bit rotations in set 1 31 Right rotated value There is no effect if NbR lt 0 Enable out ROR function language examples Function block diagram Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 Binary instructions Chapter 7 Structured text i an se 1253s 2 nbr 2 5 rotation ROR in nbr ROR DINT ROR DINT IN DINT NER Rotate Right ST Equivalence result ROR register 1 register 2 0100_1101_0011_0101 result 241010 0110 1001 1010 Results ES Variable Monitoring Logical Yalue Physical Yalue 123 M 2 N A LETTER TOF SFA1794 Radwell Automation Publication 2080 AVOIBENE Mib 2014 145 Chapter 7 Binary instructione SHL Parameter EN NbS SHL ENO 146 For 32 bit integers SHL moves integers to the left and places 0 in the least significant bit Arguments Parameter Data Type T
377. tomation Publication 2080 AVOIBENE Mach 2014Vach 2014 557 Chapter 20 Proportional Integral Derivative PD instruction 4 ZU0mA Sequence of events in water supply level system The following table identifies the components in the water supply system and describes in sequence the events that occur in the system when the water supply level program runs No Item Description Controller output Sends the MV to the PowerFlex drive 0 10V PowerFlex drive Controls the water pump 0 50Hz Water pump Controls the water level in the supply tank Output transfer device Measures the height of the water supply level 4 20mA and sends the PV to the controller Controller input Receives the PV water supply level of 4 20m4A PLC program Converts the PV to the same unit as the SP measurement of height and determines the difference between the PV and SP and adjusts the MV according to the parameter values defined in the P and D parameters Go G OO e Example Function block diagram to control water supply level The following function block diagram shows the predefined and user defined function blocks for the program to control the water supply level 558 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Roportional Integral Derivative PD instruction Chapter 20 FB LL d Ln Su nam d OP H Ke IPIDCONTROLLER PID_Feedback FB EN FB RST FB IN FB PREVAL Function blocks and UDFBs used in the wat
378. tomation Publication 2080 HVDOTBENE Mib 2014 Input Output instructions Chapter 15 KEY_READ_REM function block language examples Function Block Diagram FBD Structured Text ST 1 KEY READ REM Enable H Lo Bj output KEY READ REM ENO Sts KEY READ REM Sts data KEY READ REM KeyData KEY READ REM 2l void KEY READ REM 2 BOOL Enable Type KEY READ REM Check key status on remote LCD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 373 Chapter 15 Inout Outout instructions KEY READ REM operation e KEY READ REM is supported for Micro820 controllers only e This function block can be used to check Key status on Remote LCD module when user display is active LCD REM instruction is used to make User Display Active When User display is not active KEY READ REM instruction flags an error e P BUTTON property in LCD Function File shall be activated otherwise all key status will be FALSE e Only single key presses are supported for the KEY READ REAM instruction two key press combinations are not supported KEY READ REM status codes Status code Description 0 Enable Input is False 1 Key data read successfully 2 Remote LCD not detected May occur when e Remote LCD is not physically connected to the controller or the wiring is incorrect e Serial port settings are other than what is required for the Remote LCD 3 Connection Error May occur when
379. tor 265 NOT operator 167 NOT MASK function 142 0 operators 1Gain 96 addition 74 AND 165 ANY TO BOOL 276 ANY TO BYTE 277 ANY TO DATE 278 ANY TO DINT 279 ANY TO DWORD 280 ANY TO INT 281 ANY TO LINT 282 ANY TO LREAL 283 ANY TO LWORD 284 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 615 Index ANY TO REAL 285 ANY TO SINT 286 ANY TO STRING 287 ANY TO TIME 288 ANY TO UDINT 289 ANY TO UINT 290 ANY TO ULINT 291 ANY TO USINT 292 ANY TO WORD 293 division 88 equal 258 greaterthan 260 greater than orequal 261 lessthan 262 less than orequal 264 MOV 96 multiplication 97 Neg 98 NOT 167 notequal 265 OR 164 subtraction 109 XOR 166 ORoperator 164 OR_MASK function 144 P parallel branches for LD diagrams 39 Parameter view accessing 41 accessingthe 41 parameters defining for Function Block Diagrams using the Parameter view 41 defining in LD using the Parameter view 41 for function blocks 19 PLUGIN_INFO function block 388 PLUGIN READ function block 391 PLUGIN RESET function block 394 PLUGIN WRITE function block 396 POW function 99 process control DERIVATE function block 512 HYSTER function block 514 INTEGRAL function block 516 IPIDCONTROLLER function block 547 LIMIT function 535 STACKINT function block 530 program control SUS function block 540 TND function 533 pulse falling edge negative coils 47 contacts 52 pulse rising edge positive coils 47 contacts 51 contactsinFBD 51 R_T
380. truction block to control the IPIDController instruction block Auto tune in first and second order systems Auto tune can be used in first order system which uses a single element or in a second order system which uses two independent elements Auto tune a first order system A first order system uses a single independent energy storage element Examples include e Cooling of a fluid tank with heat energy as the storage unit e Flow of fluid from a tank with potential energy as the storage unit e A motor with constant torque driving a disk flywheel with rotational kinetic energy as the storage unit e Anclectric RC lead network with capacitive storage energy as the storage unit In a first order system the function may be written in a standard form such as f t 1 dy dt y t Where Radwell Automation Publication 2080 AVOIBENE Mach 2014IVerch 2014 543 Chapter 20 Proportional Integral Derivative PD instruction Variable Example Cooling of a fluid tank using heat energy as the storage element t System time constant Is equal to RC Where R Thermal resistance of the walls of the tank C Thermal capacitance of the fluid f Forcing function Is the Ambient temperature y System state variable Is the Fluid temperature Auto tune in a second order system A second order system uses two independent energy storage elements that exchange stored energy Examples include e A motor driving a disk flywheel w
381. ts value through a power cycle The user program must set and clear the MV bit Underflow Mask HSCO MN Parameter Data format HSC modes User program access HSCO MN bit 229 read only The MN Underflow Mask control bit is used to enable allow or disable not allow an underflow interrupt from occurring If the bit is clear 0 and an Underflow Reached condition is detected by the HSC the HSC user interrupt is not executed The MN bit is controlled by the user program and retains its value through a power cycle The user program must set and clear the MN bit Radwell Automation Publication 2080 AVOIBENE March nb 2014 327 Chapter 14 High SpesdCauniier HED instructions High Preset Mask HSCO MH Parameter Data format HSC modes User program access HSCO MH bit 0 9 read only The MH High Preset Mask control bit is used to enable allow or disable not allow a high preset interrupt from occurring If this bit is clear 0 and a High Preset Reached condition is detected by the HSC the HSC user interrupt is not executed The MH bit is controlled by the user program and retains its value through a power cycle The user program must set and clear the MH bit Low Preset Mask HSCO ML Parameter Data format HSC modes User program access HSCO ML bit 2 49 read only The ML Low Preset Mask control bit is used to enable allow or disable not allow a low preset interrupt from occurring If this bit is clear 0 and a Lo
382. ublication 2080 AVOIBENE Mach 2014Verch 2014 Binary instructions Chapter 7 AOR MASE DINT XOR MASK DIMT IM DINT MSE Analog bit to bik Exclusive OR mask ST Equivalence crc32 XOR_MASK prevere nextc result XOR_MASK 16 012 164011 equals 16 003 Results Variable Monitoring Hame Logical alue Physical Y alue gf gf gf ck of Lo S KZ L BI KZ D b Del ee IS Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 151 Function MUX4B on page 174 MUX8B on page 170 TTABLE on page 166 Function block F TRIG on page 154 RS on page 158 R_TRIG on page 156 SR on page 164 Operator AND on page 161 NOT on page 163 XOR on page 162 OR on page 160 Chapter 8 Boolean instructions Boolean instructions determine a value output based on some logical calculation from inputs The module outputs can be directly controlled from the program or independently controlled by the module using the Boolean instructions Description Similar to MUX4 but can accept BOOL type input and output BOOL type value Similar to MUX8 but can accept BOOL type input and output BOOL type value Provides the value of the output according to the combination of inputs Description Falling edge detection Reset dominant bistable Rising edge detection Set dominant bistable Description Performs a boolean AND operation between two or more values For Boolean exp
383. ue of the specified parameter Radwell Automation Publication 2080 HVDOTBENE Mib 2014 Parameter MC ExecutionMode ENO Axis Done Busy Error ErrorlD Parameter type Input Output Output Output Output Output Output Data type SINT BOOL AXIS_REF BOOL BOOL BOOL UINT Motion contol instructions Chapter 17 Description Values are e 0 mclmmediately The functionality is immediately valid e 1 mcQueued The new functionality becomes valid when all previous motion commands set one of the following output parameters Done Aborted or Error the axis is not in a moving state implies that the output parameter Busy is set to FALSE Note When MC_ExecutionMode 0 for all parameters except Duty Cycle 1005 this FB can be completed successfully only when the axis state is Disabled or StandStill When MC_ExecutionMode 0 for Parameter Duty Cycle 1005 this FB can be completed successfully except the axis is in Homing or ErrorStop state For MC_ExecutionMode 1 this function block can be successfully completed only when the axis state is Disabled Standstill or the on going motion can complete ending with Standstill state Other input values are reserved currently and are considered as invalid parameters Enable out Applies only to LD programs Axis output is read only in LD programs See also AXIS_ REF data type on page 426 When TRUE the parameter
384. ues e 0 Default Large 8x16 1 Small 8x8 2 Large 8x16 e 3 Extra Large 16x16 e 4 onward Reserved Remote LCD Size is 192x64 pixels When large or extra large font is selected Remote LCD only displays Line1 to Line4 strings Line to Line 8 string inputs are ignored in this case Remote LCD can display maximum 24 characters per line when small or large font is selected For extra large fonts remote LCD can display maximum 12 characters per line String to be displayed on line 1 of the LCD Maximum 24 characters String to be displayed on line 2 of the LCD Maximum 24 characters String to be displayed on line 3 of the LCD Maximum 24 characters String to be displayed on line 4 of the LCD Maximum 24 characters String to be displayed on line 5 of the LCD Maximum 24 characters String to be displayed on line 6 of the LCD Maximum 24 characters String to be displayed on line 7 of the LCD Maximum 24 characters String to be displayed on line 8 of the LCD Maximum 24 characters Function block enable When Enable TRUE user display is active When Enable FALSE IO Status Menu display is active Status of the remote LCD operation SeeLCD_REM status codes see LCD REM status codes on page 356 LCD_REM function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 353 Chapter 15 Input Cutput instructions LCD REM 1 sts Lad
385. ues for output OutGains to input Gains Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 541 Chapter 20 542 Proportional Integral Derivative PD instruction To finalize tuning To finalize the tuning some fine tuning may be needed depending on the processes and needs When setting TimeDerivative to 0 0 the IPIDController forces DerivativeGain to 1 0 then works as a PI controller Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Using the Proportional Integral Derivative instruction Roportional Integral Derivative PD instruction Chapter 20 This section provides specific details and examples for using the proportional integral derivative instruction including the following Using auto tune with the IPIDController function block You can use the AutoTune parameter of the IPIDController function block to implement auto tuning in the control program Auto tuning requirements and recommendations F ollowing is a summary of requirements and recommendations for implementing successful auto tuning e Autotuning must cause the output of the control loop to oscillate which means the IPIDController must be called frequently enough to adequately sample the oscillation e TheIPIDController instruction block must be executed at a relatively constant time interval e Configure the scan time of the program to be than half of the oscillation period e Consider using a Structured Text Interrupt STI ins
386. uncates Real values leaving just the integer Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 65 Chapter 5 Arithmetic instructions ABS yields the absolute positive value of a Real value ABS Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current absolute computation When EN FALSE there is no computation IN Input REAL Any signed Real value ENO Output BOOL Enable out ABS Output REAL Absolute value always positive ABS function language examples Function block diagram Ladder diagram Structured text diagram d value 1 0 2 AhsValue ABS valuej ABS REAL ABS REAL IM Absolute value ST Equivalence over ABS delta gt range 66 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Arithmetic instructions Chapter 5 Results Variable Monitoring T gt T gt T gt Naa WR Hame Logical Value Physical Value 1 0 M VS m n Radwell Automation Publication 2080 HVDOIBENE Mib 2014 67 Chapter 5 Arithmetic instructions ACOS yields the Arc Cosine of a Real value Input and output values are in ACOS radians Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE execute current arc cosine computation When EN FALSE there is no computation IN Input REAL Must be in set 1 0 1 0 ENO Output BO
387. unction enable When Enable TRUE perform the function When Enable FALSE do not perform the function TND Output BOOL If true function performed Note When variable monitoring is on the monitoring variable s value is assigned to the block s output When variable monitoring is off the output variables value is assigned to the block s output TND function language examples Function block diagram Ladder diagram Structured text TRUE THD enable i enable 2i output THD BOOL TNOEEOOL Enable Abort current user program scan 522 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 Processcontrol instructions Chapter 18 ST Equivalence TESTOUTPUT TND TESTENABLE Results Variable Monitoring Global Variables Micro Local Vanables FA amp _TND_ST Sustem Var 4 Hame Logical v alue PhysicalValue Lock d ge ge get c gt I E enable f MA output ri N A Radwell Automation Publication 2080 HVDOIBENE Mib 2014 523 Chapter 18 LIMIT 524 Prooessaonttrol instructions Parameter EN MIN MAX LIMIT ENO LIMIT restricts integer values to a given interval Integer values between the minimum and maximum are unchanged Integer values greater than the maximum are replaced with the maximum value Integer values less than the minimum are replaced with the minimum value Arguments ParameterType DataType Description Input BOOL Function ena
388. unter The accumulator is immediately cleared 0 when it reaches the high preset A low preset cannot be defined in this mode 1 Up counter with external reset and hold The accumulator is immediately cleared 0 when it reaches the high preset A low preset cannot be defined in this mode 2 Counter with external direction 3 Counter with external direction reset and hold 4 Two input counter up and down 5 Two input counter up and down with external reset and hold 6 Quadrature counter phased inputs A and B 7 Quadrature counter phased inputs A and B with external reset and hold 8 Quadrature X4 counter phased inputs A and B 9 Quadrature X4 counter phased inputs A and B with external reset and hold For additional information on HSC operating modes and input assignments see HSC Inputs and Wiring Mapping in the Micro830 and Micro850 Programmable Controllers User Manual 1 Inthe Help menu click User Manuals expand Controllers and then the controller category 2 Double click the controller user manual in the controller category to open a pdf of the manual Accumulator Parameter Data type User program access HSCApp Accumulator DINT read write Sets the initial accumulator value when the High Speed Counter starts When the HSC is in Counting mode the Accumulator is automatically updated by the HSC sub system to reflect the actual HSC accumulator value HPSetting Parameter Data type User program access H
389. ut Input Output Output Data Type BOOL STRING DINT STRING BOOL Description Function enable When EN TRUE yield number of characters from left side of string When EN FALSE no operation Any non empty string Number of characters to be extracted This number cannot be greater than the length of the IN string Left part of the IN string its length NbC Can be e empty string if NbC 0 e complete IN string if NbC gt IN string length Enable out LEFT function language examples Function block diagram Ladder diagram Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulation instructions Chapter 22 Structured text I number 3 2 output LEET in number LEFT STRING LEFT STRIMG IM DINT NBC Extract left of a string ST Equivalence complete string RIGHT 12345678 4 LEFT 112345678 4 5 complete string is 56781234 the value issued from RIGHT call is 5678 the value issued from LEFT call is 1234 Results ES Variable Monitoring Global Variables Micro Local Variables FAS_LEFT_LO Systema 4 Hame Logical Value Physical Value Lock E og Tog get c gt I abcdef AYA si number N A Dl 3 A PSP ES NENNEN NE cl Cancel Radwell Automation Publication 2080 HVDOIBENE Mib 2014 579 Chapter 22 Stringmentoulation instructions MID Parameter EN NbC Pos MID ENO 580 Using the po
390. ute until it is no longer busy Function blocks with different instances can abort the currently executing function block The CommandAborted output is set when a commanded motion is interrupted by another motion command The reset behavior of CommandAborted output is similar to Done output When CommandAborted occurs other output signals such as InVelocity are reset Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 419 Chapter 17 Motion control instructions Rule applies to Output Active Enable and Valid status Output error handling Naming conventions ENUM types 420 Rule The Active output is required on buffered function blocks and is set at the moment the function block takes control of the motion of the according axis For unbuffered mode the Active and Busy outputs can have the same value The Enable input is coupled to a Valid output Enable is level sensitive and Valid shows that a valid set of outputs is available at the function block The Valid output is TRUE as long as a valid output value is available and the Enable input is TRUE The relevant output value can be refreshed as long as the input Enable is TRUE If there is a function block error the output is not valid Valid set to FALSE When the error condition disappears the values reappear and Valid output is set again Outputs used to define errors All blocks have the following two outputs that are used for errors that occur durin
391. very time the space bar is pressed the type changes from direct to reverse to set to reset to pulse rising edge to pulse falling edge Direct Coil A direct coil supports a Boolean output of a connection line Boolean state LU N Left Right connection connection The associated variable is assigned with the Boolean state of the left connection The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be an output or it must be user defined Example Direct coil Reverse Coil A reverse coil element supports a Boolean output according to the Boolean negation ofa connection line state Left Right connection connection The associated variable is assigned with the Boolean negation of the state of the left connection The state of the left connection is propagated into the right connection The right connection must be connected to the right vertical power Radwell Automation Publication 2080 AVOIBENE Mach nb 2014 45 Chapter 3 46 Lader Diagram D elements rail unless you have parallel coils where only the upper coil must be connected to the right vertical power rail The associated Boolean variable must be output or it must be user defined Example Reverse Coil Pulse Fallin
392. vice 6 1 Through Port 6 Micro830 UPM Serial port reach the Node at 1 4 192 168 1 100 Through Port 4 Micro850 embedded Ethernet port reach the Node at 192 168 1 100 4 192 168 1 100 1 0 Through Port 4 Micro850 embedded Ethernet port reach the Node at 192 168 0 100 Logix ENET module From ENET module through the Backplane port Port 1 reach the Logix controller at Slot 0 Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 195 Communtcation instructions CIP EIP message connections A maximum of 16 CIP class 3 and 16 EIP connections are supported for client message execution The following table describes the CIP EIP connection behavior Scenario Message request is enabled and CipConnMode 1 Message request is enabled CipConnMode 1 and the message s local port is Ethernet Message request is enabled CipconnMode 0 and the message s local port is Ethernet Message execution is completed and ConnClose is set to True Message execution is completed and ConnClose is set to False Connection is not associated with an active message and remains idle for the amount of time specified in ConnTimeOut parameter Controller transitions from an executing mode Run Remote Run Remote Test Single Scan and Remote Single Rung to a non executing mode Results If a connection to the target does not exist a CIP connection is established If a connection to the target already exists the exist
393. vice Class Instance Attribute Ethernet IP objectdata Description Initial value option Service code Implement for class Yes 14 Implement for Instance Yes OxOE in hexadecimal Get attribute single Class code EtherNet IP object class Identity object 01 Instances 22 COMM E 01 Instance attribute Get product name and rating as SHORT 07 STRING Add a MSG CIPGENERIC function block and variables Follow these steps to start a project add a MSG_CIPGENERIC function block to a ladder diagram program and then add input variables to the function block Add aMSG_CIPGENERIC function block l Add a controller e Expand the Controllers folder and the Micro850 folder to view all Micro850 controllers e Double click a controller 2080 LC50 48QVB to add it to the Project Organizer 2 Addaladder diagram program Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 CGommunication instructions Chapter 9 e Inthe Project Organizer right click Programs click Add and then click New LD Ladder Diagram e Right click the ladder diagram icon in the Project Organizer click Rename and type CIPExplicitMessage e Double click the ladder diagram program in the Project Organizer to display the LD POU in the language editor 3 Add the MSG CIPGENERIC function block e Inthe Toolbox select Block and drag and drop it onto the ladder rung to display the Block Selector e In Search type MSG to display t
394. w Preset Reached condition is detected by che HSC the HSC user interrupt is not executed The ML bit is controlled by the user program and retains its value through a power cycle The user program must set and clear the ML bit Configuring a Programmable Limit Switch PLS The high speed counter has additional operating modes for implementing a Programmable Limit Switch PLS The PLS function is used to configure the High Speed Counter to operate as a PLS or as a rotary cam switch The PLS function supports up to 255 pairs of high and low presets and can be used when you need more than one pair of high and low presets Enabling PLS in the HSC The PLS mode only operates in tandem with the HSC of the Micro800 controller and must be enabled in the HSC by setting the HSCAppData PLSEnable parameter to True HSC operation when PLS is enabled The PLS function can operate with all other HSC capabilities including the ability to select which HSC events generate a user interrupt When the PLS function is enabled and the controller is in run mode the HSC counts incoming pulses and the following events occur 328 Radwell Automation Publication 2080 HVDOIBENE Mib 2014 High SosediCounter HD instructions Chapter 14 e When the count reaches the first preset HSCHP or HSCLP defined in the PLS data the output source data HSCHPOutput or HSCLPOutput is written through the HSC mask HSCAPP OutputMask e At that point the next presets
395. well Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 231 Chapter 9 Communication instructions MicroB50 Program Major Faut M8540 ControlerB 48QBB Run Controller Mode Connec Desce T Dewnicsd Upload Sew Dex B PS o d dy dy Gh Bu dh Wir da 4i En Ex e Eur T T a Bai d de omm Li i a Ethermet nieme Protool Crece al a Mismo i 7 tamai Protocol IP Settee Seny Port USB Port Obtain P address aviomabcally wing DIHCP Ethernet Configure IP address and setting Internet Preteco E Port Settings F Address 192 158 1 15 Port Diagnostics Subnet Mask 75 25 25 0 Date end Time Interrupts Gateway Address 197 168 1 J Startup Faults Modbus Mapping Embedded LE d Detect duplicate IP address Bhairon e Paw Ba ee tt ng Te i peti des Plug In Modules Example How to create a MSG_CIPSYMBOLIC messaging program to write a value to a variable This example shows you how to create a message program to write a value toa Controller B global variable from Controller A 232 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Communtation instructions Chapter 9 Controller A Catalog sirat P Address Ethemet Subnet Mask Switch Gateway Address Value write fo B 9785654321 Global vanable UDINT_ From Controller B Catalog 2080 LC50 480 88 P Address 192 168 1 19 subnet Mask 22 222 222 0 Galeway Address 192 168 1 1 Creating a MSG_CIPSYMBOLIC messaging
396. wing figure 334 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 High SosediCounter HEC instructions Chapter 14 e Inthe Initial Value field enter the value e See HSCAPP data type on page 303 for more information on the description for each value du gt r m l 1 MHy5ppData My AppData PlsEnable My Dose Hecht MyAppDara HseMede L My AppData Accumulator My AppD ata Hetto My ppData LPSekting Py pnDatra OF Setting My ppD ata UF Setting My AppDate OutputMask My AppData HPOutput My AppData LPOutput Plyler mami m MyInFo HsCSTS i MyPLS PLS ES ITySscate 4 Assign the HSC command value e Inthe Initial Value field for the MyCommand variable type 1 e See HSCCmd values on page 302 for more information on command values Assign variables and build the program After you enter values in the HSC variables follow these steps to assign the variables to the function block and build the program Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 335 Chapter 14 High SpesdCaunter HED instructions 1 From the ladder diagram assign each variable to its HSC function block element as shown in the following figure 2 From the Project Organizer click the controller to display the controller tree Controller General gt Memery SerialPort USE Fort Date and Time Inberiupts Startup Faults Mo
397. within strings INSERT Arguments Parameter Parameter Type Data Type Description EN Input BOOL Function enable When EN TRUE insert sub strings in a string When EN FALSE no operation IN Input STRING Initial string Str Input STRING String to be inserted Pos Input DINT Position of the insertion the insertion is done before the position first valid position is 1 INSERT Output STRING Modified string Can be e empty string if Pos 0 e concatenation of both strings if Pos is greater than the length of the IN string ENO Output BOOL Enable out INSERT function language examples Function block diagram 576 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 String menioulation instructions Chapter 22 Ladder diagram Structured text iE Position 3 zr ModifiedString re INSERT InitialString Insertedstring Position INSERTE STRING INSERT STRIMG IM STRING Str DINT Pos Insert string ST Equivalence MyName INSERT Mr JONES Frank 4 MyName is Mr Frank JONES Results GS Variable Monitoring InitialString lnsertedString Position Modifieds tring abefgcd Cancel Radwell Automation Publication 2080 AVOIBENE Mib 2014 577 Chapter 22 Stringmentoulation instructions LEFT Parameter EN Nbc LEFT ENO 578 From the left end of strings LEFT yields the number of characters defined Arguments Parameter Type Input Inp
398. wn triangle rather than the scroll bar to view additional rungs Branch Branches create alternative routing for connections You can add parallel branches to elements on a rung Add a branch From the Toolbox drag the branch element onto an existing element within the language editor Example Branches LD Program POU x Add a label to a rung Every rung in the language editor has an area to the left of the rung for entering a label name Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 39 Chapter 3 40 Lackr Diagram D elements Label name requirements Labels can be an unlimited number of characters beginning with a letter or underscore character followed by letters numbers and underscore characters Labels cannot have spaces or special characters for example or V To add a label for a rung e Click the area to the left of the rung then type a label name Example Label L Block LD A LD block element is a functional element in a LD diagram that can be a function block a function a user defined function block or an operator LD instruction blocks The Connected Components Workbench instruction set includes IEC 61131 3 compliant instruction blocks Instruction blocks collectively include operators functions and function blocks Add a Block to an LD program Use the LD Toolbox to add a Block to an LD program After you add the Block you c
399. x e Double click Direct Contact to add it to the rung or e Dragand drop a Direct Contact onto the rung 6 Assigna variable to the direct contact Radwell Automation Publication 2080 HVDOIBENE March 2014Vach 2014 331 Chapter 14 High SpesdCaunter HED instructions e Double click on the direct contact to display the Variable Selector and then click the I O Micro830 tab e Click IO EM DI OS and then click OK to assign the direct contact to input 5 B Variable Selector Hama Type Global Scope L 0 EH DI 5 BOOL w Micra830 User Global Vasiahles MicicBO0 Local Variables N A System Variables Mengt VO West Mami Data ppi Lhimension a BOOL g gt at ID EM DD 17 BODL ID EM DO 18 BODL IDEM DOIS BODL S JO EM Di B BODL 7 Inthe Toolbox select a function block and drag it to the right of the direct contact as shown in the following image 8 Double click the function block to display the Block Selector 9 Inthe Block Selector select HSC and click OK Tip Type HSC in Search to display all HSC function blocks 10 Verify the ladder rung looks similar to the following figure 332 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 High GosediCounter HY instructions Chapter 14 30 EM Di E E EE Ae HiscStslrio P panas 11 In the Project Organizer double click Local Variables to display the Variables page 12
400. xamples Function block diagram 414 Radwell Automation Publication 2080 AVOIBENE Mib 2014 Interrupt instructions Chapter 16 Ladder diagram Structured text 1 enable TRUE 2i IRQTvpe 2 cE output DIF enable IRQTypel BOOL UIF BOOL Enable UDINT IRQT ype Flush specific user interrupt ST Equivalence TESTOUTPUT UIF TESTENABLE 2 Results ial Variable Monitoring Sel Global Variables Microg30 Local Variables R UIF ST vstem Varie Hame Logical v alue PhysicalValue Lock E T Ka gt Ka gt T gt enable ri MA 1 BI IRGTvpe MAA Ul output CU Fo bt Cancel Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 415 Chapter 17 Motion control instructions Connected Components Workbench 2 0 and later includes a set of instructions for programming and designing the motion of a particular axis using motion control function blocks Function block Administrative MC AbortTrigger on page 429 MC Power on page 455 MC ReadAxisError on page 460 MC ReadBoolParameter on page 465 MC ReadParameter on page 468 MC ReadStatus on page 471 MC Reset on page 476 MC SetPosition on page 479 MC TouchProbe on page 487 MC WriteBoolParameter on page 492 MC WriteParameter on page 496 Motion MC Halt on page 432 MC Home on page 436 MC MoveAbsolute on page 441 MC MoveRelative on page 446 MC MoveVelocity on page 45
401. xecure SerPosition Position SecPosition Relative SecPosition MC ExecurionMode SerPosition bone SetPosition Hc SertPosition 1l Done Busy setPosition i MC SetPosition 1 Busy Error SetPosition re HC SetPasition 1 Error ErrorID SetPosition re H SetPosition 1 ErrorID MC SetPosition il vod MC_SetPosition_I AXIS_REF Axisin BOOL Execute REAL Postion BOOL Relative SINT MC _FxecutionMode Type MC SetPosisan Shifts tha coordinate system af an avis by manipulating the actual postion of the axis with the seme value without any movement caused Results Radwell Automation Publication 2080 HVDOIBENE Mib 2014 481 Chapter 17 Motion control instructions Miere it Axis Monito Position and Velocity Command Pesrhon Target Pastam 482 Radwell Automation Publication 2080 AVOIBENE Mach 2014Verch 2014 MC Stop Parameter EN AxisIn Execute Mbtion contro instructions Chapter 17 MC_Stop commands a controlled motion stop and transfers the axis state to Stopping Any ongoing function block execution is aborted All function block move commands are ignored until the axis state transitions to StandStill MC_Stop operation e As longas the Execute input is high the axis remains in the Stopping state While the axis is in the Stopping state no other motion function block can perform any motion on the same axis e If Deceleration equals zero the MC Stop function block paramete
402. y current backlight settings When Enable FALSE REM LCD BKLT will be disabled Color Input UINT Backlight Color Code e 0 White e 1 Blue e 2 Red e 3 Green e 4 65535 Reserved Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 349 Chapter 15 Input Cutput instructions Parameter Parameter Datatype Description type Mode Input UINT e 0 Permanently OFF e 1 Permanently ON e 2 Flash 1 sec interval e 3 65535 Reserved LCD BKLT REM Output BOOL When TRUE Instruction executed successfully When FALSE Error occurred during instruction execution Sts Output UINT Status of the remote LCD operation See LCD_BKLT_REM status codes on page 351 LCD BKLT REM function block language examples Function Block Diagram FBD enable LCD BKLT L BOOL color sts L LINT mode LINT enable led bklt color sts a mode LC REM Structured Text ST 350 Radwell Automation Publication 2080 HVDOTBENE Mib 2014 at 31 cd rem Inout Outout instructions Chapter 15 LCD BELT REM 1 EN Enable Color Mode output LCD BKLT REM 1 ENO LCD BELT REM 1 LCD BKLT REM 1 LCD BELT REM LCD REM 1 8ts CD BELT REM AR void LCD BKLT REM A BOOL Enable UIMT Color UIMT Mode Type LCD BKLT REM Set the remote LCD backlight parameters LCD BKLT REM status codes Status code 0 1 2 6 65535 Description Enable input is false Success Remote LCD not detected May occur when e Remote LCD
403. y stops and the velocity comes to 0 422 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Verch 2014 Motion control instructions Chapter 17 Motion control function block parameter numbers The following function blocks use specific parameter numbers when the function blocks are programmed e MC ReadParameter e MC ReadBoolParameter e MC WriteParameter e MC WriteBoolParameter Parameter number identification Parameter numbers between 0 and 999 are reserved for standard parameters Extensions by a supplier or user are also allowed although using them can affect portability between different platforms If the parameter number is greater than 999 the parameter is supplier specific Parameter Parameter Name Datatype R W Description number 1 Commanded Position REAL R Commanded position Radwell Automation Publication 2080 AVOIBENE Mib 2014 423 Chapter 17 Motion control instructions Parameter Parameter Name Datatype R W Description number 2 SWLimitPos REAL R W Positive software limit switch position 3 SWLimitNeg REAL R W Negative software limit switch position 4 EnableLimitPos BOOL R W Enable positive software limit switch 5 EnableLimitNeg BOOL R W Enable negative software limit switch 8 MaxVelocitySystem REAL R Maximal allowed velocity of the axis in the motion system 9 MaxVelocityAppl REAL R W Maximal allowed velocity of the axis in the application 11 CommandedVelocity REAL R Commanded velocity 12 MaxAcce
404. y the controller and is set and cleared automatically User Interrupt Lost HSCO LS Parameter Data format HSC modes User program access HSCO LS bit 0 9 read only Radwell Automation Publication 2080 AVOIBENE Mib 2014 High SosediCounter HD instructions Chapter 14 The LS User Interrupt Lost is a status flag that indicates an interrupt has been lost The controller can process 1 active user interrupt condition and maintain 1 pending user interrupt condition before it sets the lost bit The LS bit is set by the controller It is up to the control program to use and monitor a lost condition HSC Interrupt parameters The HSC interrupt parameters are used to configure the start and mask options Auto Start HSCO AS Parameter Data format HSC modes User program access HSCO AS bit 0 9 read only Auto Start is configured with the programming device and stored as part of the user program The auto start bit defines if the HSC interrupt function automatically starts whenever the controller enters any run or test mode Overflow Mask HSCO MV Parameter Data format HSC modes User program access HSCO MV bit 0 9 read only The MV Overflow Mask control bit is used to enable allow or disable not allow an overflow interrupt from occurring If the bit is clear 0 and an Overflow Reached condition is detected by the HSC the HSC user interrupt is not executed The MV bit is controlled by the user program and retains i
405. ype Input BOOL Input DINT Input DINT Output DINT Output BOOL Description Function enable When EN TRUE move integers to the left When EN FALSE there is no integer movement Any integer value Number of 1 bit shifts in set 1 31 Left shifted value There is no effect if NbS lt 0 If a value of 0 replaces the least significant bit Enable out SHL function language examples Function block diagram Radwell Automation Publication 2080 AVOIBENE Mib 2014 Binary instructions Chapter 7 Ladder diagram Structured text 1 in 123 2i nbs 2 3 output SHL in nba DINT SHL DINT IM DINT MoS Shift Left ST Equivalence result SHL register 1 register 2 0100_1101_0011_0101 result 241001 1010 0110 1010 Results Variable Monitoring N A AAA output Cancel Radwell Automation Publication 2080 AVOIBENE Mach 2014Vach 2014 147 Chapter 7 Binary instructione For 32 bit integers SHR moves integers to the right and places 0 in the most SHR significant bit Arguments Parameter Parameter Data Type Description Type EN Input BOOL Function enable When EN TRUE move integers to the right When EN FALSE there is no integer movement IN Input DINT Any integer value NbS Input DINT Number of 1 bit shifts in set 1 31 SHR Output DINT Right shifted value There is no effect if NbS lt 0 If a value of 0 replaces the most
406. zero 0 Arguments Parameter Datatype Description type Input BOOL Function block enable When Enable TRUE execute RTC information read When Enable FALSE there is no read operation and output RTC data is invalid Output RIC RTC data information yy mm dd hh mm ss week See RTC data type on page 394 Output BOOL TRUE RTC hardware is plugged in FALSE RTC hardware is not plugged in Output BOOL TRUE RTC hardware is enabled timing FALSE RTC hardware is disabled not timing Output BOOL TRUE RTC battery is low FALSE RTC battery is not low Output BOOL Enable out Applies only to LD programs RTC READ function block language examples Function Block Diagram FBD Radwell Automation Publication 2080 HVDOTBENE March 2014Vach 2014 393 Chapter 15 Inout Outout instructions Ladder Diagram LD Structured Text 1 RTC READ ifenable a data re RTC READ 1 RTCData d present RTC READ 1 RTCPresent di enabled ETC READ 1 ETCEnabled 5 batlow ETC READ 1 RTCBatLaow RTC READ 1f void RTL READ 1 BOOL Enable Type RTC READ Read RTC module information RTC data type The following table describes the RTC data type Parameter Datatype Description Year UINT The year setting for the RTC 16 bit value and the valid range is from 2000 Jan 01 00 00 00 to 2098 Dec 31 23 59 59 394 Radwell Automation Publication 2080 HVDOIBENE Mach 2014Vach 2014 Parameter Month

Download Pdf Manuals

image

Related Search

Related Contents

manual de uso pistola mini de gravedad clave: nf4005  ProMtrac Cooling Tower Water Treatment Controller  SH100 SELF`IT - Mr Handsfree  LTECH LTECH  Shure VP User's Manual  Snap-On 870010 User's Manual  PD 2G 18.0 DD 2G 18.0 ID 1/4" 18.0  Greenlee G3 User's Manual  Guida per l`utente  

Copyright © All rights reserved.
Failed to retrieve file