Home

DL405 IBox Instructions PLC User Manual

image

Contents

1. 204 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs INCBYBCD Example In this example the INCBYBCD instruction will add the BCD value K9999 to the binary value in V2106 on every scan that CO is ON Increment by BCD co INCBYBCD IB 524 Increment WORD BCD V2106 By WORD BCD K9999 DL405 PLC User Manual Supplement Box Instructions Rev B 205 DirectSOFT IBox Instructions for DL405 PLCs eee Increment By BCD Double INCBYBCDD IB 525 DS6 cod The Increment By BCD Double IBox will add o ONLY the By DWORD BCD Value to the Increment by BCD Double HPP N A Increment DWORD BCD Value on each INCBYBCDD 1B 525 scan the instruction is enabled Increment DWORD BCD By DWORD BCD INCBYBCDD Parameters Increment DWORD BCD The V Memory location where the 32 bit BCD value is located By DWORD BCD The DWORD BCD value to add Parameter DL405 Range All V Memory KO 99999999 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP66 On when the 16 bit addition instruction results in a carry SP67 On when the 32 bit addition instruction results in a carry SP70 On anytime the value in the accumulator is negative SP73 On when a signed addition or subtraction results in an incorrect sign bit SP75 On when a BCD i
2. Note that the Pulse Time parameter is ignored by some Entry Types The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRADPT Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Output specifies a CTRIO output to be used by the instruction Entry Type specifies the Entry Type to be added to the end of a Preset Table Pulse Time specifies a pulse time for the Pulse On and Pulse Off Entry Types Preset Count specifies an initial count value to begin at after Reset Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully Parameter DL405 Range K0 255 K0 3 K0 5 See DL405 V memory map Data Words K0 65535 See DL405 V memory map Data Words K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map 120 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs RRR CTRADPT Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate
3. Write attempt to an invalid analog channel Data not valid Subnet mask or IP address not allowed Likely because the data packet is not constructed properly Analog input channel error Unused analog input channels exist Broken Transmitter on one of the analog input channels Channel Failure Communications failure HA EDRV2 onboard relay has tripped Terminator 1 0 Slave only Hot Swap The module which was in this slot is no longer responding most likely because the user has manually removed an 1 0 module 154 Terminator 1 0 Slave only Hot Swap 1 0 configuration has changed most likely because the user has manually added an 1 0 module 155 Terminator 1 0 Slave only Module Error One or more of the 1 0 modules has an error 200 216 Unused analog input channels exist at channel xx 1 16 where xx Value 200 For example 212 indicates unused analog channel exists at channel 12 DL405 PLC User Manual Supplement Box Instructions Rev B 22 1 DirectSOFT IBox Instructions for DL405 PLCs Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute ERM Read Slave Error Codes ERMSLAVE ERM Workspace Success Error Slave Number Of Slots Error Code Buffer V417 V425 With each execution this instruction wil
4. DL405 PLC User Manual Supplement Box Instructions Rev B 2 17 DirectSOFT IBox Instructions for DL405 PLCs eee ERM Read Slave Error Codes ERMSLAVE IB 751 The ERM Read Slave Error Codes IBox will DS6 ONLY Used HPP N A read the error information from a Slave that is part of an ERM network Each Slave will PAN Road Siae Eror Ennes return 4 Words of data plus 1 Word for each ERMSLAVE IB 751 I O slot in that slave s base A maximum of ERM K1 36 words of error code data can be read Workspace from a single slave depending on the Success C3 number of bases and I O modules slots Error C4 g used per slave Slave K1 The program will need a separate ERM Number Of Slots K3 Read Slave Error Codes for each slave on the Error Code Buffer ERM network This IBox references the ERM of the ERM Config IBox that is controlling the ERM or ERM100 module in a specific slot The ERM Config contains built in interlocking logic that is used to synchronize the processing of this IBox with all of the other IBoxes in the ladder program that are being processed by the same ERM or ERM100 module ERMSLAVE Parameters e ERM A reference number or resource number used to uniquely identify the ERM network Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Read Error Code succeeds and OF
5. E Frequency 400 11 Greater Than Ch1 Fn2 ae ane 02 Less Than Ch2 Fn1 Duty Cycle 12 Greater Than Ch2 Fnl poaten waon Workspace 03 Less Than Ch2 Fn2 Success 13 Greater Than Ch2 Fn2 EDT co This IBox will take more than 1 PLC scan to execute on when the command is complete If the Error Bit is on you can use the CTRIO Read Either the Success or Error bit will turn Error Code CTRRDER IBox to get extended error information The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRRTPM Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Frequency specifies the output pulse rate 20Hz 20KHz Duty Cycle specifies the 96 of on time versus off time This is a hex number Default of 0 is 5096 also entering 50 will yield 5096 5096 duty cycle is defined as on half the time and off half the time Position specifies the count value as measured on the encoder input at which the output pulse train will be turned off Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully 150 DL405 PLC User Manual Supplement
6. ECDHCPD Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS 5 csse cea X Y C GX GY B See DL405 V memory map ENOT 22 2220 iE Iva edes X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nn RRR ECDHCPD Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other E
7. Push On Push Off Circuit PONOFF IB 300 Discrete Input C10 Discrete Output C20 Internal State C100 DL405 PLC User Manual Supplement Box Instructions Rev B 29 DirectSOFT IBox Instructions for DL405 PLCs Move Single Word MOVEW IB 200 DS5 6 Used Move Single Word moves copies a word to HPP N A MOVEW Parameters From WORD specifies the word that will be moved to another location To WORD specifies the location where the From WORD will be moved to Parameter a memory location directly or indirectly via a pointer either as a HEX constant from a memory location or indirectly through a pointer vx Move Single Word MOVEVY IB 200 From WORD TAO To WORD TAO DL405 Range From WORD 2 22 ce itk Rees VPK KO FFFF See DL405 V memory map Data Words TO WORD chircare niina EE REIIA VP See DL405 V memory map Data Words 30 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs MOVEW Example In the following example the MOVEW instruction is used to move 16 bits of data from V2000 to V3000 when C100 turns on Move Single Word MOVEVY IB 200 From WORD v2000 To WORD v30 00 DL405 PLC User Manual Supplement Box Instructions Rev B 3 1 DirectSOFT IBox Instructions for DL405 PLCs Move Double Word MOVED IB 201 DS5 6 Used HPP N
8. SP70 On anytime the value in the accumulator is negative 192 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs DECBYBIND Example In this example the DECBYBIND instruction will subtract the value K12345678 from the double word binary value in V2114 V2115 on every scan that CO is ON Decrement by Binary Double 1 DECBYBIND 1B 508 Decrement DWORD Binary V2114 V2115 By DWORD Binary K12345678 DL405 PLC User Manual Supplement Box Instructions Rev B 193 DirectSOFT IBox Instructions for DL405 PLCs eee Decrement By BCD DECBYBCD IB 526 DS6 cod The Decrement By BCD IBox will subtract the Maya o ONLY By WORD BCD Value from the Decrement Decrement by BCD HPP N A WORD BCD Value on each scan the DECBYBCD IB 526 instruction is enabled Decrement WORD BCD By WORD BCD DECBYBCD Parameters Decrement WORD BCD The V Memory location where the 16 bit BCD value is located By WORD BCD The WORD BCD value to subtract Parameter DL405 Range All V Memory KO 9999 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP64 On when the 16 bit subtraction instruction results in a borrow SP65 On when the 32 bit subtraction instruction results in a borrow SP70 On anytime the value in the accumulator is negative SP75 On wh
9. Value WORD binary V2046 Result DWORD binary V2052 V2053 Is Negative C40 DL405 PLC User Manual Supplement IBox Instructions Rev B 17 DirectSOFT IBox Instructions for DL405 PLCs eee Unsigned Binary to Real with Implied Decimal Point BINTOR IB 564 DS6 ONLY Used HPP N A The Unsigned Binary to Real with Implied Decimal Point IBox converts the given 16 bit Unsigned Binary decimal value to a 32 bit real number given an implied number of decimal points Example K1234 with the Number of Decimal Points set to K1 would yield R123 4 BINTOR Parameters Unsigned Binary to Real with Implied Decimal Point BINTOR Value WORD Unsigned Binary Number of Decimal Points Result DWORD REAL o IB 564 V2160 K2 V2162 Value WORD Unsigned Binary The V Memory location where the Unsigned Binary decimal value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Real The first V Memory location where the 32 bit Real floating point result will be stored Parameter DL405 Range VEIT RETE CEREREM VKP KO 65535 All P Memory All User V Memory Number of Decimal Points K0 5 All User V Memory 172 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M
10. boundary is K10 and if the Monitoring Value equals 10 then the Low Alarm AND the Low Low alarm will both be ON If there is no power flow to the IBox then all alarm bits will be turned off regardless of the value of the Monitoring Value parameter HILOAL Parameters Monitoring Value BCD specifies the V memory location of the BCD value to be monitored High High Limit V memory location or constant specifies the high high alarm limit High High Alarm On when the high high limit is reached High Limit V memory location or constant specifies the high alarm limit High Alarm On when the high limit is reached Low Limit V memory location or constant specifies the low alarm limit Low Alarm On when the low limit is reached Low Low Limit V memory location or constant specifies the low low alarm limit Low Low Alarm On when the low low limit is reached Parameter DL405 Range Monitoring Value BCD See DL405 V memory map Data Words High High Limit K0 9999 or see DL405 V memory map Data Words See DL405 V memory map K0 9999 or see DL405 V memory map Data Words See DL405 V memory map K0 9999 or see DL405 V memory map Data Words See DL405 V memory map Low Low Limit K0 9999 or see DL405 V memory map Data Words Low Low Alarm X Y C GX GY B See DL405 V memory map 18 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBo
11. 50 Position This DWORD value specifies the target position Positive Negative target position values are used in concert with the Greater than Less than comparison operators to determine when the target position has been reached Negative target position values must be V Memory references DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Setup Run to Position succeeds and OFF if it fails Error This BIT will be OFF if the Setup Run To Position succeeds and ON if it fails Error Code A V Memory register that is used to store the Error if the Run to Position fails The following table has a list of the possible Error Code values Error Code Description 0 No Error 2002 Output Enable was already ON when the Instruction was enabled The CTRIO module reported an error Use the CTRIO Read Error CTRRDER IBox to read the CTRIO module s error code to determine what went wrong Parameter DL405 Range K0 255 K0 3 K20 20000 K20 65535 CTRIO2 All User V Memory See table on previous page All User V Memory K0 99 All User V Memory K0 2147434528 All User V Memory All User V Memory X Y C GX GY B All Bit Memory X Y C GX GY B All Bit Memory All V Memory N
12. Box Instructions Rev B 143 DirectSOFT IBox Instructions for DL405 PLCs CTRLDPR Example cont Rung 3 If the file is successfully loaded set Profile Loaded CTRLDPR Success Profile Loaded C100 C1 SET 144 DL405 PLC User Manual Supplement Box Instructions Rev B E DirectSOFT IBox Instructions for DL405 PLCs CTRIO Read Error CTRRDER IB 1014 DS5 6 Used HPP N A CTRIO Read Error Code will get the decimal error code value from the CTRIO module listed below and place it into the given Error Code register on a leading edge transition to the IBox This instruction is not supported when the CTRIO is used in an ERM EBC configuration Since the Error Code in the CTRIO is only maintained until another CTRIO command is fox Ta o given you must use this instruction immediately CTRIO Read Error Code after the CTRIO IBox that reports an error via CTRRDER IB 1014 its Error bit parameter CTRIO KD The Workspace register is for internal use by this Workspace IBox instruction and MUST NOT be used ErrorCode V400 gt anywhere else in your program Error Codes 0 No Error 100 Specified command code is unknown or unsupported 101 File number not found in the file system 102 File type is incorrect for specified output function 103 Profile type is unknown 104 Specified input is not configured as a limit on this output 105 Specified limit input edge is out
13. ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan read the Module Name of the ECOM100 and store it in V3000 thru V3003 8 characters This text can be displayed by an HMI The ECRDNAM is leading edge triggered not power flow driven similar to a counter input leg The command to read the module name will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 _FirstScan ECOM100 Read Name SP0 ECRDNAM ECOM 100 Workspace Success Error Module Name Num Chars DL405 PLC User Manual Supplement Box Instructions Rev B 89 DirectSOFT IBox Instructions for DL405 PLCs a ECOM100 Read Subnet Mask ECRDSNM IB 732 DS5 6 Used HPP N A ECOM100 Read Subnet Mask will read the 4 parts of the Subnet Mask and store them in 4 consecutive V Memory locations in decimal format on a leading edge transition to the IBox The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the command is complete In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECRDSNM Parameters Lv JA To o ECOM100 Read Subnet Mask ECRDSNM IB 7
14. From Real The first V Memory location of the source data double word To Real The first V Memory location of the destination double word 8l Parameter DL405 Range R 3 402823E 38 3 402823E 38 All V Memory 164 DL405 PLC User Manual Supplement Box Instructions Rev B All V Memory DirectSOFT IBox Instructions for DL405 PLCs MOVER Example In the following example the MOVER instruction is used to move 32 bits of data from V2040 V2041 to V2042 V2043 co Move Real MOVER 1B 202 From Real V2040 V2041 To Real V2042 V2043 DL405 PLC User Manual Supplement IBox Instructions Rev B 165 DirectSOFT IBox Instructions for DL405 PLCs ee Move Range of V using MOV MOVRANGE IB 203 DS6 The Move Range of V using MOV will use a ONLY MOV instruction to copy the values from one HPP WA range of V Memory locations to a second range of V Memory locations Up to 4095 V Memory locations can be moved Used MOVRANGE Parameters xe o Move Range of V using MOV MOVRANGE 1B 203 Start of Source Number of Elements K8 E Start of Destination Start of Source The first V Memory location of the source range Number of Elements The number of consecutive V Memory locations to process BCD Start of Destination The first V Memory location of the destination range Parameter DL405 Range Start of Source All V Memory Number of Elem
15. IB 523 DS5 6 Used Square BCD squares the given 4 digit WORD BCD number and writes it in as an 8 digit app WA DWORD BCD result SQUARE Parameters MaA o Value WORD BCD specifies the BCD Square BCD Word or constant that will be squared SQUARE 1B 523 Result DWORD BCD specifies the location Value WORD BCD TAO where the squared DWORD BCD value will Result OWORD BCD be placed Parameter DL405 Range Value WORD BCD VPK K0 9999 See DL405 V memory map Data Words Result DWORD BCD See DL405 V memory map Data Words 48 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs a a SQUARE Example In the following example the SQUARE instruction is used to square the 4 digit BCD value in V2000 and store the 8 digit double word BCD result in V3000 and V3001 Square BCD SQUARE IB 523 Value WORD BCD v2000 Result DWORD BCD V3000 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B a9 DirectSOFT IBox Instructions for DL405 PLCs rm mm r 1 HA Dt Square Binary SQUAREB IB 503 DS5 6 Used Square Binary squares the given 16 bit WORD Binary number and writes it as a 32 bit app WA DWORD Binary result SQUAREB Parameters o Value WORD Binary specifies the binary Square Binary Word or constant that will be squared S
16. The Box will be successful once the XD o ECOM100 has received its TCP IP settings ECOMIOD Enable DHCR from the DHCP server Since it is possible for ECDHCPE IB 735 the DHCP server to be unavailable a aS A Timeout parameter is provided so that the i Timeout sec IBox can complete but with an Error Error Code 1004 decimal wil E iiL Success CO J See also the ECOM100 IP Setup ECIPSUP Eitor IBox 717 to directly setup ALL of the TCP IP e parameters in a single instruction IP Address Subnet Mask and Gateway Address The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Fither the Success or Error bit parameter will turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Enable DHCP setting is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this Box ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SP0 STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECDHCP
17. You can reference binary V memory values by using the BCD conversion function on a V memory location but NOT an expression That is BCD V2000 is okay and will convert V2000 from Binary to BCD but BCD V2000 V3000 will add V2000 as BCD to V3000 as BCD then interpret the result as Binary and convert it to BCD NOT GOOD Also the final result is a 16 bit BCD number and so you could do BIN around the entire operation to store the result as Binary MATHBCD Parameters WORD Result specifies the location where the BCD result of the mathematical expression will be placed result must fit into 16 bit single V memory location Expression specifies the mathematical expression to be executed and the result is stored in specified WORD Result Each V memory location used in the expression must be in BCD format Parameter DL405 Range See DL405 V memory map Data Words Text 38 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M MATHBCD Fxample In the following example the MATHBCD instruction is used to calculate the math expression which multiplies the BCD value in V1200 by 1000 then divides by 4095 and loads the resulting value in V2000 Math BCD MATHBCD IB 521 WORD Result v2000 Expression V1200 K1000 K4085 DL405 PLC User Manual Supplement Box Instructions Rev B 39 DirectSOFT IBox Instructions for DL405 PLCs eee Math Bina
18. me me CTRIO2 me CTRIO2 Destination A DWORD that is used to store the value read from the specified register Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Register Read succeeds and OFF if the Register Read fails Error This BIT will be OFF if the Register Read succeeds and ON if the Register Read fails Parameter DL405 Range K0 255 All User V Memory All User V Memory SUCCESS oed edere eite cs X Y C GX GY B All Bit Memory X Y C GX GY B All Bit Memory 228 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute CTRIO Register Read CTRRGRD 1B 1016 CTRIO K1 Source Register 0 Ch1Fn1 Accumulator Destination V3000 Workspace v400 Success C1 Error c2 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes CTRRGRD Example Rung 1 This sets up the CTRIO module in slot 2 of the base Each CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used The CTRIO has been configured to
19. Config Box that is controlling the CTRIO module CTRELVL Parameters CTRIO This number corresponds to the CTRIO specified in the CTRIO Config IBox for the CTRIO module being used Output Identifies which CTRIO Output to configure o CTRIO Edit Level CTRELVL IB 1015 CTRIO K1 E Output K1 Function ON when greater than Level Rate setting C ON when less than Level Rate setting C OFF when greater than Level Rate setting C OFF when less than Level Rate setting Level DeadBand Tenths of K20 d Workspace Success C1 Error C2 Function selectable option ON when greater than Level Rate Setting ON when less than Level Rate Setting OFF when greater than Level Rate Setting OFF when less than Level Rate Setting Level The DWORD count value at which the Function above will be active decimal Deadband Tenths of 96 The value above and below the Level at which the Function will be active BCD Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Edit Level succeeds and OFF if the Edit Level fails Error This BIT will be OFF if the Edit Level succeeds and ON if the Edit Level fails Parameter DL405 Range K0 255 K0 3 K0 2147483647 All User V Memory K0 1000 All User V Memory All User V Memory SUCCESS coosnenistensesriiisa X Y
20. Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS a dieron a edges X Y C GX GY B See DL405 V memory map EMO rer ec esee tare ace dun X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words 0 0 0 1 to 255 255 255 254 o4 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nn RRR ECWRGWA Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOm100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan assign the Gateway Address of the ECOM100 to 192 168 0 1 The ECWRGWA is leading edge triggered not power flow driven similar to a counter input leg The command to write the Gateway Address will be sent to the ECOM100
21. SP75 On when a BCD instruction is executed and a NON BCD number was encountered 196 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs DECBYBCDD Example In this example the DECBYBCDD instruction will subtract the BCD value K99009900 from the double word BCD value in V2120 V2121 on every scan that CO is ON Decrement by BCD Double DECBYBCDD 1B 527 Decrement DWORD BCD V2120 V2121 By DWORD BCD K99009900 DL405 PLC User Manual Supplement Box Instructions Rev B 197 DirectSOFT IBox Instructions for DL405 PLCs eee Decrement By Real DECBYR IB 546 DS6 ias The Decrement By Real IBox will subtract the ONLY By REAL DWORD Value from the Decrement by Real HPP N A Decrement REAL DWORD Value on each DECBYR IB 546 scan the instruction is enabled Decrement REAL DWORD By REAL DWORD DECBYR Parameters Decrement Real DWORD The first V Memory location where the 32 bit Real floating point value is located 28 By Real DWORD The 32 bit Real floating point value to subtract Parameter DL405 Range Decrement All V Memory By sistedhiicsteddedeiitbleterteidue VR R 3 402823E 38 3 402823E 38 All V Memory 198 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs DECBYR Example In this example the DECBYR instruction wil
22. Workspace Success Error example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 12 1 DirectSOFT IBox Instructions for DL405 PLCs CTRADPT Example cont Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 3 OUT Rung 4 This rung allows the operator to enable output 0 from the ladder code enable output 0 C2 B2055 0 4 OUT 122 DL405 PLC User Manual Supplement Box Instructions Rev B DS5 6 DirectSOFT IBox Instructions for DL405 PLCs CTRIO Clear Preset Table CTRCLRT IB 1007 Used HPP N A to this IBox This IBox will take more than 1 PLC scan to execute Either the Success or Error bit will turn on when the command is complete If the Error Bit is on you can use the CTRIO Read Error Code CTRRDER IBox to get extended error information The Workspace register is for internal use by this Box instruction and MUST NOT be used anywhere else in your program CTRCLRT Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config CTRIO Clear Preset Table will clear the RAM based Preset Table on a leading edge transition vx CTRIO Clear Preset Table CTRCLRT IB 1007 CTRIO KO bd Output KO Workspace Success co Error co w Output specifies a CTRIO output to be used by the instruction Worksp
23. decimal point Double BCD to Real with Implied Decimal Point BCDTORD IB 562 Value DWORD BCD 2000 2001 Number of Decimal Points K2 Result DWORD REAL v3000 3001 DL405 PLC User Manual Supplement Box Instructions Rev B 3 7 DirectSOFT IBox Instructions for DL405 PLCs eee Math BCD MATHBCD IB 521 DS5 6 Used HPP N A Math BCD Format lets you enter complex mathematical expressions like you would in Visual Basic Excel or C to do complex calculations nesting parentheses up to 4 levels SIX deep In addition to you can do yp Modulo 96 aka Remainder Bit wise And meee Jee 8 Or Xor 4 and some BCD functions one Result LTAD xpression Convert to BCD BCD Convert to Binary BIN BCD Complement BCDCPL Convert from Gray Code GRAY Invert Bits INV and BCD HEX to Seven Segment Display SEG Example V2000 V2001 V2003 K100 GRAY V3000 amp K001F Every V memory reference MUST be to a single word BCD formatted value Intermediate results can go up to 32 bit values but as long as the final result fits in a 16 bit BCD word the calculation is valid Typical example of this is scaling using multiply then divide V2000 K1000 K4095 The multiply term most likely will exceed 9999 but fits within 32 bits The divide operation will divide 4095 into the 32 bit accumulator yielding a result that will always fit in 16 bits
24. 2 CTRVEL2 IB 1018 DS6 ONLY Used HPP N A 232 l The CTRIO Velocity Mode 2 IBox will setup the 9 CTRIO or CTRIO2 module to perform a Velocity CTRIO Velocity Mode 2 Mode operation on the specified CTRIO output This E xdi cTROs Ki runtime function generates the desired number of Output K3 output pulses as defined by the frequency and duty a TATE y cycle A Step Count value of 1 instructs the CTRIO Duty Cycle to continuously generate output pulses Step Count The specified CTRIO output must already be Workspace configured as a Pulse Output This configuration is ICI done via CTRIO Workbench EN c2 Error Code V3000 ud The CTRIO Velocity Mode IBox will take multiple PLC scans to complete Each time this IBox is triggered it will run to completion exactly one time It will start running on the rising edge of the input circuit and once triggered it will run to completion Any rising edges generated before the IBox completes will be ignored The IBox is complete when the either the Success bit or Error bit are set ON It references the CTRIO in the CTRIO Config IBox that is controlling the CTRIO module CTRVEL2 Parameters CTRIO This number corresponds to the CTRIO specified in the CTRIO Config IBox for the CTRIO module being used Output Identifies which CTRIO Output to configure Frequency Specifies the pulse output frequency in Hertz Duty Cycle Specifies the dut
25. 2 7 and loads the resulting 32 bit value in V2000 and V2001 Math Real MATHR IB 541 DWORD Result 2000 v2001 Expression 1200 R10 5 R2 7 DL405 PLC User Manual Supplement Box Instructions Rev B 43 DirectSOFT IBox Instructions for DL405 PLCs eee Real to BCD with Implied Decimal Point and Rounding RTOBCD IB 561 DS5 6 Used HPP N A Real to BCD with Implied Decimal Point and Rounding converts the absolute value of the given Real number to a 4 digit BCD number compensating for an implied number of decimal points K0 K4 and performs rounding For example RTOBCD R56 74 with an FA implied number of decimal points equal to Real to BCD wilmplied Decimal Pt and Rounding K1 would yield 567 BCD If the implied RTOBCD IB 561 number of decimal points was 0 then the Malle One eal function would yield 57 BCD note that it Number of Decimal Points rounded up Result WORD BCD If the Real number is negative the Result will equal its positive absolute value RTOBCD Parameters Value DWORD Real specifies the Real Dword location or number that will be converted and rounded to a BCD number with decimal points Number of Decimal Points specifies the number of implied decimal points in the Result WORD Result WORD BCD specifies the location where the rounded implied decimal points BCD value will be placed Parameter DL405 Range Value DWORD Real V
26. A Move Double Word moves copies a double word to two consecutive memory locations directly or indirectly via a pointer either as a double HEX constant from a double memory location or indirectly through a pointer to a double memory location MOVED Parameters From DWORD specifies the double word that will be moved to another location To DWORD specifies the location where the From DWORD will be moved to Parameter Fabi o Move Double Word MOVED IB 201 From DWORD TAO ii To DWORD TAO b DL405 Range From DWORD ee eC TERCERA V PK KO FFFFFFFF See DL405 V memory map Data Words To DWORD Rr eme VP See DL405 V memory map Data Words 32 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs MOVED Example In the following example the MOVED instruction is used to move 32 bits of data from V2000 and V2001 to V3000 and V3001 when C100 turns on Move Double Word MOVED IB 201 From DWORD v2000 v2001 To DWORD v30 0 3001 DL405 PLC User Manual Supplement Box Instructions Rev B 33 DirectSOFT IBox Instructions for DL405 PLCs BCD to Real with Implied Decimal Point BCDTOR IB 560 DS5 6 Used BCD to Real with Implied Decimal Point converts the given 4 digit WORD BCD value to a HPP N A Real number with the implied number of decimal points K0 K4 For example BCDTOR K
27. BINTOR Fxample In the following example the BINTOR instruction is used to convert the binary value stored in V2160 to a 32 bit real number which is stored in V2162 V2163 K2 in the decimal points implies that the data will have two digits to the right of the decimal point _On SP1 Unsigned Binary to Real with Implied Decimal Point 1 E BINTOR IB 564 Value WORD Unsigned Binary V2160 Number of Decimal Points K2 Result DWORD REAL V2162 V2163 DL405 PLC User Manual Supplement IBox Instructions Rev B 173 DirectSOFT IBox Instructions for DL405 PLCs r ERN NMME UMM M Signed Binary to Real with Implied Decimal Point BINSTOR IB 568 DS6 The Signed Binary to Real with Implied o ony 5 Decimal Point IB he given 16 bi ecimal Foint 1box converts the given 16 bit Signed Binary to Real with Implied Decimal Point HPP N A Signed Binary decimal value to a 32 bit real BINSTOR IB 568 number given an implied number of decimal Value WORD Signed Binary points Number of Decimal Points K4 Result DWORD REAL Example K1234 with the Number of Decimal Points set to K1 would yield R123 4 BINSTOR Parameters Value WORD Signed Binary The V Memory location where the Signed Binary decimal value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Real The first
28. Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K20 20000 See DLA05 V memory map Data Words K0 99 See DL405 V memory map K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words SUCCESS 0 cece eee eee X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map CTRRIPM Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO Slot Workspace Input v2000 v2025 Output 2030 V20B1 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 15 1 DirectSOFT IBox Instructions for DL405 PLCs eee CTRRIPM Example con t Rung 2 This CTRIO Run To Position Mode IBox sets up Output 0 in CTRIO 1 to output pulses at a Frequency of 1000 Hz use the Greater than Ch1 Fn1 comparison operator until the input position of 1500 is reached This example program requires that you load CTRRTPM_IBox cwb into your Hx CTRIO module CTRIO Run To Position Mode mm CTRRTPM IB 1012 CTRIO Output Frequency Function Duty Cycle Position Workspace Success Error Rung 3 If the
29. CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO Slot Workspace Input 2000 2025 Output 2030 2061 Rung 2 This rung is a sample method for enabling the CTRADPT command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on CO will cause the CTRADPT instruction to add a new preset to the preset table for output 0 on the CTRIO in slot 2 The new preset will be a command to RESET entry type K1 reset pulse time is left at zero as the reset type does not use this and the count at which it will reset will be 20 Operating procedure for this example code is to load the CTRADPT_ex1 cwh file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2 in Data View turn encoder on CTRIO to value above 10 and output 0 light will come on and stay on for all counts past 10 Now reset the counter with C1 enable CO to execute CTRADPT command to add a reset for output 0 at a count of 20 turn on C2 to enable output 0 then turn encoder to value of 10 output 0 should turn on and then continue on to count of 20 output 0 should turn off CTRIO Add Entry to End of Preset Table Start CTRADPT CTRADPT co CTRIO Output Entry Type Pulse Time Preset Count
30. Count Workspace Success Error example continued on next page 136 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTRINPT Example cont Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 OUT Rung 4 This rung allows the operator to enable output 0 from the ladder code enable output 0 C2 B2056 0 OUT DL405 PLC User Manual Supplement Box Instructions Rev B 13 7 DirectSOFT IBox Instructions for DL405 PLCs P ALS CGSERIGOLLLKLAULLIEULOLUAEKL LLLLLULLLECLUALALLHLL EOUOU RkhiRsPERRRBb D Q M CTRIO Initialize Preset Table on Reset CTRINTR IB 1010 DS5 6 Used HPP N A CTRIO Initialize Preset Table on Reset on a leading edge transition to this IBox defines the initial preset table to be loaded automatically when the reset event occurs on a specific CTRIO Output resource This IBox will take ZAA 5 more than 1 PLC scan to execute Either the SAIN ASO T ETONE Success or Error bit will turn on when the CTRINTR 18 1010 command is complete If the Error Bit is on CTRIO you can use the CTRIO Read Error Code Dead m ntry Type e CTRRDER IBox to get extended error eee information Preset Count Workspace 400 Entry Type beds Success co b KO Set Error co g K1 Reset K2 Pulse On uses Pulse Time K3 Pulse Off uses Pulse Ti
31. DL405 V memory map Data Words DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj SUMR Example In the following example the SUMR instruction is used to total the sum of all floating point REAL number values in words V2000 thru V2007 and store the resulting 32 bit floating point REAL number value in V3000 and V3001 Sum Real Numbers SUMR IB 542 Start Address DWORD v2000 v2001 v2007 End Addr inclusive DWORD Result DWORD 3000 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B 59 DirectSOFT IBox Instructions for DL405 PLCs ECOM100 Configuration ECOM100 IB 710 DS5 6 Used HPP N A ECOM100 Configuration defines all the common information for one specific ECOM100 module which is used by the other ECOM100 IBoxes for example ECRX ECOM100 Network Read ECEMAIL ECOM100 Send EMail ECIPSUP ECOM100 IP C x18 o Setup etc ECOM100 Config You MUST have the ECOM100 ECOM100 IB 710 Configuration IBox at the top of your ECOM100 Ko ladder stage program with any other Slot ki 7 configuration IBoxes The Message Buffer Status parameter specifies the starting address of a Ee US 65 WORD buffer This is 101 Octal dass addresses e g V1400 thru V1500 MEG Bue Boones 00 If you have more than one ECOM100 in your PLC you must have a different ECOM100 Configuration IBox for E
32. ECWRIP ECOM100 Workspace Success Error Error Code IP Address 192 168 12 100 DL405 PLC User Manual Supplement Box Instructions Rev B 97 DirectSOFT IBox Instructions for DL405 PLCs C ECOM100 Write Module ID ECWRMID IB 721 DS5 6 Use ECOM100 Write Module ID will write the given Module ID on a leading edge transition to HPP N A the IBox If the Module ID is set in the hardware using TT the dipswitches this IBox will fail and return ECOM100 Write Module ID error code 1005 decimal ECWRNID IB 721 The Workspace parameter is an internal ECOMi1003 ko private register used by this IBox and MUST Workspace BE UNIQUE in this one instruction and Success CU MUST NOT be used anywhere else in your Error T r pope Error Code 400 iu Either the Success or Error bit parameter will Module ID KD gt turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Module ID is stored in Flash ROM in the ECOM100 and the execution of this Box will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SPO STR NOT First Scan to drive the power flow to the IBox In order for this EC
33. Example R123456 78 with the Number of Decimal Points set to K2 would yield the BCD value 12345678 If the Number of decimal Points is set to K0 this IBox would yield the BCD value 123457 the 6 is rounded up RTOBIND Parameters Value DWORD Real The first V Memory location where the 32 bit Real floating point value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Unsigned Binary The first V Memory location where the 32 bit Unsigned Binary decimal result will be stored Parameter DL405 Range TOREM VRP R 3 402823E 38 3 402823E 38 All P Memory All User V Memory Number of Decimal Points KO 10 All User V Memory 182 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR RTOBIND Example In the following example the RTOBIND instruction is used to convert the real value R3 14159 to a double word binary number which is stored in V2170 V2071 K5 in the decimal points implies that the data will have five digits to the right of the decimal point The resulting value in V2170 V2171 is 314159 _On SP1 Real to Double Unsigned Binary w Implied Decimal Pt and Rounding 1 RTOBIND IB 567 Value DWORD Real R3 14159 Number of Decimal Points K5 Result DWORD Unsigned Binary V2170 V2171 DL405 PLC User M
34. IBoxes using this specific ECOM100 module V1502 is used to coordinate interlock the logic in all of the other ECxxxx Boxes using this specific ECOM100 module V1400 V1500 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module 1 ECOM100 Config ECOM100 1B 710 ECOM100 K1 Slot K3 Status V1501 Workspace V1502 Msg Buffer 65 WORDs V1400 V1500 Rung 2 Each time that C0 is enabled K1 will be sent to the ECOM100 module to pause the PEERLINK feature A KO would need to be sent to resume PEERLINK operation C1 will be enabled if the pause is a success C2 will be enabled if the attempted pause results in failure co 2 ss ECOM100 Write PEERLINK Pause ECWRPLPA IB 743 ECOM100 K1 Workspace v503 Success C1 Error c2 Error Code v504 PEERLINK Pause K1 DL405 PLC User Manual Supplement Box Instructions Rev B 2 15 DirectSOFT IBox Instructions for DL405 PLCs a Ru n AE u ERM Config ERM IB 750 DS6 ised The ERM Config IBox defines all of the information o ONLY necessary to setup an ERM or ERMIOO for use by other ERM Config HPP N A ERM specific IBoxes ERxxxxx The ERM Config ERM IB 750 IBox is the resource manager for the slot or port it is ERM K1 setup to use It will internally monitor the Busy and Slot K1 s Error SP bits so that it can control all of the other Workspace ERM specific
35. Parameter DL405 Range K0 255 See DL405 V memory map Data Words K0 90 See DL405 V memory map Number of Bytes K1 128 To Master Element Dest See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map ju em X Y C GX GY B See DL405 V memory map 1 12 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs a HMM w NETRX Example Rung 1 The Network Configuration IBox coordinates all of the interaction with other Network IBoxes NETRX NETWX You must have a Network Configuration IBox for each serial port network DCM module network or original ECOM module network in your system Configuration IBoxes must be at the top of your program and must execute every scan This IBox defines Network KO to be for the local CPU serial port 2 KF2 For local CPU serial ports or DCM ECOM modules use the same value you would use in the most significant byte of the first LD instruction in a normal RX WX rung to reference the port or module Any NETRX or NETWX IBoxes that need to reference this specific network would enter KO for their Network parameter The Workspace register is used to maintain state information about the port or module along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the program This V memory register must not be used anywhere else i
36. Setup ECEMRDS ECOM100 E mail Setup ECEMSUP ECOM100 IP Setup ECIPSUP ECOM100 Read Description ECRDDES ECOM100 Read Gateway Address ECRDGWA ECOM100 Read IP Address ECRDIP ECOM100 Read Module ID ECRDMID ECOM100 Read Module Name ECRDNAM ECOM100 Read Subnet Mask ECRDSNM ECOM100 Write Description ECWRDES ECOM100 Write Gateway Address ECWRGWA ECOM100 Write IP Address ECWRIP ECOM100 Write Module ID ECWRMID ECOM100 Write Name ECWRNAM ECOM100 Write Subnet Mask ECWRSNM ECOM100 RX Network Read ECRX ECOM100 WX Network Write ECWX NETCFG Network Configuration NETCFG Network RX Read NETRX Network WX Write NETWX Counter 1 0 IBoxes Instruction CTRIO Configuration CTRIO CTRIO Add Entry to End of Preset Table CTRADPT CTRIO Clear Preset Table CTRCLRT CTRIO Edit Preset Table Entry CTREDPT CTRIO Edit Preset Table Entry and Reload CTREDRL CTRIO Initialize Preset Table CTRINPT CTRIO Initialize Preset Table CTRINTR CTRIO Load Profile CTRLDPR CTRIO Read Error CTRRDER CTRIO Run to Limit Mode CTRRTLM CTRIO Run to Position Mode CTRRTPM CTRIO Velocity Mode CTRVELO CTRIO Write File to ROM CTRWFTR DL405 PLC User Manual Supplement Box Instructions Rev B 7 DirectSOFT IBox Instructions for DL405 PLCs eee New IBox Instructions with DirectSOFT6
37. T8 ANSCL o Analog Scale 12 Bit BCD to BCD IB 423 Raw 0 4095 BCD High Engineering KO M Low Engineering TAO i Engineering BCD Raw 0 4095 BCD specifies the V memory location of the unipolar unsigned raw 0 4095 unscaled value High Engineering specifies the high engineering value when the raw input is 4095 Low Engineering specifies the low engineering value when the raw input is 0 Engineering BCD specifies the V memory location where the scaled engineering BCD value will be placed Parameter DL405 Range Raw 0 4095 BCD sssusuueueuue VP See DL405 V memory map Data Words High Engineering K0 9999 Low Engineering K0 9999 Engineering BCD sssssssssse VP See DL405 V memory map Data Words 10 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M ANSCL Fxample In the following example the ANSCL instruction is used to scale a raw value 0 4095 BCD that is in V2000 The engineering scaling range is set 0 100 low engineering value high engineering value The scaled value will be placed in V2100 in BCD format Analog Scale 12 Bit BCD to BCD ANSCL IB 423 Raw 0 4095 BCD v2000 High Engineering Low Engineering Engineering BCD DL405 PLC User Manual Supplement Box Instructions Rev B 1 1 DirectSOFT IBox Instructions for DL405 PLCs a Analog Scale 12 Bit Bin
38. The following IBox instructions are only available with DzrectSOFT6 Analog Helper IBoxes Instruction Filter Over Time BCD Double FILTERD Hi Lo Alarm Binary Double HILOALBD Hi Lo Alarm BCD Double HILOALD Memory IBoxes Instruction Move Real MOVER Move Range of V Using MOV MOVRANGE Move Range of V Using FOR NEXT MOVEFOR Math IBoxes Instruction Absolute Value Binary ABSBIN Unsigned Binary to Real with Implied Decimal Point BINTOR Signed Binary to Real with Implied Decimal Point BINSTOR Unsigned Double Binary to Real with Implied Decimal Point BINTORD Signed Double Binary to Real with Implied Decimal Point BINSTORD Real to Unsigned Binary with Implied Decimal Point and Rounding RTOBIN Real to Double Unsigned Binary with Implied Decimal Point and Rounding RTOBIND Real to Signed Binary with Implied Decimal Point and Rounding RTOBINS Real to Double Signed Binary with Implied Decimal Point and Rounding RTOBINSD Scale Value Unsigned Binary SCALEB Decrement By Binary DECBYBIN Decrement By Binary Double DECBYBIND Decrement By BCD DECBYBCD Decrement By BCD Double DECBYBCDD Decrement By Real DECBYR Increment By Binary INCBYBIN Increment By Binary Double INCBYBIND Increment By BCD INCBYBCD Increment By BCD Double INCBYBCDD Increment By Real INCBYR 8 DL405
39. V Memory location where the 32 bit Real floating point result will be stored Parameter DL405 Range NAIC craves Ed nan fa ea AS VKP KO 32767 All P Memory All User V Memory Number of Decimal Points K0 5 All User V Memory 174 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs lt M BINSTOR Example In the following example the BINSTOR instruction is used to convert the signed binary value stored in V2174 to a 32 bit real number which is stored in V2176 V2177 K4 in the decimal points implies that the data will have four digits to the right of the decimal point _On SP1 Signed Binary to Real with Implied Decimal Point 1 m BINSTOR IB 568 Value WORD Signed Binary Number of Decimal Points Result DWORD REAL V2176 V2177 DL405 PLC User Manual Supplement IBox Instructions Rev B 175 DirectSOFT IBox Instructions for DL405 PLCs C S Unsigned Double Binary to Real with Implied Decimal Point BINTORD IB 566 DS6 ONLY Used HPP N A The Unsigned Double Binary to Real with Implied Decimal Point Box converts the given 32 bit Unsigned Binary decimal value to a 32 bit real number given an implied number of decimal points Example K12345678 with the Number of Decimal Points set to K5 would yield R123 45678 BINTORD Parameters o Unsigned Double Binary to Real with Implied Decimal Point BIN
40. When C101 turns on C21 is delayed turning on by 2 seconds When C101 turns off C21 turns off imediately On Delay Timer ONDTMR IB 301 Timer Number T1 On Delay Time 0 01 sec K200 Output C21 Example timing diagram cr fT ME NH 2595 es C21 DL405 PLC User Manual Supplement Box Instructions Rev B 25 DirectSOFT IBox Instructions for DL405 PLCs ee One Shot ONESHOT IB 303 DS5 6 Usea One Shot will turn on the given bit output parameter for one scan on an OFF to ON HPP N A transition of the power flow into the IBox This IBox is simply a different name for the PD Coil Positive Differential ONESHOT Parameters E Tx 2 o Discrete Output specifies the output that One Shot will be on for one scan ONESHOT IB 303 Discrete Output CO ig Parameter DL405 Range Discrete Output 0 XX C See DL405 V memory map 26 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs gm M ONESHOT Example In the following example the ONESHOT instruction is used to turn C100 on for one PLC scan after CO goes from an off to on transition The input logic must produce an off to on transition to execute the One Shot instruction One Shot ONESHOT IB 303 Discrete Output C100 Example timing diagram co pl o H Scan time C100 DL405 PLC U
41. between the CPU and the ERM or Status Buffer 12 words ERM100 module and to monitor the health of the Ethernet network connecting the ERM or ERMI0O to its slaves This IBox references the ERM of the ERM Config IBox that is controlling the ERM or ERM100 module in a specific slot The ERM Config contains built in interlocking logic that is used to synchronize the processing of this IBox with all of the other IBoxes in the ladder program that are being processed by the same ERM or ERM100 module The ERM Read Status Box retrieves 7 status values from the ERM or ERM100 and places those values in consecutive V Memory locations The values of these status registers will reset to 0 on each Program mode to Run mode change The definitions of those status values follows Name Description The minimum amount of time in milliseconds the Minimum 1 0 Scan ERM or ERM100 module spent updating all of its Ethernet slaves The maximum amount of time in milliseconds the Maximum 1 0 Scan ERM or ERM100 module spent updating all of its Ethernet slaves The amount of time in milliseconds the ERM or Total Time ERM100 module has been running The total number of 1 0 scans the ERM or ERM100 has Number of 1 0 Scans completed The total number of retries on Read Requests that the Number of PLC Read ERM or ERM100 module has generated when Retries communicating across the backplane to the CPU 44 The total number of retri
42. change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan set the Module ID of the ECOM100 Typically this is done using NetEdit but this Box allows you to configure the module ID of the ECOM100 using your ladder program The EWRMID is leading edge triggered not power flow driven similar to a counter input leg The command to write the module ID will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 Write Module ID SPO ECWRMID ECOM100 Workspace Success Error Error Code Module ID DL405 PLC User Manual Supplement IBox Instructions Rev B 99 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Write Name ECWRNAM IB 725 DS5 6TUsed ECOM100 Write Name will write the given Name to the ECOM100 module on a leading HPP N A edge transition to the IBox If you use a dollar sign
43. continues to decrease to meet or fall below the low low limit in V2013 C103 will turn on Both bits would be on in this case The low and low low limits and alarms can be set to the same V memory location value if one low limit or alarm is desired to be used SP1 Hi Low Alarm Binary HILOALB Monitoring Value Binary High High Limit High High Alarm High Limit High Alarm Low Limit Low Alarm Low Low Limit Low Low Alarm DL405 PLC User Manual Supplement Box Instructions Rev B 2 1 DirectSOFT IBox Instructions for DL405 PLCs a Off Delay Timer OFFDTMR IB 302 DS5 6 Used HPP N A Off Delay Timer will delay the turning off of the Output parameter by the specified Off Delay Time in hundredths of a second based on the power flow into the IBox Once the IBox receives power the Output bit will turn on immediately When the power flow to the IBox turns off the Output bit WILL ZKA o REMAIN ON for the specified amount of time in hundredths of a second Once the Off Delay Timer s OFFDTMR IB 302 Off Delay Time has expired the output will ane turn Off If the power flow to the Box comes i Off Delay Time 0 01 sec TAO s back on BEFORE the Off Delay Time then the timer is RESET and the Output will SURE co remain On so you must continuously have NO power flow to the IBox for AT LEAST the specified Off Delay Time before the Output will turn Off This I
44. copy can be changed by using the ECEMSUP IBox If successful turn on C102 If there is a failure turn on C103 If it fails you can look at V2001 for the specific error code ECOM100 Restore Default EMail Setup EStop Pushed ECEMRDS C11 ECOM100 Workspace Success Error Error Code DL405 PLC User Manual Supplement Box Instructions Rev B 73 DirectSOFT IBox Instructions for DL405 PLCs rr OO A ELUhGGOEEOLVUL LELLLLEDBEEROELELLLLLLLeULLULULULULLLLULLLILLLGOG XYZGAALL LOO OUEA OE UOELELLLLLaA EGOU OANIS ECOM100 E mail Setup ECEMSUP IB 712 DS5 6 Used HPP N A ECOM100 EMail Setup on a leading edge transition will modify the working copy of the EMail setup currently in the ECOM100 based on the specified ECOM100 which corresponds to a specific unique ECOM100 A LIX e Configuration ECOM100 at the top of EG ONU Eval ase your program ECEMSUP IB 712 ECOM1003 KO id You may pick and choose any or all fields to Workspace ZR ifi d 1 hi h Success co be modified using this instruction Note that ae these changes are cumulative if you execute Error Code VADO multiple ECOM100 EMail Setup IBoxes MG PEE POS Sender Name then all of the changes are made in the order mE na they are executed Also note that you can Port Number restore the original ECOM100 EMail Setup NAA that is stored
45. in Data View turn encoder on CTRIO to value above 10 and output 0 light will come on and stay on until a count of 20 is reached where it will turn off Now reset the counter with Cl enable CO to execute CTRCLRT command to clear the preset table turn on C2 to enable output 0 then turn encoder to value of 10 output 0 should NOT turn on CTRIO Clear Preset Table Start dns CTRCLRT IB 1007 2 I CTRIO Output Workspace Success Error example continued on next page 12H l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTRCLRT Example con t Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 OUT Rung 4 This rung allows the operator to enable output 0 from the ladder code enable output 0 C2 B2056 0 OUT DL405 PLC User Manual Supplement IBox Instructions Rev B 125 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Edit Preset Table Entry CTREDPT IB 1003 DS5 6TUsed CT RIO Edit Preset Table Entry on a leading edge transition to this IBox will edit a single HPP N A entry in a Preset Table on a specific CTRIO Output resource This IBox is good if you are editing more than one entry in a file at a time If you wish to do just one edit and then Seen RS reload the table immediately see the
46. in the ECOM100 to the working copy by using the ECOM100 Restore Default EMail Setup ECEMRDS IBox The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 You are limited to approximately 100 characters bytes of setup data for the entire instruction So if needed you could divide the entire setup across multiple ECEMSUP IBoxes on a field by field basis for example do the Carbon Copy cc field in one ECEMSUP IBox and the remaining setup parameters in another In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECEMSUP Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will
47. of range 106 Specified input function is unconfigured or invalid 107 Specified input function number is out of range 108 Specified preset function is invalid 109 Preset table is full 110 Specified Table entry is out of range 111 Specified register number is out of range 112 Specified register is an unconfigured input or output 2001 Error reading Error Code cannot access CTRIO via ERM CTRRDER Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Workspace specifies a V memory location that will be used by the instruction Error Code specifies the location where the Error Code will be written Parameter DL405 Range K0 255 See DL405 V memory map Data Words See DL405 V memory map Data Words DL405 PLC User Manual Supplement Box Instructions Rev B 145 DirectSOFT IBox Instructions for DL405 PLCs eee CTRRDER Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CTRxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO CTRIO Slot Workspace Input v2000 v2025 Output V2030 2061 Rung 2 This CTRIO Read Error Code IBox will read the Extended Error information from CTRIO 1 This example program requires that you lo
48. or double quote use the PRINT VPRINT escape sequence of TWO dollar signs for a single dollar sign or o dollar sign double quote for a double ECOM100 Write Name quote character ECWRNAM IB 725 The Workspace parameter is an internal ECOM100 KO private register used by this IBox and MUST Workspace V40D i BE UNIQUE in this one instruction and Success co MUST NOT be used anywhere else in your Error program Error Code V400 i Either the Success or Error bit parameter will ModueName 1 7 turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Name is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SPO STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRNAM Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that
49. that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed e Module Name specifies the starting buffer location where the ECOM100 s Module Name will be placed e Num Chars specifies the number of characters bytes to read from the ECOM100 s Name field Parameter DL405 Range K0 255 See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words K1 128 88 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E ECRDNAM Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config
50. the 2nd scan set the Module Description of the ECOM100 Typically this is done using NetEdit but this IBox allows you to configure the module description in the ECOM100 using your ladder program The EWRDES is leading edge triggered not power flow driven similar to a counter input leg The command to write the module description will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 Write Description SPO ECWRDES IB 727 ECOM100 KO Workspace v503 Success C100 Error C101 Error Code 2000 Description Modbus TCP Network 2 DL405 PLC User Manual Supplement Box Instructions Rev B 93 DirectSOFT IBox Instructions for DL405 PLCs C ECOM100 Write Gateway Address ECWRGWA IB 731 DS5 6 Used HPP N A ECOM100 Write Gateway Address will write the given Gateway IP Address to the ECOM100 module on a leading edge transition to the IBox See also ECOM100 IP Setup ECIPSUP IBox 717 to setup ALL of the TCP IP parameters in a single instruction IP e Address Subnet Mask and Gateway Address ECOM100 Write Gateway Address The Workspace parameter is an internal SE 1B 731 private register used by this IBox and MUST ECOM1 00 BE UNIQUE in this one instruction and Workspace v400 MUST NOT be used anywhere else in
51. the Filter instruction is used to filter a BCD value that is in V2000 Timer TO is set to 0 5 sec the rate at which the filter calculation will be performed The filter constant is set to 2 A larger value will increase the smoothing effect of the filter A value of 1 results with no filtering The filtered value will be placed in V2100 Filter Over Time BCD FILTER Filter Freq Timer Filter Freq Time 0 01 sec Raw Data BCD Filter Divisor 1 100 Filtered value BCD DL405 PLC User Manual Supplement Box Instructions Rev B 15 DirectSOFT IBox Instructions for DL405 PLCs Filter Over Time Binary FILTERB IB 402 DS5 6 Used Filter Over Time in Binary decimal will perform a first order filter on the Raw Data on a HPP N A defined time interval The equation is New Old Raw Old FDC where FEE o New New Filtered Value Per Ove TMe C BIRD Old Old Filtered Value FILTERB IB 402 il ia Filter Freq Timer TO FDC Filter Divisor Constant Filter Freq Time 0 01 sec Raw Raw Data Raw Data Binary 7 Filter Divisor 1 100 Ki g The Filter Divisor Constant is an integer in the Filtered Value Binary TAO g range K1 to K100 such that if it equaled K1 then no filtering would be done The rate at which the calculation is performed is specified by time in hundredths of a second 0 01 seconds as the Filter Freq Time parameter Note that this Timer instruction is embed
52. use V2000 through V2025 for its input data and V2100 through V2131 for its output data 1 CTRIO Config CTRIO 1B 1000 CTRIO K1 Slot Local K2 Workspace v1400 Input V2000 V2025 Output V2100 V2131 Rung 2 This rung is a sample method for reading a register of a CTRIO module Turning on CO will cause the CTRRGRD instruction to read the Channel 1 Function 1 register and store the result in V3000 V3001 If the register read request is successful C1 will turn ON If the register read request fails C2 will turn ON co 2 eo CTRIO Register Read CTRRGRD 1B 1016 CTRIO K1 Source Register 0 Ch1Fn1 Accumulator Destination v3000 Workspace V400 Success C1 Error C2 DL405 PLC User Manual Supplement Box Instructions Rev B 229 DirectSOFT IBox Instructions for DL405 PLCs rr CTRIO Register Write CTRRGWR IB 1017 DS6 ONLY Used HPP N A The CTRIO Register Write IBox will write the specified value to the selected register in a CTRIO or CTRIO2 module It references the CTRIO in the CTRIO Config IBox that is controlling the CTRIO module CTRRGWR Parameters o CTRIO Register Write CTRRGWR IB 1017 CTRIO s K1 Source Destination Register 0 Ch1Fn1 Accumulator hv Workspace Success Error C3 T e CTRIO This number corresponds to the CTRIO specified in the CTRIO Config Box for the CTRIO module being used Source A DWORD that contains the value or a Hex con
53. using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 x Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan read the Module Description of the ECOM100 and store it in V3000 thru V3007 16 characters This text can be displayed by an HMI The ECRDDES is leading edge triggered not power flow driven similar to a counter input leg The command to read the module description will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 FirstScan ECOM100 Read Description SPO ECRDDES ECOM100 Workspace Success Error Description Num Chars DL405 PLC User Manual Supplement Box Instructions Rev B 8 1 DirectSOFT IBox Instructions for DL405 PLCs o Qa 2 ECOM100 Read Gateway Address ECRDGWA IB 730 DS5 6 Used HPP N A ECOM100 Read Gateway Address will read the 4 parts of the Gateway IP address and store them in 4 consecutive V Memory locations in decimal format on a leading edge transition to the IBox The Workspace parameter is an internal private register used by this IBox and MUST BE
54. whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code To configure all of the ECOM100 TCP IP parameters in one IBox see the ECOM100 IP Setup ECIPSUP IBox _FirstScan ECOM100 Write Gateway Address SPO ECWRGWA ECOM100 Workspace Success Error Error Code Gateway Address 182 168 0 1 DL405 PLC User Manual Supplement Box Instructions Rev B 95 DirectSOFT IBox Instructions for DL405 PLCs C ECOM100 Write IP Address ECWRIP IB 723 DS5 6 Used HPP N A ECOM100 Write IP Address will write the given IP Address to the ECOM100 module on a leading edge transition to the IBox See also ECOM100 IP Setup ECIPSUP Box 717 to setup ALL of the TCP IP parameters in a single instruction IP Address Subnet Mask Jp e and Gateway Address ECOM100 Write IP Address The Workspace parameter is an internal STI RO private register used by this IBox and MUST ECOMI00 KO BE UNIQUE in this one instruction and Workspace W400 MUST NOT be used anywhere else in your Success co program Eror Fither the Success or Error bit parameter will Error Code V400 turn on once the command is complete If IP Address 0 0 0 0 there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 100
55. will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Module Name specifies the Name that will be written to the module Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS ililsilliasls casas X Y C GX GY B See DL405 V memory map EN OR ERNIIEREC oudcacaiern X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words Text 100 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nr nn RRR ECWRNAM Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Confi
56. word BCD value that is in V2026 V2027 If the value in V2026 V2027 meets exceeds the high limit of K80000 C41 will turn ON If the value continues to increase to meet exceed the high high limit of K90000 C40 will turn ON Both bits would be ON in this case The high and high high limits and alarms can be set to the same value if one high limit or alarm is desired to be used If the value in V2026 V2027 meets or falls below the low limit of K20000 C42 will turn ON If the value continues to decrease to meet or fall below the low low limit of K10000 C43 will turn ON Both bits would be ON in this case The low and low low limits and alarms can be set to the same value if one low limit or alarm is desired to be used EB On SP1 Hi Low Alarm BCD Double 1 HILOALD IB 424 Monitoring Value BCD Double V2026 High High Limit K90000 High High Alarm High Limit High Alarm Low Limit Low Alarm Low Low Limit Low Low Alarm DL405 PLC User Manual Supplement IBox Instructions Rev B 163 DirectSOFT IBox Instructions for DL405 PLCs AN Move Real MOVER IB 202 The Move Real Box will copy a 32 bit floating point DS6 T T8 Used ONLY number that is stored in two consecutive V Memory HPP WA locations to the specified location which is also two vum consecutive V Memory locations Homfissf To Real Move Real V2040 V2042 IB 202 MOVER Parameters
57. 0 The IP Address is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SPO STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRIP Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written IP Address specifies the IP Address that will be written to the module Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS si cnlenimitiee2cors X Y C GX GY B See DL405 V memory map ENO M X Y C GX GY B See DL405 V memory map Error Code See DL405 V memory map Data Words IP Address 0 0 0 1 to 255 255 255 254 96 DL405 PLC User Manu
58. 0 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDs V402 V502 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 69 DirectSOFT IBox Instructions for DL405 PLCs C ECEMAIL Example con t Rung 2 When a machine goes down send an email to Joe in maintenance and to the VP over production showing what machine is down along with the date time stamp of when it went down The ECEMAIL is leading edge triggered not power flow driven similar to a counter input leg An email will be sent whenever the power flow into the IBox goes from OFF to ON This helps prevent self inflicted spamming If the EMail is sent turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the SMTP error code or other possible error codes ECOM100 Send EMail Machin
59. 1234 with an implied number of decimal points equal to PgR K1 would yield R123 4 BCD to Real with Implied Decimal Point BCDTOR IB 560 BCDTOR Parameters Value WORD BCD TAQ Value WORD BCD specifies the word or Number of Decimal Points K0 constant that will be converted to a Real Result DWORD REAL V400 number Number of Decimal Points specifies the number of implied decimal points in the Result DWORD Result DWORD REAL specifies the location where the Real number will be placed Parameter DL405 Range Value WORD BCD VPK K0 9999 See DL405 V memory map Data Words Number of Decimal Points K0 4 Result DWORD REAL See DL405 V memory map Data Words 34 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs rn RRR BCDTOR Example In the following example the BCDTOR instruction is used to convert the 16 bit data in V2000 from a 4 digit BCD data format to a 32 bit REAL floating point data format and stored into V3000 and V3001 K2 in the Number of Decimal Points implies the data will have two digits to the right of the decimal point BCD to Real with Implied Decimal Point BCDTOR IB 560 Value WORD BCD v2000 Number of Decimal Points K2 Result DWORD REAL 3000 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B 3 5 DirectSOFT IBox Instructions for DL405 PLCs C N Double
60. 15 CTRIO st Output Function Level DeadBand Tenths of 96 Workspace Success Error DL405 PLC User Manual Supplement Box Instructions Rev B 227 DirectSOFT IBox Instructions for DL405 PLCs gm CTRIO Register Read CTRRGRD IB 1016 DS6 ONLY Used HPP N A The CTRIO Register Read Box will retrieve the value from the specified register in a CTRIO or CTRIO2 module It references the CTRIO in the CTRIO Config IBox that is controlling the CTRIO module CTRRGRD Parameters CTRIO This number corresponds to the CTRIO Register Read CTRRGRD IB 1016 CTRIO K1 Source Register 0 Ch1Fn1 Accumulator Destination Workspace Success C1 Error C2 2 CTRIO specified in the CTRIO Config IBox for the CTRIO module being used Source Register selectable option 0 Ch1Fn1 Accumulator 10 Ch2Fn1 Reset Value 1 Ch1Fn2 Accumulator 11 Ch2Fn2 Reset Value 2 Ch2Fn1 Accumulator 12 Ch1A Filter Time CTRIO2 3 Ch2Fn2 Accumulator 13 Ch1B Fi ilter Ti CTRIO2 4 OutO Position 14 Ch1C F ilter Ti CTRIO2 5 Out Position 15 Ch1D Filter Ti CTRIO2 6 Out2 Position 16 Ch2A F ilter Ti 7 Out3 Position 17 Ch2B F ilter Ti CTRIO2 8 Ch1Fn1 Reset Value 18 Ch2C F ilter Ti 9 Ch1Fn2 Reset Value 19 Ch2D Filter Ti me me me me CTRIO2
61. 32 ECOM100 Workspace 400 d Success Error co Subnet Mask 4 words V400 id e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed e Subnet Mask specifies the starting address where the ECOM100 s Subnet Mask will be placed in 4 consecutive V memory locations Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS i terea X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map Subnet Mask 4 Words See DL405 V memory map Data Words 90 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj ECRDSNM Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result statu
62. 6 bit Binary value of another particular range This IBox only works with unsigned binary values it DOES NOT work with signed binary or sign plus magnitude values The formula used is Output SCALEB Parameters gal o Scale Value Unsigned Binary SCALEB 1 509 Input WORD Unsigned Binary In Min WORD Unsigned Binary In Max WORD Unsigned Binary Out Min WORD Unsigned Binary Out Max WORD Unsigned Binary Output WORD Unsigned Binary Input InMin x OutMax OutMin i InMax InMin OutMin Input WORD Unsigned Binary The raw 16 bit Unsigned Binary value to be scaled In Min WORD Unsigned Binary The low limit 0 65535 of the Input range In Max WORD Unsigned Binary The high limit 0 65535 of the Input range Out Min WORD Unsigned Binary The low limit 0 65535 of the Output range Out Max WORD Unsigned Binary The high limit 0 65535 of the Output range Output WORD Unsigned Binary The scaled unsigned 16 bit Binary value 0 655535 Parameter DL405 Range All V Memory KO 65535 All V Memory KO 65535 All V Memory KO 65535 All V Memory KO 65535 All V Memory All User V Memory 188 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs SCALEB Example In this SCALEB example a single word unsigned binary value from a 12 bit analog card in V2000 is being sc
63. 7 from Slave K7 and write them to slave K5 as fast as possible Store them in this local PLC in C200 C207 and write them to C300 C307 in slave K5 Both the NETRX and NETWX work with the Network Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing They also provide very simplified error reporting You no longer need to worry about any SP busy bits or error bits or what port number or slot number a module is in or have any counters or shift registers or any other interlocks for resource management In this example SP1 always ON is driving both the NETRX and NETWX IBoxes in the same rung On the scan that the Network Read completes the Network Write will start that same scan As soon as the Network Write completes any pending operations below it in the program would get a turn If there are no pending NETRX or NETWX IBoxes below this IBox then the very next scan the NETRX would start its request again Using the NETRX and NETWX for all of your serial port DCM or original ECOM network reads and writes is the fastest the PLC can do networking For ECOM100 modules use the ECOM100 and ECRX ECWX IBoxes On Network RX Read 8P1 NETRX Network Workspace Slave ID From Slave Element Src Number Of Bytes To Master Element Dest Success Error Network Wx Write NETWX Network Workspace Slave ID From Master Element Src Number Of Bytes To Slave Element Dest Success Err
64. ACH ECOM100 module in your system that utilizes any ECOM IBox instructions The Workspace and Status parameters and the entire Message Buffer are internal private registers used by the ECOM100 Configuration IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program In order for MOST ECOM100 IBoxes to function you must turn ON dip switch 7 on the ECOM100 circuit board You can keep dip switch 7 off if you are ONLY using ECOM100 Network Read and Write Boxes ECRX ECWX ECOM100 Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Slot specifies which PLC slot is occupied by the ECOM100 module Status specifies a V memory location that will be used by the instruction Workspace specifies a V memory location that will be used by the instruction Msg Buffer specifies the starting address of a 65 word buffer that will be used by the module for configuration Parameter DL405 Range K0 255 K0 7 See DL405 V memory map Data Words See DL405 V memory map Data Words See DL405 V memory map Data Words 60 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nn RRR ECOM100 Example The ECOM100 Config IBox coordinates all of the interaction with
65. AN A unique ECOM100 Configuration Success co ECOM100 at the top of your program SER Aa The Body field supports what the PRINT dos and VPRINT instructions support for text Body and embedded variables allowing you to embed real time data in your EMail e g V2000 V2000 B The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the request is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 an SMPT protocol error between 100 and 999 or a PLC logic error greater than 1000 Since the ECOM100 is only an EMail Client and requires access to an SMTP Server you MUST have the SMTP parameters configured properly in the ECOM100 via the ECOM100 s Home Page and or the EMail Setup instruction ECEMSUDP To get to the ECOM100 s Home Page use your favorite Internet browser and browse to the ECOM100 s IP Address e g http 192 168 12 86 You are limited to approximately 100 characters of message data for the entire instruction including the To Subject and Body fields To save space the ECOM100 supports a hard coded list of EMail addresses for the Carbon Copy field cc so that you can configure those IN the ECOM100 and keep the To field small or even empty to leave more room for the Subject and B
66. BCD to Real with Implied Decimal Point BCDTORD IB 562 DS5 6 Used HPP N A Double BCD to Real with Implied Decimal Point converts the given 8 digit DWORD BCD value to a Real number given an implied number of decimal points K0 K8 For example BCDTORD K12345678 with MIXA o an implied number of decimal points equal to K5 would yield R123 45678 Double BCD to Real with Implied Decimal Point BCDTORD IB 562 Value DWORD BCD TAG BCDTORD Parameters Number of Decimal Points Value DWORD BCD specifies the Dword Result OWORD REAL or constant that will be converted to a Real number Number of Decimal Points specifies the number of implied decimal points in the Result DWORD Result DWORD REAL specifies the location where the Real number will be placed Parameter DL405 Range Value DWORD BCD VPK K0 99999999 See DL405 V memory map Data Words Number of Decimal Points K0 8 Result DWORD REAL See DL405 V memory map Data Words 36 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs RRR BCDTORD Example In the following example the BCDTORD instruction is used to convert the 32 bit data in V2000 from an 8 digit BCD data format to a 32 bit REAL floating point data format and stored into V3000 and V3001 K2 in the Number of Decimal Points implies the data will have two digits to the right of the
67. Box Instructions Rev B 83 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Read IP Address ECRDIP IB 722 DS5 6 Used HPP N A ECOM100 Read IP Address will read the 4 parts of the IP address and store them in 4 consecutive V Memory locations in decimal format on a leading edge transition to the IBox The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the command is complete In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECRDIP Parameters ECOM100 Read IP Address ECRDIP IB 722 ECOM100 Workspace 400 Success Error co IP Address 4 words v400 e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed IP Address specifies the starting address where the ECOM100 s IP Address will be placed in 4 consecutive V memor
68. Box utilizes a Timer resource TMRE which cannot be used anywhere else in your program OFFDTMR Parameters Timer Number specifies the Timer TMRF number which is used by the OFFDTMR instruction Off Delay Time 0 01sec specifies how long the Output will remain on once power flow to the Ibox is removed Output specifies the output that will be delayed turning off by the Off Delay Time Parameter DL405 Range T0 377 K0 9999 See DL405 V memory map Data Words DULDUE cus tees X Y C GX GY B See DL405 V memory map 22 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs TERRE OFFDTMR Example In the following example the OFFDTMR instruction is used to delay the turning off of output C20 Timer 2 T2 is set to 5 seconds the off delay period When C100 turns on C20 turns on and will remain on while C100 is on When C100 turns off C20 will remain for the specified Off Delay Time 5s and then turn off Off Delay Timer IBS OFFDTMR Timer Number Off Delay Time 0 01 sec Output Example timing diagram C100 5 sec 5 sec DL405 PLC User Manual Supplement Box Instructions Rev B 23 DirectSOFT IBox Instructions for DL405 PLCs C On Delay Timer ONDTMR IB 301 DS5 6 Used HPP N A On Delay Timer will delay the turning on of the Output parameter by the specified amount o
69. C GX GY B All Bit Memory EMOT ceva eaitdvn sures oe ena X Y C GX GY B All Bit Memory Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute CTRIO Edit Level CTRELVL CTRIO Output Function Level DeadBand Tenths of Workspace Success Error 1B 1015 ON when greater than Level Rate setting K1000 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes 226 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTRELVL Example Rung 1 This sets up the CTRIO module in slot 2 of the base Each CTRIO module in the system will need a separate CTRIO Config Box before any CT Rxxxx Boxes can be used The CTRIO has been configured to use V2000 through V2025 for its input data and V2100 through V2131 for its output data Workspace Input V2000 V2025 Output V2100 V2131 Rung 2 This rung is a sample method for configuring the level behavior of a CTRIO output Turning on CO will cause the CTRELVL instruction to set the first output of the module to ON when the level setting of K1000 is exceeded If the level request is successful C1 will turn ON If the level request fails C2 will turn ON co J CTRIO Edit Level CTRELVL 1B 10
70. C can do networking For ECOM100 modules use the ECOM100 and ECRX ECWX IBoxes On Network RX Read SP1 NETRX Network Workspace Slave ID From Slave Element Src Number Of Bytes To Master Element Dest Success Error Network Wx Write NETX Network Workspace Slave ID From Master Element Src Number Of Bytes To Slave Element Dest Success Error 114 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs mm Network WX Write NETWX IB 702 DS5 6 Used Network WX Write performs the WX instruction with built in interlocking with all other HPP wa Network RX NETRX and Network WX NETWX Boxes in your program to simplify communications networking It will perform the WX on the specified Network which corresponds to a specific unique Network Configuration NETCFG at the top of your program The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Whenever this IBox has power it will write data from the master s V memory buffer to the specified slave starting with the given slave element giving other Network RX and Network WX IBoxes on that Network a chance to execute For example if you wish to read and write data continuously from 5 different slaves you can have all of these NETRX and NETWX
71. CP will setup the ECOM100 to use its internal TCP IP settings on a leading edge transition to the IBox To configure the ECOM100 s TCP IP settings manually use the NetEdit3 utility or you can do it programmatically from your PLC program Lv Jas o using the ECOM100 IP Setup ECIPSUP or ECOM100 Disable DHCP the individual ECOM100 IBoxes ECOM ECDHCPD IB 736 Write IP Address ECWRIP ECOM Write ECOM100 Gateway Address ECWRGWA and WO TTT ECOM100 Write Subnet Mask ioci oes ECWRSNM Success Error co The Workspace parameter is an internal private register used by this IBox and MUST Error Code V400 BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Fither the Success or Error bit parameter will turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Disable DHCP setting is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this Box ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SP0 STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board
72. CTRIO CTREDPT mE Edit and Reload Preset Table Entry CTRIO 3 7 CTREDRL IBox This IBox will take more d Sm than 1 PLC scan to execute Either the Entys 0 based ViOO Success or Error bit will turn on when the Entry Type V400 command is complete If the Error Bit is on E ac you can use the CTRIO Read Error Code nee o CTRRDER IBox to get extended error Success co information EDO e Entry Type KO Set K1 Reset K2 Pulse On uses Pulse Time K3 Pulse Off uses Pulse Time K4 Toggle K5 Reset Count Note that the Pulse Time parameter is ignored by some Entry Types The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTREDPT Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Table specifies the Table number of which an Entry is to be edited Entry specifies the Entry location in the Preset Table to be edited Entry Type specifies the Entry Type to add during the edit Pulse Time specifies a pulse time for the Pulse On and Pulse Off Entry Types Preset Count specifies an initial count value to begin at after Reset Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies
73. Cxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan disable DHCP in the ECOM100 DHCP is the same protocol used by PCs for using a DHCP Server to automatically assign the ECOM100 s IP Address Gateway Address and Subnet Mask Typically disabling DHCP is done by assigning a hard coded IP Address either in NetEdit or using one of the ECOM100 IP Setup IBoxes but this IBox allows you to disable DHCP in the ECOM100 using your ladder program The ECDHCPD is leading edge triggered not power flow driven similar to a counter input leg The command to disable DHCP will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 Disable DHCP SPO ECDHCPD ECOM100 Workspace Success Error Error Code DL405 PLC User Manual Supplement Box Instructions Rev B 63 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Enable DHCP ECDHCPE IB 735 DS5 6 Used HPP N A ECOM100 Enable DHCP will tell the ECOM100 to obtain its TCP IP setup from a DHCP Server on a leading edge transition to the IBox
74. DGWA Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config Ecom100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan read the Gateway Address of the ECOM100 and store it in V3000 thru V3003 4 decimal numbers The ECOM100 s Gateway Address could be displayed by an HMI The ECRDGWA is leading edge triggered not power flow driven similar to a counter input leg The command to read the Gateway Address will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 _FirstScan ECOM100 Read Gateway Address SPO ECRDGWA IB 730 ECOM100 KO Workspace v503 Success C100 Error C101 Gateway IP Addr 4 words 3000 v3003 DL405 PLC User Manual Supplement
75. DL405 IBox Instructions PLC User Manual Supplement Manual Number DL405 IBOX S M WARNING YW Thank you for purchasing automation equipment from Automationdirect com M doing business as AutomationDirect We want your new automation equipment to operate safely Anyone who installs or uses this equipment should read this publication and any other relevant publications before installing or operating the equipment To minimize the risk of potential safety problems you should follow all applicable local and national codes that regulate the installation and operation of your equipment These codes vary from area to area and usually change with time It is your responsibility to determine which codes should be followed and to verify that the equipment installation and operation is in compliance with the latest revision of these codes At a minimum you should follow all applicable sections of the National Fire Code National Electrical Code and the codes of the National Electrical Manufacturer s Association NEMA There may be local regulatory or government offices that can also help determine which codes and standards are necessary for safe installation and operation Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and standards We do not guarantee the products described in this publication are suitable for your particular application nor do we assume any responsibility for your produ
76. E Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Timeout sec specifies a timeout period so that the instruction may have time to complete Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Parameter DL405 Range ECOM100 K0 255 Timeout sec K5 127 Workspace See DL405 V memory map Data Words SUCCESS 0 0 cee ee eee X Y C GX GY B See DL405 V memory map EITOE sie oe tesieni as X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words 64 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs RRR ECDHCPE Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status registe
77. Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECEMRDS Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS ML X Y C GX GY B See DL405 V memory map EITOE eed des X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words DL405 PLC User Manual Supplement Box Instructions Rev B 7 DirectSOFT IBox Instructions for DL405 PLCs C ECEMRDS Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you onl
78. F if the Read Error Code fails Error This BIT will be OFF if the Read Error Code succeeds and ON if the Read Error Code fails Slave The number of the ERM Slave to Read the Error Codes from This number is the order in which they appear in the ERM network configuration in ERM Workbench Number of Slots The number of Slots in the specified ERM slave Error Code Buffer The first of the consecutive V Memory registers where the ERM Error code values will be stored The status buffer consumes 4 V Memory locations one V Memory location for each Slot as specified above Parameter DL405 Range K0 255 All User V Memory SUCCESS 0 eee ee eee X Y C GX GY B All Bit Memory Jin couture ea bael dedi be X Y C GX GY B All Bit Memory K1 16 Number of Slots K1 32 Error Code Buffer All User V Memory 2 18 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nn d M M The Error Code Buffer stores error information in the following sequence Word Offset Name Description The current error code reported by the Slave Bits 0 11 Error Code Bit 12 ON 1 0 Error Bit 13 ON 1 0 Warning Bit 14 n a Bit 15 n a Module Slot 0 15 ror slots 0 15 the 1 0 slot that has a module reporting Module Slot 16 31 Sain ki d 1 0 slot that has a module S The previous error c
79. FILTERD Parameters Filter Freq Timer The PLC Timer used to generate the calculation time intervals Filter Freq Time 0 01 sec The timer preset value in tens of milliseconds BCD which specifies the rate at which the calculations take place Raw Data BCD Double The first V Memory of two successive V Memory locations where the 32 bit BCD input data value is stored Filter Divisor This value specifies the amount of desired lag BCD Filter Value BCD Double The first V Memory of two successive V Memory locations where the new 32 bit filtered output value will be stored Parameter DL405 Range Filter Freq Timer TO T377 Filter Fred TIME ce ense creme etn VK K0 9999 All V Memory All V Memory Filter DIVISO i irent VK K1 100 All V Memory Filter Value All V Memory 158 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs FILTERD Example In the following example the FILTERD instruction is used to filter a double word BCD value that is in V2054 V2055 Timer T1 is set to 0 5 sec the rate at which the filter calculation will be performed The filter constant is set to 2 A larger value will increase the smoothing effect of the filter A value of 1 results in no filtering The filtered value will be placed in V2056 V2057 _On SP1 Filter Over Time BCD Double 1 ee FILTERD 1B 425 Filter Freq Timer T1 Filt
80. IBoxes in the ladder program ERM Config IBox requirements If you wish to use any of the ERM IBoxes you must have an ERM Config IBox for each 28 ERM and ERM100 module in the system The ERM Config IBox must be located at the top of the ladder or stage program The ERM Config Box is always ON so it can not have any input logic This Box must be in a section of the ladder program that is always enabled so do not place it in a Stage or a subroutine that will ever be disabled The ERM specific Boxes require that DIP switch 7 be set ON ERM Parameters e ERM A reference number or resource number used to uniquely identify the ERM network Slot Identifies which slot contains the ERM or ERM100 module Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Parameter DL405 Range KO 255 K0 7 All User V Memory B Note No input logic is allowed on the rung with this IBox 2 16 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs ERM Example Rung 1 The ERM Config IBox is responsible for coordination interlocking of all ERM type IBoxes for one specific ERM module Tag the ERM in slot 1 as ERM K1 All other ERxxxx IBoxes refer to this module as K1 If you need to move the module in the base to a different slot then you only need to change this one IBox 1 ERM Config
81. If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 Enable DHCP SPO ECDHCPE IB 735 ECOM100 KO Timeout sec K10 Workspace v503 Success C100 Error C101 Error Code v2000 DL405 PLC User Manual Supplement Box Instructions Rev B 65 DirectSOFT IBox Instructions for DL405 PLCs ECOM100 Query DHCP Setting ECDHCPQ IB 734 DS5 6 Used HPP N A ECOM100 Query DHCP Setting will determine if DHCP is enabled in the ECOM100 ona leading edge transition to the IBox The DHCP Enabled bit parameter will be ON if DHCP is enabled OFF if disabled The Workspace parameter is an internal AA J E private register used by this IBox and MUST EEEL ULES EISEN BE UNIQUE in this one instruction and ECDHCPQ IB 734 MUST NOT be used anywhere else in your ECOM100 KO propran Workspace Fither the Success or Error bit parameter will Success co turn on once the command is complete Error CD s In order for this ECOM100 IBox to function DHCP Enabled CO 5 you must turn ON dip switch 7 on the ECOM100 circuit board ECDHCPQ Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the ins
82. LC User Manual Supplement Box Instructions Rev B 1 15 DirectSOFT IBox Instructions for DL405 PLCs rm ppc M W 2 NETWX Example Rung 1 The Network Configuration IBox coordinates all of the interaction with other Network IBoxes NETRX NETWX You must have a Network Configuration IBox for each serial port network DCM module network or original ECOM module network in your system Configuration IBoxes must be at the top of your program and must execute every scan This IBox defines Network KO to be for the local CPU serial port 2 KF2 For local CPU serial ports or DCM ECOM modules use the same value you would use in the most significant byte of the first LD instruction in a normal RX WX rung to reference the port or module Any NETRX or NETWX IBoxes that need to reference this specific network would enter KO for their Network parameter The Workspace register is used to maintain state information about the port or module along with proper sharing and interlocking with the other NETRX and NET WX Boxes in the program This V memory register must not be used anywhere else in the entire program Network Config 1 NETCFG Network CPU Part or Slot ex KF2 or K3 Workspace example continued on next page 16 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs TN _ NETWX Example cont Rung 2 Using Network KO read X0 X
83. LM Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Frequency specifies the output pulse rate 20Hz 20KHz Limit the CTRIO s Input s must be configured as Limit s for this function to operate Duty Cycle specifies the 96 of on time versus off time This is a hex number Default of 0 is 50 also entering 50 will yield 5096 5096 duty cycle is defined as on half the time and off half the time Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully DL405 PLC User Manual Supplement Box Instructions Rev B 147 DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K20 20000 See DLA05 V memory map Data Words KO FF See DL405 V memory map Data Words K0 99 See DLA05 V memory map Data Words See DL405 V memory map Data Words SUCCESS cessit ose trn X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map CTRRTLM Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CTRxxxx I boxes can be used for them The CTRIO has been conf
84. MID is leading edge triggered not power flow driven similar to a counter input leg The command to read the module ID will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 _FirstScan ECOM100 Read Module ID SPO ECRDMID ECOM100 x Workspace Success Error Module ID DL405 PLC User Manual Supplement Box Instructions Rev B 87 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Read Module Name ECRDNAM IB 724 DS5 6 Used ECOM100 Read Name will read the Module Name up to the number of specified characters HPP N A on a leading edge transition to the IBox The Workspace parameter is an internal JT o private register used by this IBox and MUST BE UNIQUE in this one instruction and Bg OM IH ean Maric MUST NOT be used anywhere else in your oe RT i ECOM100 Fither the Success or Error bit parameter will s RD turn on once the command is complete Eoi i rror co f In order for this ECOM100 IBox to function f Module Name V400 you must turn ON dip switch 7 on the RUE ECOM100 circuit board ECRDNAM Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location
85. Memory Ji send cdi toe otaheaedleds X Y C GX GY B All Bit Memory Error Code cete ds X Y C GX GY B All Bit Memory PEERLINK Pause nme VK K0 1 All User V Memory 2 14 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs One of these Bits is guaranteed to be ON after the IBox execution is complete These BITs will retain their B Note When the ECWRPLPA IBox is allowed to execute the Success and Error BITs are both set to OFF ON OFF value until the IBox is executed again Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute ECOM100 Write PEERLINK Pause ECWRPLPA IB 743 ECOM100 K1 Workspace V503 Success C1 Error C2 Error Code v504 PEERLINK Pause K1 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes ECWRPLPA Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM 100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 3 as ECOM100 K1 All other ECxxxx IBoxes refer to this module as K1 If you need to move the module in the base to a different slot then you only need to change this one IBox V1501 is used as a global result status register for the other ECxxxx
86. N A on da operation on the specified CTRIO poii z si ly pus Output X2 The specified CTRIO Output must already be Frequency configured as a Pulse Output and the specified Input Limit KO must already be configured as a Limit This Duty Cycle K50 J configuration is done via CTRIO Workbench Workspace S C2 The CTRIO Run To Limit Mode IBox will take E multiple PLC scans to complete Each time this IBox Error Code is triggered it will run to completion exactly one time It will start running on the rising edge of the input circuit and once triggered it will run to completion Any rising edges generated before the IBox completes will be ignored The IBox is complete when the either the Success bit or Error bit are set ON It references the CTRIO in the CTRIO Config IBox that is controlling the CTRIO module CTRRTLM2 Parameters CTRIO This number corresponds to the CTRIO specified in the CTRIO Config IBox for the CTRIO module being used Output Identifies which CTRIO Output to configure Frequency Specifies the pulse output frequency in Hertz Limit Specifies which CTRIO Input resource is the m Limit and which level of that Limit to use See the table cee on right for a list of the valid Limit values EIUS HIQRAON B Chi C Low OFF Duty Cycle Specifies the duty cycle of the output Ch1 D High ON pulses 0 50 Ch1 D Low OFF Workspace A V Memory register that is used int
87. NCBYBIN Example In this example the INCBYBIN instruction will add the value K10 to the binary value in V2100 on every scan that CO is ON co Increment by Binary INCBYBIN IB 505 Increment WORD Binary v2100 By WORD Binary K10 DL405 PLC User Manual Supplement Box Instructions Rev B 20 DirectSOFT IBox Instructions for DL405 PLCs i a n a Y Increment By Binary Double INCBYBIND IB 506 DS6 is The Increment By Binary Double IBox will o ONLY add the By DWORD Binary Value to the Increment by Binary Double HPP N A Increment DWORD Binary Value on each INCBYBIND 1B 506 scan the instruction is enabled Increment OWORD Binary By DWORD Binary INCBYBIND Parameters Increment DWORD Binary The V Memory location where the 32 bit Binary Double decimal value is located 28 By DWORD Binary The DWORD Binary decimal value to add Parameter DL405 Range All V Memory KO 4294967295 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP66 On when the 16 bit addition instruction results in a carry SP67 On when the 32 bit addition instruction results in a carry SP70 On anytime the value in the accumulator is negative SP73 On when a signed addition or subtraction results in an incorrect sign bit 202 DL405 PLC User Manual Supplement Box Instruc
88. OFF to ON this instruction will execute With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes Rung 1 This sets up the CTRIO module in slot 2 of the base Each CTRIO module in the system will need a separate CTRIO Config Box before any CT Rxxxx Boxes can be used The CTRIO has been configured to use V2000 through V2025 for its input data and V2100 through V2131 for its output data CTRIO Config CTRIO 1B 1000 CTRIO K1 Slot Local K2 Workspace v1400 Input V2000 V2025 Output V2100 V2131 Rung 2 This CTRIO Run To Limit Mode 2 IBox sets up Output 2 in CTRIO 1 to output pulses at a Frequency of 1000 Hz with a 5096 Duty Cycle until Limit 0 comes ON CTRIO Run To Limit Mode 2 CTRRTLM2 1B 1019 CTRIO K1 Output K2 Frequency K1000 Limit KO Duty Cycle K50 Workspace V402 Success c2 Error C3 Error Code V3001 DL405 PLC User Manual Supplement Box Instructions Rev B 23 5 DirectSOFT IBox Instructions for DL405 PLCs CTRIO Run to Position Mode 2 CTRRTPM2 IB 1020 DS6 ONLY Used HPP N A 236 i The CTRIO Run to Position Mode 2 IBox will setup TT o the CTRIO or CTRIO2 module to perform a Run to CTRIO Run To Position Mode 2 Position Mode operation on the specified CTRIO isi ia EM CTRIO s K1 output Output k2 The specified CTRIO Output must already be Frequency configured as a Pulse Out
89. OM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRMID Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Module ID specifies the Module ID that will be written to the module DL405 Range Parameter K0 255 See DL405 V memory map Data Words SUCCESS iiis sus ss eausa X Y C GX GY B See DL405 V memory map ENRON err soe pas X Y C GX GY B See DL405 V memory map Error Code See DL405 V memory map Data Words K0 65535 98 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs RRR ECWRMID Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to
90. ON inm espe X Y C GX GY B See DL405 V memory map 104 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E ECRX Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx IBoxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx IBoxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM 100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 105 DirectSOFT IBox Instructions for DL405 PLCs ee ECRX Example con t Rung 2 Using ECOM100 KO read X0 X7 from Slave K7 and write them to slave K5 as fast as possible Store them in this local PLC in C200 C207 and write them to C300 C307 in slave K5 Both the ECRX and ECWX work with the ECOM100 Config Box to simplify all networking by handling all of the
91. P R R See DL405 V memory map Data Words Number of Decimal Points K0 4 Result WORD BCD See DL405 V memory map Data Words Bo DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M RTOBCD Example In the following example the RTOBCD instruction is used to convert the 32 bit REAL floating point data format in V3000 and V3001 to the 4 digit BCD data format and stored in V2000 K2 in the Number of Decimal Points implies the data will have two implied decimal points Real to BCD wilmplied Decimal Pt and Rounding RTOBCD IB 561 Value DWORD Real v3000 v3001 Number of Decimal Points Result WORD BCD DL405 PLC User Manual Supplement Box Instructions Rev B 45 DirectSOFT IBox Instructions for DL405 PLCs ee Real to Double BCD with Implied Decimal Point and Rounding RTOBCDD IB 563 DS5 6 Used Real to Double BCD with Implied Decimal HPP N A Point and Rounding converts the absolute value of the given Real number to an 8 digit DWORD BCD number compensating for TASTE an implied number of decimal points K0 Real to Double BCD wilmplied Decimal Pt and Rounding K8 and performs rounding RTORCDD Eres Value DWORD Real For example RTOBCDD R38156 74 with Number of Decimal Points an implied number of decimal points equal Result DWORD BCD to K1 would yield 381567 BCD If the implied number of decimal points w
92. PLC User Manual Supplement IBox Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR Communication IBoxes Instruction ECOM100 Read PEERLINK Status ECRDPL ECOM100 Write PEERLINK Pause ECWRPLPA ERM Config ERM ERM Read Slave Error Codes ERMSLAVE ERM Read Status ERMSTATS Counter 1 0 IBoxes Instruction CTRIO Edit Level CTRELVL CTRIO Register Read CTRRGRD CTRIO Register Write CTRRGWR CTRIO Velocity Mode 2 CTRVEL2 CTRIO Run to Limit Mode 2 CTRRTLM2 CTRIO Run to Position Mode 2 CTRRTPM2 DL405 PLC User Manual Supplement Box Instructions Rev B 9 DirectSOFT IBox Instructions for DL405 PLCs ee Analog Scale 12 Bit BCD to BCD ANSCL IB 423 DS5 6 Used HPP N A Analog Scale 12 Bit BCD to BCD scales a 12 bit BCD analog value 0 4095 BCD into BCD engineering units You specify the engineering unit high value when raw is 4095 and the engineering low value when raw is 0 and the output V memory address you want the to place the scaled engineering unit value The engineering units are generated as BCD and can be the full range of 0 to 9999 see ANSCLB Analog Scale 12 Bit Binary to Binary if your raw units are in Binary format Note that this Box only works with unipolar unsigned raw values It does NOT work with bipolar or sign plus magnitude raw values ANSCL Parameters
93. QUAREB IB 503 Result DWORD Binary specifies the Value NORD binary TAO location where the squared DWORD binary Result DWORD binan V400 value will be placed Parameter DL405 Range Value WORD Binary VPK K0 65535 See DL405 V memory map Data Words Result DWORD Binary See DL405 V memory map Data Words 50 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs a M SQUAREB Example In the following example the SQUAREB instruction is used to square the single word Binary value in V2000 and store the 8 digit double word Binary result in V3000 and V3001 Square Binary SQUAREB Value WORD binary Result DWORD binar 3000 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B 5 1 DirectSOFT IBox Instructions for DL405 PLCs eee Square Real SQUARER IB 543 DS5 6 FUsed Square Real squares the given REAL DWORD number and writes it to REAL DWORD HPP N A result SQUARER Parameters Jo 8 9 e Value REAL DWORD specifies the Real Square Real DWORD location or number that will be SQUARER IB 543 squared Value REAL DWORD TAQ d Result REAL DWORD specifies the Result REAL DWORD v400 location where the squared Real DWORD value will be placed Parameter DL405 Range V
94. R REE RTOBINS Example In the following example the RTOBINS instruction is used to convert the real value R3 14159 to a signed binary number which is stored in V2172 K4 in the decimal points implies that the data will have four digits to the right of the decimal point The resulting value in V2172 is 31416 On SP1 Real to Signed Binary w Implied Decimal Pt and Rounding 1 ROBINS IB 569 Value DWORD Real R3 14159 Number of Decimal Points Result WORD Signed Binary DL405 PLC User Manual Supplement Box Instructions Rev B 185 DirectSOFT IBox Instructions for DL405 PLCs Real to Double Signed Binary with Implied Decimal Point and Rounding RTOBINSD IB 571 DS6 The Real to Double Signed Binary with v o onty Used Implied Decimal Point and Rounding IBox Real to Double Signed Binary wilmplied Decimal Pt and Rounding f RTOBINSD 1B 571 HPP N A converts the 32 bit real number to a 32 bit ee Signed Binary decimal value compensating Number of Decimal Points for an implied number of decimal points then Result DWORD Signed Binary rounding the number up if needed Example R123456 78 with the Number of Decimal Points set to K2 would yield the value 12345678 If the Number of decimal Points is set to KO this IBox would yield the value 123457 the 6 is rounded up RTOBINSD Parameters Value DWORD Real The first V Memory location where the 32 bit Real floating point valu
95. RDS IBox If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code EStop Pushed C11 ECOM100 EMail Setup ECEMSUP IB 71 ECOM100 KO Workspace 503 Success c100 Error C101 Error Code 2000 SMTP Server IP Addr Sender Name Sender Email Port Number Timeout sec Cc president acme com Rung 3 Once the EStop is pulled out take the president off the cc list by restoring the default EMail setup in the ECOM100 EStop Pushed C11 DL405 PLC User Manual Supplement Box Instructions Rev B 71 ECOM100 Restore Default EMail Setup ECEMRDS ECOM100 Workspace Success Error Error Code DirectSOFT IBox Instructions for DL405 PLCs BR MM MM m M ECOM100 IP Setup ECIPSUP IB 717 DS5 6 Used HPP N A ECOM100 IP Setup will configure the three TCP IP parameters in the ECOM100 IP Address Subnet Mask and Gateway Address on a leading edge transition to the IBox The ECOM100 is specified by the ECOM100 JAA e which corresponds to a specific unique FALSE MR etu ECOM100 Configuration ECOM100 IBox ee er at the top of your program ECOM100 The Workspace parameter is an internal Workspace private register used by this IBox and MUST i EL rror BE UNIQUE in this one instruction and ii MUST NOT be used anywhere else in yo
96. RL IB 1002 CTRIO Output Table Entry 0 based Entry Type Pulse Time Preset Count Workspace Success Error example continued on next page 13 2 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTREDRL Example cont Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 OUT Rung 4 This rung allows the operator to enable output 0 from the ladder code enable output 0 C2 B2056 0 OUT DL405 PLC User Manual Supplement Box Instructions Rev B 133 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Initialize Preset Table CTRINPT IB 1004 DS5 6 Used CT RIO Initialize Preset Table on a leading edge transition to this IBox will create a single HPP N A entry Preset Table in memory but not as a file on a specific CTRIO Output resource This IBox will take more than 1 PLC scan to o execute Either the Success or Error bit will CTRIO Initialize Preset Table turn on when the command is complete If CTRINPT 1B 1004 the Error Bit is on you can use the CTRIO SAISIR ko Read Error Code CTRRDER Box to get Enid K0 ntyType a 1 1 7 extended error information PulseTime van Entry Type PresetCount v400 J Workspace v00 KO Set Success co 7 K1 Reset Erer co K2 Pulse On uses Pulse Time K3 Pulse Off uses Pu
97. Run To Position Mode parameters are OK set the Direction Bit and Enable the output CTRRTPM Success Out 0 Direction C100 QUT 3 Out Enable B2056 f OUT 152 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E CTRIO Velocity Mode CTRVELO IB 1013 DS5 6 Used HPP N A This Box will take more than 1 PLC scan to execute Either the Success or Error bit will turn on when the command is complete If the Error Bit is on you can use the CTRIO Read Error Code CTRRDER IBox to get extended error information The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRVELO Parameters CTRIO Velocity Mode loads the Velocity command and given parameters on a specific Output resource on a leading edge transition to this IBox o CTRIO Velocity Mode CTRVELO IB 1013 CTRIO KO Output KO bs Frequency van 1 7 Duty Cycle van 11 7 Step Count van 1 7j Workspace V400 ki Success co i Error co bd e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Frequency specifies the output pulse rate 20Hz 20KHz Duty Cycle specifies the of on time versus off time This is a hex number Default of 0 is 50 also entering 50 will
98. TORD 1B 566 Value DWORD Unsigned Binary Number of Decimal Points Result DWORD REAL Value DWORD Unsigned Binary The first V Memory location where the 32 bit Unsigned Binary decimal value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Real The first V Memory location where the 32 bit Real floating point result will be stored Parameter DL405 Range VETT TE VKP KO 4294967295 All P Memory All User V Memory Number of Decimal Points K0 10 All User V Memory 176 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs BINTORD Fxample In the following example the BINTORD instruction is used to convert the double word binary value stored in V2160 V2161 to a 32 bit real number which is stored in V2164 V2165 K4 in the decimal points implies that the data will have four digits to the right of the decimal point SP1 Unsigned Double Binary to Real with Implied Decimal Point 1 IB 566 Value DWORD Unsigned Binary V2160 V2161 Number of Decimal Points K4 Result DWORD REAL V2164 V2165 DL405 PLC User Manual Supplement Box Instructions Rev B 177 DirectSOFT IBox Instructions for DL405 PLCs H Signed Double Binary to Real with Implied Decimal Point BINSTORD IB 570 DS6 ONL
99. TRIO 1 to output 10 000 pulses at a Frequency of 1000 Hz This example program requires that you load CTRVELO IBox cwb into your Hx CTRIO module CTRIO Velocity Mode diris LO CTRVELO IB 1013 CTRIO Output Frequency Duty Cycle Step Count Workspace Success Error example continued on next page 154 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTRVELO Example con t Rung 3 If the Velocity Mode parameters are OK set the Direction Bit and Enable the output CTRVELO Success Out 0 Direction C100 B2056 4 OUT Out 0 Enable B2056 0 OUT DL405 PLC User Manual Supplement IBox Instructions Rev B 155 DirectSOFT IBox Instructions for DL405 PLCs CTRIO Write File to ROM CTRWFTR IB 1006 Ds5 6 Used C TRIO Write File to ROM writes the runtime changes made to a loaded CTRIO Preset HPP N A Table back to Flash ROM on a leading edge transition to this IBox Writing Preset Table changes to ROM can prevent them from being lost during a power cycle This Box ixe E will take more than 1 PLC scan to execute CTRIO Write File to ROM Either the Success or Error bit will turn on CTRWFTR IB 1006 when the command is complete If the Error CTRIO Bit is on you can use the CTRIO Read Error Output KO Code CTRRDER IBox to get extended Workspace error information Success co The Workspace register is for internal us
100. UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the command is complete In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECRDGWA Parameters 5 ECOM100 Read Gateway Address ECRDGWA IB 730 ECOM100 Workspace 400 Success Error co id Gateway IP Addr 4 words 400 ig e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Gateway IP Addr specifies the starting address where the ECOM100 s Gateway Address will be placed in 4 consecutive V memory locations Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS esses X Y C GX GY B See DL405 V memory map EITOE er ede t ata X Y C GX GY B See DL405 V memory map Gateway IP Address 4 Words See DL405 V memory map Data Words 82 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj ECR
101. User Manual Supplement Box Instructions Rev B
102. Y Used HPP N A The Signed Double Binary to Real with Implied Decimal Point IBox converts the given 32 bit Signed Binary decimal value to a 32 bit real number given an implied number of decimal points Example K12345678 with the Number of Decimal Points set to K5 would yield R123 45678 BINSTORD Parameters efs Signed Double Binary to Real with Implied Decimal Point BINSTORD IB 570 Value DWORD Signed Binary Number of Decimal Points K4 Result DWORD REAL Value DWORD Signed Binary The first V Memory location where the 32 bit Signed Binary decimal value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Real The first V Memory location where the 32 bit Real floating point result will be stored Parameter DL405 Range VETT TE VKP KO 2147483647 All P Memory All User V Memory Number of Decimal Points K0 10 All User V Memory 178 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs BINSTORD Example In the following example the BINSTORD instruction is used to convert the signed double word binary value stored in V3000 V3001 to a 32 bit real number which is stored in V3002 V3003 K4 in the decimal points implies that the data will have four digits to the right of the dec
103. a Network Configuration IBox for each serial port network DCM module network or original ECOM module network in your system Configuration IBoxes must be at the top of your program and must execute every scan This IBox defines Network KO to be for the local CPU serial port 2 KF2 For local CPU serial ports or DCM ECOM modules use the same value you would use in the most significant byte of the first LD instruction in a normal RX WX rung to reference the port or module Any NETRX or NETWX IBoxes that need to reference this specific network would enter KO for their Network parameter The Workspace register is used to maintain state information about the port or module along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the program This V memory register must not be used anywhere else in the entire program Network Config CPU Port or Slot ex KF2 or K3 Workspace DL405 PLC User Manual Supplement Box Instructions Rev B 1 1 DirectSOFT IBox Instructions for DL405 PLCs eee Network RX Read NETRX IB 701 DS5 6 Used Network RX Read performs the RX instruction with built in interlocking with all other HPP WA Network RX NETRX and Network WX NETWX Boxes in your program to simplify communications networking It will perform the RX on the specified Network which z corresponds to a specific unique Network E pix bain EH Configuration NETCFG at the top of you
104. a bit that will turn on if the instruction does not complete successfully 126 l D1405 PLC User Manual Supplement IBox Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K0 255 See DL405 V memory map Data Words K0 255 See DL405 V memory map Data Words K0 5 See DL405 V memory map Data Words Pulse Time K0 65535 See DL405 V memory map Data Words Preset Count f K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words SUCCESS iusso ket X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map CTREDPT Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config 1 CTRIO IB 1000 CTRIO Slot Workspace Input v2000 v2025 Output 2030 2061 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 127 DirectSOFT IBox Instructions for DL405 PLCs eee CTREDPT Example cont Rung 2 This rung is a sample method for enabling the CTREDPT command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on C0 will cause the CTREDPT instruction to change the seco
105. ace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully Parameter DL405 Range K0 255 K0 3 See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map ENOL Sehcichleces cusdecbiek X Y C GX GY B See DL405 V memory map DL405 PLC User Manual Supplement Box Instructions Rev B 123 DirectSOFT IBox Instructions for DL405 PLCs eee CTRCLRT Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CTRxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO CTRIO Slot Workspace Input 2000 v2025 Output 2030 V20B1 Rung 2 This rung is a sample method for enabling the CTRCLRT command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on CO will cause the CTRCLRT instruction to clear the preset table for output 0 on the CTRIO in slot 2 Operating procedure for this example code is to load the CTRCLRT ex1 cwb file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2
106. ad CTRRDER IBox cwb into your Hx CTRIO module CTRIO Read Error Code Read Error Code CTRRDER IB 1014 co CTRIO Workspace Error Code 146 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs S CTRIO Run to Limit Mode CTRRTLM IB 1011 DS5 6 Used HPP N A CTRIO Run To Limit Mode on a leading edge transition to this IBox loads the Run to Limit command and given parameters on a specific Output resource The CTRIO s Input s must be configured as Limit s for this function to work ETT 9 CTRIO Run To Limit Mod Valid Hexadecimal Limit Values CTRRTLM ibid et K00 Rising Edge of Ch1 C CTRIO K10 Falling Edge of Ch1 C PIDE Ka Frequency K20 Both Edges of Ch1 C Limit K01 Rising Edge of Ch1 D Duty Cycle S Workspace V400 K11 Falling Edge of Ch1 D sede K21 Both Edges of Ch1 D Error co K02 Rising Edge of Ch2 C K12 Falling Edge of Ch2 C K22 Both Edges of Ch2 C K03 Rising Edge of Ch2 D K13 Falling Edge of Ch2 D K23 Both Edges of Ch2 D This IBox will take more than 1 PLC scan to execute Either the Success or Error bit will turn on when the command is complete If the Error Bit is on you can use the CTRIO Read Error Code CTRRDER IBox to get extended error information The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRRT
107. al Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M ECWRIP Fxample Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx IBoxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx IBoxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx IBoxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan assign the IP Address of the ECOM100 to 192 168 12 100 The ECWRIP is leading edge triggered not power flow driven similar to a counter input leg The command to write the IP Address will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code To configure all of the ECOM100 TCP IP parameters in one IBox see the ECOM100 IP Setup ECIPSUP IBox _FirstScan ECOM100 Write IP Address SP0
108. aled from the 0 4095 raw value to 0 100 engineering units and the result is being stored in V2100 as a single word unsigned binary value For example if V2000 has a value of 2048 then the resulting value stored in V2100 is 50 On SP1 Scale Value Unsigned Binary 1 eo sCALEB Input WORD Unsigned Binary In Min WORD Unsigned Binary In Max WORD Unsigned Binary Out Min WORD Unsigned Binary Out Max WORD Unsigned Binary Output WORD Unsigned Binary DL405 PLC User Manual Supplement Box Instructions Rev B 189 DirectSOFT IBox Instructions for DL405 PLCs eee Decrement By Binary DECBYBIN IB 507 The Decrement By Binary IBox will subtract Vice o DS6 onty 5 the By WORD Binary Value from the Decrement by Binary HPP N A Decrement WORD Binary Value on each DECBYBIN IB 507 scan the instruction is enabled DEC PME NOCET By WORD Binary DECBYBIN Parameters Decrement WORD Binary The V Memory location where the 16 bit Binary decimal value is located 28 By WORD Binary The WORD Binary decimal value to subtract DL405 Range Parameter All V Memory KO 65535 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP64 On when the 16 bit subtraction instruction results in a borrow SP65 On when the 32 bit subtraction instruction results in a borrow SP70 On anytime the
109. alue REAL DWORD V P R R See DL405 V memory map Data Words Result REAL DWORD See DL405 V memory map Data Words 52 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M SQUARER Fxample In the following example the SQUARER instruction is used to square the 32 bit floating point REAL value in V2000 and V2001 and store the REAL value result in V3000 and V3001 Square Real SQUARER IB 543 Value REAL DWORD 2000 v2001 Result REAL DWORD v30 00 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B 53 DirectSOFT IBox Instructions for DL405 PLCs eee Sum BCD Numbers SUMBCD IB 522 DS5 6 Used HPP N A Sum BCD Numbers sums up a list of consecutive 4 digit WORD BCD numbers into an 8 digit DWORD BCD result You specify the group s starting and ending V memory addresses inclusive When enabled this instruction will add up all the numbers in the group so you may want to place a differential contact driving the enable SUMBCD could be used as the first part of calculating an average SUMBCD Parameters Lv JA T3 Sum BCD Numbers SUMBCD IB 522 Start Address End Addr inclusive 400 Result DWORD BCD Start Address specifies the starting address of a block of V memory location values to be added together BCD End Addr inclusive specifies t
110. anual Supplement IBox Instructions Rev B 183 DirectSOFT IBox Instructions for DL405 PLCs Real to Signed Binary with Implied Decimal Point and Rounding RTOBINS IB 569 DS6 The Real to Signed Binary with Implied PTR ONLY Used Decimal Point and Rounding IBox converts Real to Signed Binary wilmplied Decimal Pt and Rounding s RTOBINS IB 569 HPP N A the 32 bit real number to a 16 bit Signed aue GWO REAN Binary decimal value compensating for an Number oi Dedma Polbis implied number of decimal points then Result WORD Signed Binary rounding the number up if needed Example R56 78 with the Number of Decimal Points set to K1 would yield the Binary value 568 If the Number of decimal Points is set to KO this IBox would yield the Binary value 57 the 6 is rounded up RTOBINS Parameters Value DWORD Real The first V Memory location where the 32 bit Real floating point value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result WORD Signed Binary The V Memory location where the 16 bit Signed Binary decimal result will be stored Parameter DL405 Range R 3 402823E 38 3 402823E 38 All P Memory All User V Memory K0 5 All User V Memory 184 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nnn nn RR
111. ary to Binary ANSCLB IB 403 DS5 6 Used HPP N A Analog Scale 12 Bit Binary to Binary scales a 12 bit binary analog value 0 4095 decimal into binary decimal engineering units You specify the engineering unit high value when raw is 4095 and the engineering low value when raw is 0 and the output V memory address you want to place the o scaled engineering unit value The Analog Scale 12 Bit Binary to Binary engineering units are generated as binary anscLB IB 403 and can be the full range of 0 to 65535 Raw 12bitbinary TAO see ANSCL Analog Scale 12 Bit BCD High Engineering T to BCD if your raw units are in BCD is Low Engineering KO format at Engineering binary TAO t Note that this IBox only works with unipolar unsigned raw values It does NOT work with bipolar sign plus magnitude or signed 2 s complement raw values ANSCLB Parameters Raw 12 bit binary specifies the V memory location of the unipolar unsigned raw decimal unscaled value 12 bit binary 0 4095 decimal High Engineering specifies the high engineering value when the raw input is 4095 decimal Low Engineering specifies the low engineering value when the raw input is 0 decimal Engineering binary specifies the V memory location where the scaled engineering decimal value will be placed Parameter DL405 Range Raw 12 bit binary See DL405 V memory map Data Words High Engineerin
112. as 0 then the function would yield 38157 BCD note that it rounded up If the Real number is negative the Result will equal its positive absolute value RTOBCDD Parameters Value DWORD Real specifies the Dword Real number that will be converted and rounded to a BCD number with decimal points Number of Decimal Points specifies the number of implied decimal points in the Result DWORD Result DWORD BCD specifies the location where the rounded implied decimal points DWORD BCD value will be placed Parameter DL405 Range Value DWORD Real V PR R See DL405 V memory map Data Words Number of Decimal Points K0 8 Result DWORD BCD See DL405 V memory map Data Words 46 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs en RTOBCDD Example In the following example the RTOBCDD instruction is used to convert the 32 bit REAL floating point data format in V3000 and V3001 to the 8 digit BCD data format and stored in V2000 and V2001 K2 in the Number of Decimal Points implies the data will have two implied decimal points Real to Double BCD wilmplied Decimal Pt and Rounding RTOBCDD IB 563 Value DYVORD Real 3000 3001 Number of Decimal Points K2 Result DWORD BCD 2000 2001 DL405 PLC User Manual Supplement Box Instructions Rev B 117 DirectSOFT IBox Instructions for DL405 PLCs eee Square BCD SQUARE
113. ask 255 255 0 0 Gateway Address 192 168 0 1 The ECIPSUP is leading edge triggered not power flow driven similar to a counter input leg The command to write the TCP IP configuration parameters will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 IP Setup SPO ECIPSUP ECOM100 Workspace Success Error Error Code IP Address 192 168 12 100 Subnet Mask 255 255 0 0 Gateway Address 192 158 0 1 DL405 PLC User Manual Supplement Box Instructions Rev B 79 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Read Description ECRDDES IB 726 DS5 6 Used ECOM100 Read Description will read the ECOM100 s Description field up to the number HPP N A Of specified characters on a leading edge transition to the IBox The Workspace parameter is an internal private register used by this IBox and MUST m z BE UNIQUE in this one instruction and Beem OU REECEEEG H E MUST NOT be used anywhere else in your ECRDDES IB 726 program Ecomio0 Ko g Fither the Success or Error bit parameter will m T 00 i turn on once the command is complete Success co In order for this ECOM100 IBox to function zi M i f Description v400 you must turn ON dip switch 7 on the ECOM100 circuit board nues d ECRDDES Parameter
114. ata and V2030 through V2061 for its output data CTRIO Config 1 CTRIO IB 1000 CTRIO K1 Slot K2 Workspace 400 Input 2000 2025 Output 2030 2061 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 13 DirectSOFT IBox Instructions for DL405 PLCs eee CTREDRL Example con t Rung 2 This rung is a sample method for enabling the CTREDRL command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on C0 will cause the CTREDRL instruction to change the second preset in file 1 from a reset at a value of 20 to a reset at a value of 30 Operating procedure for this example code is to load the CTREDRL ex1 cwb file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2 in Data View turn encoder on CTRIO to value above 10 and output 0 light will come on continue to a count above 20 and the output 0 light will turn off Now reset the counter with C1 enable CO to execute CTREDRL command to change the second preset count value to 30 then turn encoder to value of 10 output 0 should turn on and continue on to a value of 30 and the output 0 light will turn off Note that it is not necessary to reload this file separately however the command can only change one value at a time CTRIO Edit Preset Table Entry and Reload Start cc CTRED
115. be written SMTP Server IP Addr optional parameter that specifies the IP Address of the SMTP Server on the ECOM100 s network Sender Name optional parameter that specifies the sender name that will appear in the From field to those who receive the e mail Sender EMail optional parameter that specifies the sender EMail address that will appear in the From field to those who receive the e mail 74 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs umm NN HMM ECEMSUP Parameters con t Port Number optional parameter that specifies the TCP IP Port Number to send SMTP requests usually this does not to be configured see your network administrator for information on this setting Timeout sec optional parameter that specifies the number of seconds to wait for the SMTP Server to send the EMail to all the recipients Cc optional parameter that specifies a list of carbon copy Email addresses to send all EMails to Parameter DL405 Range K0 255 See DL405 V memory map Data Words See DL405 V memory map See DL405 V memory map See DL405 V memory map Data Words DL405 PLC User Manual Supplement IBox Instructions Rev B 75 DirectSOFT IBox Instructions for DL405 PLCs eee ECEMSUP Example Rung 1 The ECOM100 Config IBox is responsible for coordination inter
116. c Excel or C to do complex calculations nesting parentheses up to 4 levels deep In addition to you can do Bit ETATS e wise And amp Or Xor and many Real Math Real functions Arc Cosine ACOSR Arc Sine MATHR IB 541 ASINR Arc Tangent ATANR Cosine DWORD Result TAO COSR Convert Radians to Degrees Expression DEGR Invert Bits INV Convert Degrees to Radians RADR HEX to Seven Segment Display SEG Sine SINR Square Root SQRTR Tangent TANR Example V2000 V2002 V2004 R2 5 SINR RADR V3000 R10 0 Every V memory reference MUST be able to fit into a double word Real formatted value MATHR Parameters DWORD Result specifies the location where the Real result of the mathematical expression will be placed result must fit into a double word Real formatted location Expression specifies the mathematical expression to be executed and the result is stored in specified DWORD Result location Each V memory location used in the expression must be in Real format Parameter DL405 Range See DL405 V memory map Data Words Text 42 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR MATHR Example In the following example the MATHR instruction is used to calculate the math expression which multiplies the REAL floating point value in V1200 by 10 5 then divides by
117. can that CO is ON co Increment by Real 1 INCBYR IB 545 Increment REAL DWORD V2104 V2105 By REAL DWORD R3 14159 DL405 PLC User Manual Supplement Box Instructions Rev B 209 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Read PEERLINK Status ECRDPL IB 742 DS6 ONLY Used HPP N A The ECOM100 Read PEERLINK Status IBox will read the PEERLINK operation s runtime status information from an ECOM100 that is configured to be part of a EGNDPL Bie PEERLINK network This Box will return ECOM100 FASES ECOM100 Read PEERLINK Status A a B 6 registers that contain information about NER current PEERLINK status and Success configuration Error C2 It references the ECOM100 of the PEERLINK Status 6 words V2000 d ECOM100 Config IBox that is controlling the ECOM100 module in a specific slot The ECOM100 Config contains built in interlocking logic that is used to synchronize the processing of this IBox with all of the other IBoxes in the ladder program that are being processed by the same ECOM100 A PEERLINK network is a data sharing network that consists of any number of DirectLOGIC PLC and or Do more PLC systems using ECOM100 modules and or the Do more PLC s onboard Ethernet port Each member of the data sharing network can receive data from the other members on the data sharing network by subscribing to them or send data to the other members of the network by ele
118. ccess Error example continued on next page 140 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTRINTR Example cont Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 OUT Rung 4 This rung allows the operator to enable output 0 from the ladder code enable output 0 C2 B2056 0 OUT DL405 PLC User Manual Supplement Box Instructions Rev B 141 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Load Profile CTRLDPR IB 1001 Ds5 6 Used C TRIO Load Profile loads a CTRIO Profile File to a CTRIO Output resource on a leading HPP N A edge transition to this IBox This IBox will take more than 1 PLC scan to execute Either the Success or Error bit will turn on when the command is complete If the Error Bit is on Fab o you can use the CTRIO Read Error Code CTRIO Load Profile CTRRDER IBox to get extended error CTRLDPR IB 1001 information CTRIO The Workspace register is for internal use by Output KO this IBox instruction and MUST NOT be File used anywhere else in your program Workspace v400 28 Success Error co M CTRLDPR Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Output specifies a CTRIO output to be used by the instruction File specifies a CTRIO profile File
119. ct design installation or operation Our products are not fault tolerant and are not designed manufactured or intended for use or resale as on line control equipment in hazardous environments requiring fail safe performance such as in the operation of nuclear facilities aircraft navigation or communication systems air traffic control direct life support machines or weapons systems in which the failure of the product could lead directly to death personal injury or severe physical or environmental damage High Risk Activities AutomationDirect specifically disclaims any expressed or implied warranty of fitness for High Risk Activities For additional warranty and safety information see the Terms and Conditions section of our catalog If you have any questions concerning the installation or operation of this equipment or if you need additional information please call us at 770 844 4200 This publication is based on information that was available at the time it was printed At AutomationDirect we constantly strive to improve our products and services so we reserve the right to make changes to the products and or publications at any time without notice and without any obligation This publication may also discuss features that may not be available in certain revisions of the product This publication may contain references to products produced and or offered by other companies The product and company names may be trademarked and are the
120. cting to publish one or more blocks of PEERLINK memory When PEERLINK is configured in an ECOM100 the user specifies a section of V Memory that is allocated for exclusive use by the PEERLINK operation This memory contains 256 locations These 256 locations are divided into 16 blocks Each of these 16 data blocks consists of 16 Bit registers Theses blocks provide the local storage for the data that is sent and received over the data sharing network PEERLINK uses the verbs publishing and subscribing to describe how data is exchanged with ECOM100s on the data sharing network Publishing is analogous to sending data and is done only if the PEERLINK configuration is set to publish one or more of its own data blocks If so configured the ECOM100 will broadcast a packet that contains all of the data from the V Memory blocks There are sixteen unique data blocks and each data block can only be published by one ECOM100 or Do more PLC This means there can be a maximum of sixteen unique ECOMs configured to publish blocks of data A single ECOM100 can be configured so that it publishes none of the blocks one block some of the blocks or even all 16 of the blocks Subscribing is analogous to receiving data and is accomplished by subscribing to the data blocks of all the other controllers on the data sharing network Once PEERLINK is enabled it listens to the network for PEERLINK broadcasts messages from other ECOM100s or Do more PLCs W
121. ded in the IBox and must NOT be used anywhere else in your program Power flow controls whether the calculation is enabled If it is disabled the Filter Value is not updated On the first scan from Program to Run mode the Filter Value is initialized to 0 to give the calculation a consistent starting point FILTERB Parameters Filter Frequency Timer specifies the Timer T number which is used by the Filter instruction Filter Frequency Time 0 01sec specifies the rate at which the calculation is performed Raw Data Binary specifies the V memory location of the raw unfiltered binary decimal value Filter Divisor 1 100 this constant used to control the filtering effect A larger value will increase the smoothing effect of the filter A value of 1 results with no filtering Filtered Value Binary specifies the V memory location where the filtered binary decimal value will be placed Parameter DL405 Range Filter Frequency Timer T0 377 Filter Frequency Time 0 01 sec K0 9999 Raw Data Binary See DL405 V memory map Data Words Filter Divisor 1 100 K1 100 Filtered Value Binary See DL405 V memory map Data Words 16 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj FILTERB Example In the following example the FILTERB instruction is used to filter a binary value that is in V2000 Timer T1 is set to 0 5 sec the rate at which the fi
122. e Down ECEMAIL C10 ECOM100 Workspace Success Error C101 Error Code v2000 To joe acme com yp acme com Subject Machine Offline Body Machine 5010 B went offline at time 24 on date us 70 DL405 PLC User Manual Supplement Box Instructions Rev B DS5 6 DirectSOFT IBox Instructions for DL405 PLCs E ECOM100 Restore Default E mail Setup ECEMRDS IB 713 Used HPP N A ECOM100 Restore Default EMail Setup on a leading edge transition will restore the original EMail Setup data stored in the ECOM100 back to the working copy based on the specified ECOM100 which corresponds to a specific unique ECOM100 Lv Jas o Configuration ECOM100 at the top of ECOM100 Restore Default EMail Setup your program ECEMRDS IB 713 When the ECOM100 is first powered up Ecom100 KO it copies the EMail setup data stored in Workspace ROM to the working copy in RAM You Suns CO can then modify this working copy from Error CO 7 your program using the ECOM100 EMail Setup ECEMSUP IBox After modifying _Etror Code the working copy you can later restore the original setup data via your program by using this IBox The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Either the Success or Error bit parameter will turn on once the command is complete If there is an error the
123. e by Erag ae this IBox instruction and MUST NOT be used anywhere else in your program CTRWFTR Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully Parameter DL405 Range K0 255 K0 3 See DL405 V memory map Data Words SUCCESS cesses eee menn X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map B Note Writing preset tables to ROM on a continual basis can cause the FLASH memory to fail over time It is recommended only to write these tables to ROM when needed 156 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs ama CTRWFTR Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CTRxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO K1 Slot K2 Workspace 400 Input v2000 v2025 Output V2030 V20B1 Rung 2 T
124. e is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point in the result Result DWORD Signed Binary The first V Memory location where the 32 bit Signed Binary decimal result will be stored Parameter DL405 Range e VRP R 3 402823E 38 3 402823E 38 All P Memory All User V Memory Number of Decimal Points KO 10 All User V Memory 186 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nn nnn nn RRR RTOBINSD Example In the following example the RTOBINSD instruction is used to convert the real value R3 14159 to a signed double word binary number which is stored in V2174 V2175 K5 in the decimal points implies that the data will have zero digits to the right of the decimal point The resulting value in V2174 V2175 is 314159 _On SP1 Real to Double Signed Binary w Implied Decimal Pt and Rounding 1 m RTOBINSD IB 571 Value DWORD Real R3 14159 Number of Decimal Points K5 Result DWORD Signed Binary V2174 V2175 DL405 PLC User Manual Supplement Box Instructions Rev B 187 DirectSOFT IBox Instructions for DL405 PLCs C Scale Value Unsigned Binary SCALEB IB 509 DS6 ONLY Used HPP N A The Scale Value Unsigned Binary IBox will scale an unsigned 16 bit Binary value 0 65535 of a particular range into an unsigned 1
125. e request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Description specifies the Description that will be written to the module Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS es e Edo X Y C GX GY B See DL405 V memory map EITO coe erre inns tps X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words Text 92 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj ECWRDES Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECcom100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On
126. e value if one high limit or alarm is desired to be used If the value in V2026 V2027 meets or falls below the low limit of K20000 C47 will turn ON If the value continues to decrease to meet or fall below the low low limit of K10000 C50 will turn ON Both bits would be ON in this case The low and low low limits and alarms can be set to the same value if one low limit or alarm is desired to be used EB Hi Low Alarm Binary Double 1 Jj 1B 404 Monitoring Value Binary Double V2026 High High Limit K90000 High High Alarm High Limit High Alarm Low Limit Low Alarm Low Low Limit Low Low Alarm DL405 PLC User Manual Supplement IBox Instructions Rev B 16 1 DirectSOFT IBox Instructions for DL405 PLCs C Hi Lo Alarm BCD Double HILOALD IB 424 DS6 onty Used HPP N A The Hi Lo Alarm BCD Double IBox monitors E i FEE o the 32 bit BCD value that is stored in two M l d h Hi Low Alarm BCD Double successive V Memory locations and sets the HoD Bi appropriate alarm states based on the alarm limit monitoring value BCD Double v2026 values High High Limit When you enter the alarm limit values you must 9 Hish4larm C40 ensure that the High High limit the High limit SED Bi 20000 he Low limit gt the Low Low limit 2 PE MCN Low Limit The alarm limits are inclusive For example the LowAlarm High and High High alarm bits will be ON Low Low Lim
127. ee version please visit our Web site at www automationdirect com Analog Helper IBoxes Instruction Analog Scale 12 Bit BCD to BCD ANSCL Analog Scale 12 Bit Binary to Binary ANSCLB Filter Over Time BCD FILTER Filter Over Time Binary FILTERB Hi Low Alarm BCD HILOAL Hi Low Alarm Binary HILOALB Discrete Helper IBoxes Instruction Off Delay Timer OFFDTMR On Delay Timer ONDTMR One Shot ONESHOT Push On Push Off Circuit PONOFF Memory IBoxes Instruction Move Single Word MOVEW Move Double Word MOVED Math IBoxes Instruction BCD to Real with Implied Decimal Point BCDTOR Double BCD to Real with Implied Decimal Point BCDTORD Math BCD MATHBCD Math Binary MATHBIN Math Real MATHR Real to BCD with Implied Decimal Point and Rounding RTOBCD Real to Double BCD with Implied Decimal Point and Rounding RTOBCDD Square BCD SQUARE Square Binary SQUAREB Square Real SQUARER Sum BCD Numbers SUMBCD Sum Binary Numbers SUMBIN Sum Real Numbers SUMR 6 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M Communication IBoxes Instruction ECOM100 Configuration ECOM100 ECOM100 Disable DHCP ECDHCPD ECOM100 Enable DHCP ECDHCPE ECOM100 Query DHCP Setting ECDHCPQ ECOM100 Send E mail ECEMAIL ECOM100 Restore Default E mail
128. en similar to a counter input leg The command to write the Subnet Mask will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code To configure all of the ECOM100 TCP IP parameters in one IBox see the ECOM100 IP Setup ECIPSUP IBox _FirstScan ECOM100 Write Subnet Mask SPO ECWRSNM ECOM100 Workspace Success Error Error Code Subnet Mask 255 255 0 0 DL405 PLC User Manual Supplement Box Instructions Rev B 103 DirectSOFT IBox Instructions for DL405 PLCs f a ECOM100 RX Network Read ECRX IB 740 DS5 6 Used HPP N A ECOM100 RX Network Read performs the RX instruction with built in interlocking with all other ECOM100 RX ECRX and ECOM100 WX ECWX IBoxes in your program to simplify communications networking It will perform the RX on the specified e ECOM100 s network which corresponds to SEO MOURNE EKER a specific unique ECOM100 Configuration oe ECOM 100 IBox at the top of your T VADO program Slave ID The Workspace parameter is an internal From Stave Element Src private register used by this IBox and MUST Number Oreyies BE UNIQUE in this one instruction and Ae E Desy MUST NOT be used anywhere else in your EN Rm program Whenever this IBox has power it will read element data from the
129. en a BCD instruction is executed and a NON BCD number was encountered 194 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs DECBYBCD Example In this example the DECBYBCD instruction will subtract the BCD value K9900 from the BCD value in V2116 on every scan that CO is ON co Decrement by BCD DECBYBCD IB 526 Decrement WORD BCD V2116 By WORD BCD K9900 DL405 PLC User Manual Supplement Box Instructions Rev B 195 DirectSOFT IBox Instructions for DL405 PLCs eee Decrement By BCD Double DECBYBCDD IB 527 DS6 cod The Decrement By BCD Double Box will FIESES ONLY subtract the By DWORD BCD Value from Decrement by BCD Double HPP N A the Decrement DWORD BCD Value on DECBYBCDD 1B 527 each scan the instruction is enabled Decrement DWORD BCD By DWORD BCD DECBYBCDD Parameters Decrement DWORD BCD The V Memory location where the 32 bit BCD value is located By DWORD BCD The DWORD BCD value to subtract Parameter DL405 Range All V Memory KO 99999999 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP64 On when the 16 bit subtraction instruction results in a borrow SP65 On when the 32 bit subtraction instruction results in a borrow SP70 On anytime the value in the accumulator is negative
130. ents K1 4095 All V Memory Start of Destination number All V Memory Note The Source Range and the Destination Range CAN NOT overlap Note If the instruction will be moving double word values the Number of Elements must be an even Note All of the locations will be moved in the same PLC scan which will cause an increase in the scan time Be aware this increase may be large enough to trip with watchdog timer 166 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs MOVRANGE Example In the following example the MOVRANGE instruction is used to move 8 words of data from V2050 V2057 to V2060 V2067 co Move Range of V using MOV MOVRANGE 1B 203 Start of Source V2050 V2057 Number of Elements K8 Start of Destination V2060 V2067 DL405 PLC User Manual Supplement IBox Instructions Rev B 167 DirectSOFT IBox Instructions for DL405 PLCs i a Move Range of V using FOR NEXT MOVEFOR IB 204 DS6 onty Used HPP N A The Move Range of V using FOR NEXT will o use a FOR NEXT loop to copy the values from Move Range of V using FORINEXT one range of V Memory locations to a second MOVEFOR 1B 204 range of V Memory locations Up to 4095 V Start of Source Memory locations can be moved Number of Elements k8 z Start of Destination MOVEFOR Parameters Start of Source The first V Memory location of the source
131. eparate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO Slot Workspace Input v2000 v2025 Output 2030 2061 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 139 DirectSOFT IBox Instructions for DL405 PLCs eee CTRINTR Example cont Rung 2 This rung is a sample method for enabling the CTRINTR command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on CO will cause the CTRINTR instruction to create a single entry preset table but not as a file and use it for output 0 the new preset will be loaded when the current count is reset In this case the single preset will be a set at a count of 25 for output 0 Operating procedure for this example code is to load the CTRINTR exl1 cwb file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2 in Data View turn encoder on CTRIO to value above 10 and output 0 light will come on Now turn on CO to execute the CTRINTR command reset the counter with C1 then turn encoder to value of 25 output 0 should turn on CTRIO Initialize Preset Table on Reset Start CTRINTR CTRINTR co CTRIO Output Entry Type Pulse Time Preset Count Workspace Su
132. er Freq Time 0 01 sec K50 Raw Data BCD Double V2054 Filter Divisor 1 100 K2 Filtered Value BCD Double V2056 DL405 PLC User Manual Supplement IBox Instructions Rev B 159 DirectSOFT IBox Instructions for DL405 PLCs ee Hi Lo Alarm Binary Double HILOALBD IB 404 DS6 ONLY Used HPP N A The Hi Lo Alarm Binary Double IBox monitors the 32 bit binary decimal value that is stored in two successive V Memory locations and sets the appropriate alarm states based on the alarm limit values When you enter the alarm limit values you must ensure that the High High limit the High limit gt the Low limit the Low Low limit The alarm limits are inclusive For example the High and High High alarm bits will be ON when the Monitoring Value High High limit and the Monitoring Value High limit The Low and Low Low alarm bits will be ON when the Monitoring Value lt Low limit and the Monitoring Value lt Low Low limit HILOALBD Parameters Monitoring Value Binary Double The first V Memory location of the 32 bit binary decimal value to monitor o Hi Low Alarm Binary Double HILOALBD IB 404 Monitoring Value Binary Double v20006 High High Limit Ko0000 High High Alarm C45 High Limit Kao 1 7 High Alarm pas 7 Low Limit k20000 1 7 Low Alarm C47 Low Low Limit k10000_ YW Low Low Alarm C47 Ri High High Limit The High Hi
133. erator to enable output 0 from the ladder code enable output 0 C2 B2056 0 OUT DL405 PLC User Manual Supplement Box Instructions Rev B 129 DirectSOFT IBox Instructions for DL405 PLCs rm e H T HH aa CTRIO Edit Preset Table Entry and Reload CTREDRL IB 1002 DS5 6TUsed CT RIO Edit Preset Table Entry and Reload on a leading edge transition to this IBox will HPP N A perform this dual operation to a CTRIO Output resource in one CTRIO command This IBox will take more than 1 PLC scan to a A LIXA o execute Either the Success or Error bit will FINGER re oe turn on when the command is complete If CTREDRL 18 1002 the Error Bit is on you can use the CTRIO CTRIO KO g Output KO Read Error Code CTRRDER Box to get BEN Pm extended error information A CE IERI Entry Type V400 Entry Type Pulse Time V400 KO Set Preset Count va00 i Workspace v400 K1 Reset Success co Error co K2 Pulse On uses Pulse Time K3 Pulse Off uses Pulse Time K4 Toggle K5 Reset Count Note that the Pulse Time parameter is ignored by some Entry Types The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTREDRL Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instructi
134. erent slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx Boxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 example continued on next page 108 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs M ECWX Example cont Rung 2 Using ECOM100 KO read X0 X7 from Slave K7 and write them to slave K5 as fast as possible Store them in this local PLC in C200 C207 and write them to C300 C307 in slave K5 Both the ECRX and ECWX work with the ECOM100 Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing They also provide very simplified error reporting You no longer need to worry about any SP busy bits or error bits or what slot number a module is in or have any counters or shift registers or any other interlocks for resource management In this example SP1 always ON is driving both the ECRX and ECWX Boxes in the same rung On the scan that the Network Read completes the Network Write will start that same scan As soon as the Network Write compl
135. ernally Ch2 C High ON by this IBox It must not be used by any other Ch2 C Low OFF instructions in the PLC Ch2 D High ON e Success This BIT will be ON if the Run to Limit Ch2 D Low OFF succeeds and OFF if it fails Error This BIT will be OFF if the Run to Limit succeeds and ON if it fails Error Code A V Memory register that is used to store the Error if the Run to Limit fails The following table has a list of the possible Error Code values Error Code Description 0 No Error 2002 Output Enable was already ON when the Instruction was enabled The CTRIO module reported an error Use the CTRIO Read Error CTRRDER IBox to read 2003 the CTRIO module s error code to determine what went wrong 23 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K20 20000 K20 65535 CTRIO2 All User V Memory KO FF All User V Memory K0 99 All User V Memory All User V Memory X Y C GX GY B All Bit Memory X Y C GX GY B All Bit Memory CTRIO Run To Limit Mode 2 CTRRTLM2 CTRIO Output Frequency Limit Duty Cycle Workspace Success Error Error Code CTRRTLM2 Example co All V Memory Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from
136. es on Write Requests that the unici Write ERM or ERM100 module has generated when communicating across the backplane to the CPU The total number of retries on Ethernet Read and Write mb ur Requests that the ERM or ERM100 module has generated when communicating with its slaves DL405 PLC User Manual Supplement Box Instructions Rev B 223 DirectSOFT IBox Instructions for DL405 PLCs eee ERMSTATS Parameters e ERM A reference number or resource number used to uniquely identify the ERM network Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Read Status succeeds and OFF if the Read Status fails Error This BIT will be OFF if the Read Status succeeds and ON if the Read Status fails Status Buffer 12 words The first of the 12 consecutive V Memory registers where the ERM Status values will be stored Parameter DL405 Range K0 255 All User V Memory SUCCESS ssssususus X Y C GX GY B All Bit Memory EMON nde amie eda eee ts X Y C GX GY B All Bit Memory Status Buffer All User V Memory Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute ERM Read Status ERMSTATS ERM Workspace Success Error Status Buffer 12
137. es the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute CTRIO Register Write CTRRGWR 1B 1017 CTRIO K1 Source v3000 Destination Register 0 Ch1Fn1 Accumulator Workspace v400 Success c2 Error c3 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes CTRRGWR Example Rung 1 This sets up the CTRIO module in slot 2 of the base Fach CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used The CTRIO has been configured to use V2000 through V2025 for its input data and V2100 through V2131 for its output data 1 CTRIO Config CTRIO 1B 1000 CTRIO K1 Slot Local K2 Workspace V1400 Input V2000 V2025 Output V2100 V2131 Rung 2 This rung is a sample method for writing a register of a CTRIO module Turning on CO will cause the CTRRGWR instruction to write the value stored in V3000 V3001 to the Channel 1 Function 1 accumulator register If the register write request is successful C2 will turn ON If the register write request fails C3 will turn ON co 2 CTRIO Register Write CTRRGWR IB 1017 CTRIO Source Destination Register 0 Ch1Fn1 Accumulator Workspace V400 Success C2 Error c3 DL405 PLC User Manual Supplement Box Instructions Rev B 23 1 DirectSOFT IBox Instructions for DL405 PLCs CTRIO Velocity Mode
138. etes any pending operations below it in the program would get a turn If there are no pending ECOM100 IBoxes below the ECWX then the very next scan the ECRX would start its request again Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the fastest the PLC can do networking For local Serial Ports DCM modules or the original ECOM modules use the NETCFG and NETRX NETWX IBoxes _On ECOM100 RX Network Read SP1 ECRX ECOM100 Workspace Slave ID From Slave Element Src Number Of Bytes To Master Element Dest Success Error ECOM100 WX Network Write ECWX ECOM100 Workspace Slave ID From Master Element Src Number Of Bytes To Slave Element Dest Success Error DL405 PLC User Manual Supplement IBox Instructions Rev B 109 DirectSOFT IBox Instructions for DL405 PLCs eee NETCFG Network Configuration NETCFG IB 700 DS5 6 Used HPP N A Network Config defines all the common information necessary for performing RX WX Networking using the NETRX and NET WX IBox instructions via a local CPU serial port DCM or ECOM module You must have the Network Config instruction at the top of your ladder stage program with any other configuration UEM IBoxes NETCFG IB 700 If you use more than one local serial port Network DCM or ECOM in your PLC for RX WX CPU Port or Slot ex KF2 or K3 Networking you must have a different Workspace Network Con
139. f time in hundredths of a second based on the power flow into the IBox Once the IBox loses power the Output is turned off immediately If the power flow turns off BEFORE the On Delay Time then the MAXA o timer is RESET and the Output is never turned on so you must have continuous On Delay Timer ONDTMR IB 301 power flow to the IBox for at least the i A Timer Number TO specified On Delay Time before the Clutwatitumms Oa On Delay Time 0 01 sec TAO P Output co g This IBox utilizes a Timer resource TMRF which cannot be used anywhere else in your program ONDTMR Parameters Timer Number specifies the Timer TMRF number which is used by the ONDTMR instruction On Delay Time 0 01sec specifies how long the Output will remain off once power flow to the Ibox is applied Output specifies the output that will be delayed turning on by the On Delay Time Parameter DL405 Range 10 377 On Delay TIME ohm KV K0 9999 See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map 24 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs umm E ONDTMR Example In the following example the ONDTMR instruction is used to delay the turning on of output C21 Timer 1 T1 is set to 2 seconds the on delay period
140. fied V Memory location If the ABSBIN 1B 504 Value is negative it negates the Value to make it Value WORD binary V2046 positive and stores it in Result and turns the Is RR ARE Doa a A s Negative w Negative bit ON Otherwise it returns the Value unchanged and the Is Negative bit is OFF For example If V2046 31415 the result in V2052 V2053 would be 31415 and the Is Negative bit C40 would be OFE If V2046 31415 the result in V2052 V2053 would be 31415 and the Is Negative bit C40 would be ON ABSBIN Parameters Value WORD Binary The V Memory location where the 16 bit Binary decimal value is located Result DWORD Binary The first V Memory location where the 32 bit Binary decimal absolute value will be stored Is Negative If Value WORD binary is negative this bit will be ON If Value WORD binary is not negative e g zero or positive this bit will be OFF Parameter DL405 Range All V Memory All V Memory Is Negative 00 X Y C GX GY B All Bit Memory 170 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs ABSBIN Example In this example the ABSBIN instruction is used to calculate the absolute value of the binary number stored in V2046 The result is stored in V2052 V2053 and C40 will be set if the value of V2046 was negative _On SP1 Absolute Value Binary 1 p amp gSBIH IB 504
141. fig instruction for EACH RX WX network in your system that utilizes any NETRX NETWX IBox instructions The Workspace parameter is an internal private register used by the Network Config Box and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program The 2nd parameter CPU Port or Slot is the same value as in the high byte of the first LD instruction if you were coding the RX or WX rung yourself This value is CPU port specific check your PLC manual Use KF1 or KF3 for the DL450 CPU ports 1 or 3 If using a DCM or ECOM module in the local base use Kx where x equals the slot where the module is installed If using either module in an expansion base use KXx where X equals the expansion base number and x equals the slot in the expansion base where the module is installed NETCFG Parameters e Network specifies a unique for each ECOM 100 or DCM network to use CPU Port or Slot specifies the CPU port number or slot number of DCM ECOM 100 used Parameter DL405 Range K0 255 KO FF See DL405 V memory map Data Words Workspace specifies a V memory location that will be used by the instruction 1 10 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs TT MM NETCFG Example The Network Configuration IBox coordinates all of the interaction with other Network IBoxes NETRX NETWX You must have
142. g ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan set the Module Name of the ECOM100 Typically this is done using NetEdit but this Box allows you to configure the module name of the ECOM100 using your ladder program The EWRNAM is leading edge triggered not power flow driven similar to a counter input leg The command to write the module name will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 If it fails you can look at V2000 for the specific error code _FirstScan ECOM100 Write Name SPO ECWRNAM IB 725 ECOM100 KO Workspace V503 Success C100 Error C101 Error Code v2000 Module Name George DL405 PLC User Manual Supplement IBox Instructions Rev B 10 DirectSOFT IBox Instructions for DL405 PLCs e e T 282 ECOM100 Write Subnet Mask ECWRSNM IB 733 DS5 6 Used ECOM100 Write Subnet Mask will write the given Subnet Mask to the ECOM100 module HPP N A on a leading edge transition to the IBox See also ECOM100 IP Setup ECIPSUP IBox 717 to setup ALL of the TCP IP parameters in a single instruction IP Address Subnet Mask vjel e and Gateway Address ECOM100 Write Subnet Mask The Workspace parameter is an internal M pero private register used by this IBox and MUST Sek E BE UNIQUE in this one
143. g K0 65535 Low Engineering K0 65535 Engineering binary See DL405 V memory map Data Words 12 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR ANSCLB Example In the following example the ANSCLB instruction is used to scale a raw value 0 4095 binary that is in V2000 The engineering scaling range is set 0 1000 low engineering value high engineering value The scaled value will be placed in V2100 in binary format Analog Scale 12 Bit Binary to Binary ANSCLB IB 403 Raw 12 hit binary v2000 High Engineering Low Engineering Engineering binary DL405 PLC User Manual Supplement Box Instructions Rev B 13 DirectSOFT IBox Instructions for DL405 PLCs rr a a Filter Over Time BCD FILTER IB 422 DS5 6 Used HPP N A Filter Over Time BCD will perform a first order filter on the Raw Data on a defined time interval The equation is New Old Raw Old FDC where FEES s Filter Over Time BCD New New Filtered Value FILTER IB 422 Old Old Filtered Value Filter Freq Timer FDC Filter Divisor Constant Filter Freq Time 0 01 sec KO Raw Data BCD Raw Raw Data Filter Divisor 1 100 KI The Filter Divisor Constant is an integer in Filtered Value BCD TAQ p the range K1 to K100 such that if it equaled K1 then no filtering would be done The rate at which the calculat
144. g of this Box with all of the Oo ECOM100 Write PEERLINK Pause ECWRPLPA IB 743 ECOM100 K1 i Workspace Success C1 Error C2 Error Code PEERLINK Pause K1 other Boxes in the ladder program that are being processed by the same ECOM100 ECWRPLPA Parameters ECOM100 This is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Write operation succeeds and OFF if the Write operation fails Error This BIT will be OFF if the Write operation succeeds and ON if the Write operation fails Error Code A V Memory register that stores the Return Code from the ECOM100 if the Write operation fails It must not be used by any other instructions in the PLC The possible Error Return Codes are 0 No Error 126 Write Protect Error the ECOM100 is configured to use DIP Switch 5 to write protect the ECOM100 and DIP 5 is ON PEERLINK Pause The value to write either a constant or a V Memory location that contains the following values 0 Allow PEERLINK operation 1 Pause PEERLINK operation Parameter DL405 Range K0 255 All User V Memory Success ssssus X Y C GX GY B All Bit
145. gh alarm limit value binary double High High Alarm The High High alarm output BIT High Limit The High alarm limit value binary double High Alarm The High alarm output BIT Low Limit The Low alarm limit value binary double Low Alarm The Low alarm output BIT Low Low Limit The Low Low alarm limit value binary double Low Low Alarm The Low Low alarm output BIT Parameter DL405 Range Monitoring Value All V Memory High High Limit esses VK K0 4294967295 All V Memory High High Alarm X Y C GX GY B All Bit Memory High Limit m V K K0 4294967295 All V Memory X Y C GX GY B All Bit Memory K0 4294967295 All V Memory X Y C GX GY B All Bit Memory Low Low Limit 008 VK K0 4294967295 All V Memory Low Low Alarm X Y C GX GY B All Bit Memory 160 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs HILOALBD Example In the following example the HILOALBD instruction is used to monitor a double word binary value that is in V2026 V2027 If the value in V2026 V2027 meets exceeds the high limit of K80000 C46 will turn ON If the value continues to increase to meet exceed the high high limit of K90000 C45 will turn ON Both bits would be ON in this case The high and high high limits and alarms can be set to the sam
146. he ending address of a block of V memory location values to be added together BCD Result DWORD BCD specifies the location where the sum of the block of V memory BCD values will be placed Parameter DL405 Range See DL405 V memory map Data Words End Address inclusive See DL405 V memory map Data Words Result DWORD BCD See DL405 V memory map Data Words 54 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nn RRR SUMBCD Example In the following example the SUMBCD instruction is used to total the sum of all BCD values in words V2000 thru V2007 and store the resulting 8 digit double word BCD value in V3000 and V3001 Sum BCD Numbers SUMBCD IB 522 Start Address v2000 End Addr inclusive V2007 Result DWORD BCD v3000 v3001 DL405 PLC User Manual Supplement Box Instructions Rev B 55 DirectSOFT IBox Instructions for DL405 PLCs rm Sum Binary Numbers SUMBIN IB 502 DS5 6 Used HPP N A Sum Binary Numbers sums up a list of consecutive 16 bit WORD Binary numbers into a 32 bit DWORD binary result You specify the group s starting and ending V memory addresses inclusive When enabled this instruction will add up all the numbers in the group so you may want to place a differential contact driving the enable SUMBIN could be used as the first part of calculating an ave
147. hen it receives one it examines the data from that packet and for blocks that are configured as Subscribe To it stores that data in the controller s local V Memory in the appropriate block The PEERLINK network uses TCP IP broadcast packets to publish the blocks of data to the network One caveat with the use of broadcast packets is that it limits the scope of the shared data network to the local broadcast domain 2 10 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs mmm M M H M The ECOM100 Read PEERLINK Status Box retrieves 6 status values from the ECOM100 and places those values in 6 consecutive V Memory locations The definitions of those 6 status values follows Number Name Description Word 1 Paused 1 PEERLINK processing is Paused in this ECOM100 0 PEERLINK processing is Active Word 2 PEERLINK Enabled 1 PEERLINK is Enabled in this ECOM100 0 PEERLINK is NOT Enabled in this ECOM100 Word 3 PEERLINK Address The first of the 256 V Memory locations that the PEERLINK operation uses for storing the data that is sent and received through the Publish and Subscribe Operations Ignored Blocks Indicates which of the 16 PEERLINK blocks are being ignored by this ECOM100 If the bit is ON the block is being ignored if the bit is OFF the block is NOT ignored Each of the 16 b
148. his CTRIO Edit Preset Table Entry IBox will change Entry 0 in Table 2 to bea RESET at Count 3456 This example program requires that you load CTRWFTR_IBox cwb into your Hx CTRIO module CTRIO Edit Preset Table Entry Try EDPT CTREDPT co CTRIO Output Table Entry 0 based Entry Type Pulse Time Preset Count Workspace Success Error Rung 3 If the file is successfully editted use a Write File To ROM IBox to save the edited table back to the CTRIO s ROM thereby making the changes retentive CTRIO Write File to ROM CTREDPT Success CTRWFTR IB 1006 C100 CTRIO 3 Output Workspace Success Error DL405 PLC User Manual Supplement Box Instructions Rev B 157 DirectSOFT IBox Instructions for DL405 PLCs M Filter Over Time BCD Double FILTERD IB 425 DS6 The Filter Over Time BCD Double IBox Used e onty 5 performs a first order filter on the specified 32 Filter Over Time BCD Double ppp WA bit Raw BCD Data value using the specified FILTERD IB 425 time interval Filter Freq Timer Ti G A first order is essentially a lag function so the ec inia ein LE ae FDC Filter Divisor Constant represents the perek aiae nian i Filter Divisor 1 100 K2 amount of desired lag A Value of 1 represents Filtered Value BCD Double no lag a value of 100 represents the maximum amount of lag The formula used is Raw Old p New Old FDC
149. ies the Gateway Address for the module to use Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS 288d tees edie ss X Y C GX GY B See DL405 V memory map ELTO mre AREE EnA X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words IP Address 0 0 0 1 to 255 255 255 254 IP Address Mask 0 0 0 1 to 255 255 255 254 IP Address 0 0 0 1 to 255 255 255 254 78 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj ECIPSUP Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan configure all of the TCP IP parameters in the ECOM100 IP Address 192 168 12 100 Subnet M
150. igured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config 1 CTRIO CTRIO Slot Workspace Input V2000 2025 Output V2030 V2061 Rung 2 This CTRIO Run To Limit Mode IBox sets up Output 0 in CTRIO 1 to output pulses at a Frequency of 1000 Hz until Llimit 0 comes on This example program requires that you load CTRRTLM_IBox cwb into your Hx CTRIO module CTRIO Run To Limit Mode m CTRRTLM IB 1011 CTRIO Output Frequency Limit Duty Cycle Workspace Success Error example continued on next page 148 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs lt CTRRTLM Example cont Rung 3 If the Run To Limit Mode parameters are OK set the Direction Bit and Enable the output CTRRTLM_Success Out 0 Direction C100 B2056 4 OUT Out 0 Enable B2056 0 OUT DL405 PLC User Manual Supplement Box Instructions Rev B 149 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Run to Position Mode CTRRTPM IB 1012 DS5 6 Used HPP N A CTRIO Run To Position Mode on a leading edge transition to this IBox loads the Run to Position command and given parameters on a specific Output resource Valid Function Values are ToS T8 o 00 Less Than Ch1 Fn1 CTRIO Run To Position Mode CTRRTPM 18 1012 10 Greater Than Ch1 Fn1 CTRIO 01 Less Than Ch1 Fn2 Output KO
151. imal point _On SP1 Signed Double Binary to Real with Implied Decimal Point 1 IB 570 Value DWORD Signed Binary V3000 V3001 Number of Decimal Points K4 Result DWORD REAL V3002 V3003 DL405 PLC User Manual Supplement Box Instructions Rev B 179 DirectSOFT IBox Instructions for DL405 PLCs Real to Unsigned Binary with Implied Decimal Point and Rounding RTOBIN IB 565 DS6 ios The Real to Unsigned Binary with Implied o se ONLY Decimal Point and Rounding Box converts Real to Unsigned Binary wilmplied Decimal Pt and Rounding HPP N A the 32 bit real number to a 16 bit Unsigned RTOBIN Eos Binary decimal value compensating for an Hg pn ees ELLE m fd t 1 P Number of Decimal Points K4 a imp ied number o ecima points then Result WORD Unsigned Binay 2168 rounding the number up if needed Example R56 78 with the Number of Decimal Points set to K1 would yield the Binary value 568 If the Number of decimal Points is set to KO this IBox would yield the Binary value 57 sS the 6 is rounded up RTOBIN Parameters Value DWORD Real The first V Memory location where the 32 bit Real floating point value is located or the constant value to convert Number of Decimal Points The desired number of digits to the right of the decimal point to convert Result WORD Unsigned Binary The V Memory location where the 16 bit Unsigned Binary decimal result will be
152. instruction and Workspace V400 MUST NOT be used anywhere else in your Success co E program Eror Fither the Success or Error bit parameter will ME 400 i turn on once the command is complete If SubnetMask 0 0 0 0 there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Subnet Mask is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SPO STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRSNM Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Subnet Mask specifies the Subnet Mas
153. instructions in ONE RUNG driven by SP1 Always JT o Network WX Write NETWX IB 702 Network KO Workspace aon 1 0 7 Slave ID KO a From Master Element Src TAO Number Of Bytes K1 a To Slave Element Dest co Success co M Error co T On They will execute round robin style automatically NETW X Parameters e Network specifies the CPU port s DCM s ECOM s Network defined by the NETCFG instruction Workspace specifies a V memory location that will be used by the instruction Slave ID specifies the slave PLC that will be targeted by the NETWX instruction From Master Element Src specifies the location in the master PLC where the data will be sourced from Number of Bytes specifies the number of bytes to write to the slave PLC To Slave Element Dest specifies the slave address the data will be written to Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Parameter DL405 Range K0 255 See DL405 V memory map Data Words K0 90 From Master Element Src See DL405 V memory map Data Words Number of Bytes K1 128 To Slave Element Dest X Y C S T CT GX GY V See DL405 V memory map SUCCESS 06 6ccen eee ceas X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map DL405 P
154. interlocks and proper resource sharing They also provide very simplified error reporting You no longer need to worry about any SP busy bits or error bits or what slot number a module is in or have any counters or shift registers or any other interlocks for resource management In this example SP1 always ON is driving both the ECRX and ECWX IBoxes in the same rung On the scan that the Network Read completes the Network Write will start that same scan s soon as the Network Write completes any pending operations below it in the program would get a turn If there are no pending ECOM100 Boxes below the ECWX then the very next scan the ECRX would start its request again Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the fastest the PLC can do networking For local Serial Ports DCM modules or the original ECOM modules use the NETCFG and NETRX NETWX IBoxes On ECOM100 RX Network Read SP1 ECRX ECOM100 Workspace Slave ID From Slave Element Src Number Of Bytes To Master Element Dest Success Error ECOM100 WX Network Write ECWX ECOM100 Workspace Slave ID From Master Element Src Number Of Bytes To Slave Element Dest Success Error 106 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nT ECOM100 WX Network Write ECWX IB 741 DS5 6 HPP simplify communications networking It
155. ion is performed is specified by time in hundredths of a second 0 01 seconds as the Filter Freq Time parameter Note that this Timer instruction is embedded in the IBox and must NOT be used anywhere else in your program Power flow controls whether the calculation is enabled If it is disabled the Filter Value is not updated On the first scan from Program to Run mode the Filter Value is initialized to 0 to give the calculation a consistent starting point FILTER Parameters Filter Frequency Timer specifies the Timer T number which is used by the Filter instruction Filter Frequency Time 0 01sec specifies the rate at which the calculation is performed Raw Data BCD specifies the V memory location of the raw unfiltered BCD value Filter Divisor 1 100 this constant used to control the filtering effect A larger value will increase the smoothing effect of the filter A value of 1 results with no filtering Filtered Value BCD specifies the V memory location where the filtered BCD value will be placed Parameter DL405 Range Filter Frequency Timer T0 377 Filter Frequency Time 0 01 sec K0 9999 Raw Data BCD See DL405 V memory map Data Words Filter Divisor 1 100 K1 100 Filtered Value BCD See DL405 V memory map Data Words 14 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs TTT nnn nnn RRR FILTER Example In the following example
156. it when the Monitoring Value gt High High limit Low LowAlarm C43 2 and the Monitoring Value High limit The Low and Low Low alarm bits will be ON when the Monitoring Value lt Low limit and the Monitoring Value lt Low Low limit HILOALD Parameters Monitoring Value BCD Double The first V Memory location of the 32 bit BCD value to monitor High High Limit The High High alarm limit value BCD double High High Alarm The High High alarm output BIT High Limit The High alarm limit value BCD double High Alarm The High alarm output BIT Low Limit The Low alarm limit value BCD double Low Alarm The Low alarm output BIT Low Low Limit The Low Low alarm limit value BCD double Low Low Alarm The Low Low alarm output BIT Parameter DL405 Range Monitoring Value All V Memory High High Limit 008 VK K0 99999999 All V Memory High High Alarm X Y C GX GY B All Bit Memory High Limit EE X VK K0 99999999 All V Memory X Y C GX GY B All Bit Memory K0 99999999 All V Memory X Y C GX GY B All Bit Memory Low Low Limit 0008 VK K0 99999999 All V Memory Low Low Alarm X Y C GX GY B All Bit Memory 162 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs HILOALD Example In the following example the HILOALD instruction is used to monitor a double
157. its in this Word corresponds to a PEERLINK block as follows Bit 0 Block 0 Bit 1 Block 1 Bit 14 Block 14 Bit 15 Block 15 Published Blocks Indicates which of the 16 PEERLINK blocks are being published by this ECOM100 If the bit is ON the block is being published if the bit is OFF the block is NOT being published Each of the 16 bits in this Word corresponds to a PEERLINK block as follows Bit 0 Block 0 Bit 1 Block 1 Bit 14 Block 14 Bit 15 Block 15 Subscribed Blocks Indicates which of the 16 PEERLINK blocks this ECOM100 is subscribing to If the bit is ON the block is being subscribed to if the bit is OFF the block is NOT being subscribed to Each of the 16 bits in this Word corresponds to a PEERLINK block as follows Bit 0 Block 0 Bit 1 Block 1 Bit 14 Block 14 Bit 15 Block 15 DL405 PLC User Manual Supplement Box Instructions Rev B 2 1 1 DirectSOFT IBox Instructions for DL405 PLCs eee ECRDPL Parameters e ECOM100 This is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the ECRDPL succeeds and OFF if the ECRDPL fails Error This BIT will be OFF if the ECRDPL
158. izes any CTRIO IBox instructions Each CTRIO Config IBox must have a UNIQUE CTRIO value This is how the CTRIO IBoxes differentiate between the different CTRIO modules in your system The Workspace parameter is an internal private register used by the CTRIO Config IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program CTRIO Parameters e CTRIO specifies a specific CTRIO module based on a user defined number Slot local base specifies which PLC slot is occupied by the module always KO for EBC base e Workspace specifies a V memory location that will be used by the instruction e CTRIO Location specifies where the module is located PLC local base or ERM to EBC base Input local base This needs to be set to the same V memory register as is specified in CTRIO Workbench as Starting V address for inputs for this unique CTRIO Output local base This needs to be set to the same V memory register as is specified in CTRIO Workbench as Starting V address for outputs for this unique CTRIO Word Input EBC base The starting input V memory address as defined by the I O configuration in the ERM Workbench Bit Input EBC base The starting input Bit address as defined by the I O configuration in the ERM Workbench Word Output EBC base The starting output V memory address as defined by the I O configuration in the ERM Workbench Bit Output EBC base The starting outp
159. k that will be written to the module Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS 0 0 0 eee eee X Y C GX GY B See DL405 V memory map EITOE Seni lI duns X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words Masked IP Address 102 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs EM 4a ECWRSNM Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx IBoxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx IBoxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config BE ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan assign the Subnet Mask of the ECOM100 to 255 255 0 0 The ECWRSMM is leading edge triggered not power flow driv
160. l run to completion even if the input logic transitions to OFF before 28 the instruction completes ERMSLAVE Example Rung 1 The ERM Config IBox is responsible for coordination interlocking of all ERM type IBoxes for one specific ERM module Tag the ERM in slot 1 as ERM KI All other ERxxxx IBoxes refer to this module as K1 If you need to move the module in the base to a different slot then you only need to change this one IBox 1 ERM Config ERM 18 750 ERM K1 Slot K1 Workspace V400 Rung 2 The error information will be read from ERM 1 with the result placed into seven memory locations starting at V417 C3 will be enable if the read is a success C4 will be enabled if the attempted read results in failure co ERM Read Slave Error Codes ERMSLAVE ERM Workspace Success Error Slave Number Of Slots Error Code Buffer V417 V425 222 D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs EM ERM Read Status ERMSTATS IB 752 ps6 onty Used HPP N A The ERM Read Status Box will retrieve o runtime status data from the ERM or aude ERM100 o ERMSTATS IB 752 When the PLC is in Run mode the ERM or ERM amp Ki ERM100 module will compute some Workspace statistical data describing the ERM network s Success C1 performance These status values can be used ES to monitor the health of the backplane V interface
161. l subtract the real value R3 14159 from the real value in V2122 V2123 on every scan that CO is ON co Decrement by Real DECBYR IB 546 1 Decrement REAL DWORD V2122 V2123 By REAL DWORD R3 14159 DL405 PLC User Manual Supplement Box Instructions Rev B 199 DirectSOFT IBox Instructions for DL405 PLCs rr L M MM Q7 1X Increment By Binary INCBYBIN IB 505 DS6 iius The Increment By Binary IBox will add the By s onty WORD Binary Value to the Increment Increment by Binary HPP NA WORD Binary Value on each scan the INCBYBIN 1B 505 instruction is enabled POEMEN OR Dna By WORD Binary K10 INCBYBIN Parameters Increment WORD Binary The V Memory location where the 16 bit Binary decimal value is located 28 By WORD Binary The WORD Binary decimal value to add Parameter DL405 Range All V Memory KO 65535 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP66 On when the 16 bit addition instruction results in a carry SP67 On when the 32 bit addition instruction results in a carry SP70 On anytime the value in the accumulator is negative SP73 On when a signed addition or subtraction results in an incorrect sign bit 200 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs I
162. lave the user must do the following 1 SET the slave disable flag for that slave in the first diagnostic output word 2 Wait for bits 8 15 in second diagnostic input word to equal 1 3 RESET the slave disable flag in the first diagnostic output word Terminator 1 0 Slave only Hot Swap Error 1 0 configuration has changed most likely because the user has manually added an 1 0 module See 153 above for reset methods Terminator 1 0 Slave only Module Error One or more of the 1 0 modules has an error For more detail check extended errors Unused analog input channels exist at channel xx 1 16 where xx Value 200 For example 212 indicates unused analog channel exists at channel 12 200 216 220 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E The following chart has the Extended Slave Error Codes for Words 4 through 35 in the Error Code Buffer These error codes are valid for DL205 DL 05 and Terminator I O slaves Code decimal Description Bit wise error where bit 5 is always SET Look at bit 0 thru bit 4 to get a possible list of errors For example 34 decimal 22 hexadecimal 0010 0010 Bit 5 and Bit 1 ON Bit Number Description Terminal block off External P S voltage low Fuse blown Bus error Module initialization error intelligent module Fault exists in module
163. le dollar sign or o dollar sign double quote for a double ECOM100 Write Description quote character ECWRDES IB 727 The Workspace parameter is an internal ECOM100 KO private register used by this IBox and MUST Workspace BE UNIQUE in this one instruction and Success co MUST NOT be used anywhere else in your Error program Error Code V400 M Either the Success or Error bit parameter will Description i 7 turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Description is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SPO STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRDES Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx IBoxes that need to reference this ECOM100 module must reference this logical number e Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once th
164. locking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx Boxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 example continued on next page 76 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs mm 7 ECEMSUP Example cont Rung 2 Whenever an EStop is pushed ensure that president of the company gets copies of all EMails being sent The ECOM100 EMail Setup IBox allows you to set change the SMTP EMail settings stored in the ECOM100 The ECEMSUP is leading edge triggered not power flow driven similar to a counter input leg At power up the ROM based EMail configuration stored in the ECOM100 is copied to a RAM based working copy You can change this working copy by using the ECEMSUP IBox To restore the original ROM based configuration use the Restore Default EMail Setup ECEM
165. lse Time K4 Toggle K5 Reset Count Note that the Pulse Time parameter is ignored by some Entry Types The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRINPT Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Entry Type specifies the Entry Type to add during the edit Pulse Time specifies a pulse time for the Pulse On and Pulse Off Entry Types Preset Count specifies an initial count value to begin at after Reset Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully 134 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K0 5 See DL405 V memory map Data Words K0 65535 See DL405 V memory map Data Words K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map ETOL cu iia noua vce Ron X Y C GX GY B See DL405 V memory map CTRINPT Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a
166. lter calculation will be performed The filter constant is set to 3 A larger value will increase the smoothing effect of the filter A value of 1 results with no filtering The filtered value will be placed in V2100 Filter Over Time Binary FILTERB IB 402 Filter Freq Timer T1 Filter Freq Time 0 01 sec K50 Raw Data Binary Filter Divisor 1 100 Filtered Value Binary DL405 PLC User Manual Supplement Box Instructions Rev B 17 DirectSOFT IBox Instructions for DL405 PLCs Hi Low Alarm BCD HILOAL IB 421 DS5 6 Used HPP N A Hi Low Alarm BCD monitors a BCD value V memory location and sets four possible alarm states High High High Low and Low Low whenever the IBox has power flow You enter the alarm thresholds as constant K BCD values K0 K9999 and or BCD value V memory locations Ixe You must ensure that threshold limits are valid HiLow Alarm BCD that is HH gt H gt L gt LL Note that when HILOAL EN the High High or Low Low alarm condition is Suri yen oe true that the High and Low alarms will also be High High Alarm set respectively This means you may use the High Limit same threshold limit and same alarm bit for the High Alarm co High High and the High alarms in case you Low Limit TAD only need one High alarm Also note that the Low Alarm boundary conditions are inclusive That is if Lansel I the Low boundary is K50 and the Low Low Eaa co
167. me K4 Toggle K5 Reset Count Note that the Pulse Time parameter is ignored by some Entry Types The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program CTRINTR Parameters e CTRIO specifies a specific CTRIO module based on a user defined number see CTRIO Config Ibox Output specifies a CTRIO output to be used by the instruction Entry Type specifies the Entry Type to add during the edit Pulse Time specifies a pulse time for the Pulse On and Pulse Off Entry Types Preset Count specifies an initial count value to begin at after Reset Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully 138 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K0 5 See DL405 V memory map Data Words K0 65535 See DL405 V memory map Data Words K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words SUCCESS ie eren it emanations X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map CTRINTR Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a s
168. n the entire program Network Config NETCFG Network CPU Part or Slot ex KF2 or K3 Workspace example continued on next page DL405 PLC User Manual Supplement IBox Instructions Rev B 1 13 DirectSOFT IBox Instructions for DL405 PLCs BR Hr Ru W 2 Y NETRX Example cont Rung 2 Using Network KO read X0 X7 from Slave K7 and write them to slave K5 as fast as possible Store them in this local PLC in C200 C207 and write them to C300 C307 in slave K5 Both the NETRX and NETWX work with the Network Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing They also provide very simplified error reporting You no longer need to worry about any SP busy bits or error bits or what port number or slot number a module is in or have any counters or shift registers or any other interlocks for resource management In this example SP1 always ON is driving both the NETRX and NETWX IBoxes in the same rung On the scan that the Network Read completes the Network Write will start that same scan As soon as the Network Write completes any pending operations below it in the program would get a turn If there are no pending NETRX or NETWX IBoxes below this IBox then the very next scan the NETRX would start its request again Using the NETRX and NETWX for all of your serial port DCM or original ECOM network reads and writes is the fastest the PL
169. nd preset from a reset at a count of 20 to a reset at a count of 30 for output 0 on the CTRIO in slot 2 Operating procedure for this example code is to load the CTREDPT_ex1 cwb file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2 in Data View turn encoder on CTRIO to value above 10 and output 0 light will come on and stay on until a count of 20 is reached where it will turn off Now reset the counter with Cl enable CO to execute CTREDPT command to change the second preset turn on C2 to enable output 0 then turn encoder to value of 10 output 0 should turn on and then continue past a count of 30 output 0 should turn off Note that we must also reload the profile after changing the preset s this is why the CTRLDPR command follows the CTREDPT command in this example CTRIO Edit Preset Table Entry Start ue CTREDPT IB 1003 CTRIO Output Table Entry 0 based Entry Type Pulse Time Preset Count Workspace Success Error CTRIO Load Profile CTRLDPR IB 1001 CTRIO K1 Output KO File K1 Workspace V402 Success C102 Error C103 example continued on next page 128 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs CTREDPT Example cont Rung 3 This rung allows the programmer to reset the counter from the ladder logic reset counter C1 B2054 1 OUT Rung 4 This rung allows the op
170. nstruction is executed and a NON BCD number was encountered 206 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs INCBYBCDD Example In this example the INCBYBCDD instruction will add the BCD value K99999999 to the BCD value in V2110 V2111 on every scan that CO is ON Increment by BCD Double INCBYBCDD 1B 525 Increment DWORD BCD V2110 V2111 By DWORD BCD K99999999 DL405 PLC User Manual Supplement Box Instructions Rev B 207 DirectSOFT IBox Instructions for DL405 PLCs ee Increment By Real INCBYR IB 545 DS6 ised The Increment By Real IBox will add the By cf o onty 7 REAL DWORD Value to the Increment Increment by Real HPP N A REAL DWORD Value on each scan the INCBYR IB 545 instruction is enabled Poeman accom tiii By REAL DWORD INCBYR Parameters Increment Real DWORD The first V Memory location where the 32 bit Real floating point value is located 28 By Real DWORD The 32 bit Real floating point value to add Parameter DL405 Range All V Memory R 3 402823E 38 3 402823E 38 All V Memory 208 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs INCBYR Example In this example the INCBYR instruction will add the real value R3 14159 to the real value in V2104 V2105 on every s
171. number to be loaded Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully Parameter DL405 Range K0 255 K0 3 K0 255 See DL405 V memory map Data Words See DL405 V memory map Data Words SUCCESS sibs seemeniana ini X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map 142 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR CTRLDPR Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO K1 Slot K2 Workspace 400 Input v2000 2025 Output 2030 2061 Rung 2 This CTRIO Load Profile Box will load File 1 into the working memory of Output 0 in CTRIO 1 This example program requires that you load CTRLDPR_IBox cwb into your Hx CTRIO module CTRIO Load Profile Try Load Profile CTRLDPR IB 1001 co CTRIO Output File Workspace Success Error example continued on next page DL405 PLC User Manual Supplement
172. ode reported by the Slave Bits 0 11 Error Code Bit 12 ON 1 0 Error Bit 13 ON 1 0 Warning Bit 14 n a Bit 15 n a Current Error Code Last Error Code Ext Error Code Local Base Slot 0 Ext Error Code Local Base Slot 7 Ext Error Code Slot 8 or Expansion Base 1 Slot 0 Ext Error Code Slot 15 or Expansion Base 1 Slot 7 Ext Error Code Slot 16 Expansion Base 2 Slot 0 Ext Error Code Slot 23 or Expansion Base 2 Slot 7 Ext Error Code Slot 24 or Expansion Base 3 Slot 0 Ext Error Code Slot 31 or Expansion Base 3 Slot 7 DL405 PLC User Manual Supplement Box Instructions Rev B 2 19 DirectSOFT IBox Instructions for DL405 PLCs eee The following chart has the Slave Error Codes for Word 0 and Word 3 in previous table These error codes are valid for DL205 DL405 and Terminator I O slaves Code decimal Description 0 No Error Channel Failure Unused Channels Exist the module has jumpers to disable unused channels Broken Transmitter on one of the analog input channels Multiple Channel Failure Terminator 1 0 Slave only Hot Swap Error The module which was in this slot is no longer responding most likely because the user has manually removed an 1 0 module If Automatic Reset default is enabled for this slave it will reset itself once the replacement module is inserted If Manual Reset is enabled for this s
173. ody fields In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECEMAIL Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written To specifies an E mail address that the message will be sent to Subject subject of the e mail message Body supports what the PRINT and VPRINT instructions support for text and embedded variables allowing you to embed real time data in the EMail message 68 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS iinei ee veram X Y C GX GY B See DL405 V memory map EMOL Lote e De deben X Y C GX GY B See DL405 V memory map Error Code See DL405 V memory map Text Text See PRINT and VPRINT instructions ECEMAIL Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM10
174. ommand to read the IP Address will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 FirstScan ECOM100 Read IP Address SPO ECRDIP ECOM 100 Workspace Success Error IP Address 4 words 3000 v3003 DL405 PLC User Manual Supplement Box Instructions Rev B 85 DirectSOFT IBox Instructions for DL405 PLCs ECOM100 Read Module ID ECRDMID IB 720 Ds5 6 Used ECOM100 Read Module ID will read the binary decimal WORD sized Module ID on a HPP N A leading edge transition to the IBox The Workspace parameter is an internal private register used by this IBox and MUST IAS E BE UNIQUE in this one instruction and ECOM100 Read Module ID MUST NOT be used anywhere else in your ECRDMID IB 720 PUE ECOM100 Either the Success or Error bit parameter will Workspace V400 turn on once the command is complete EE CO gt In order for this ECOM100 IBox to function Error you must turn ON dip switch 7 on the ECOM100 circuit board Module ID vd 7 ECRDMID Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will
175. on Table specifies the Table number of which an Entry is to be edited Entry specifies the Entry location in the Preset Table to be edited Entry Type specifies the Entry Type to add during the edit Pulse Time specifies a pulse time for the Pulse On and Pulse Off Entry Types Preset Count specifies an initial count value to begin at after Reset Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully 130 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K0 255 See DL405 V memory map Data Words K0 255 See DL405 V memory map Data Words K0 5 See DL405 V memory map Data Words Pulse Time rec EI RERO ue VK K0 65535 See DL405 V memory map Data Words Preset Count VK K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words SUCCESS periodene ea X Y C GX GY B See DL405 V memory map ENON 1 a i ORe seated ates X Y C GX GY B See DL405 V memory map CTREDRL Fxample S Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input d
176. or DL405 PLC User Manual Supplement IBox Instructions Rev B 1 17 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Configuration CTRIO IB 1000 DS5 6 Used HPP N A CTRIO Config defines all the common information for one specific CTRIO module which is used by the other CTRIO IBox instructions for example CTRLDPR CTRIO Load Profile CTREDRL CTRIO Edit and JAA o A Reload Preset Table CTRRTLM CTRIO Config CTRIO Config NP CTRIO IB 1000 CTRIO IB 1000 CTRIO Run to Limit Mode ss CTRIO hn CTRIO hn Slot KI Slot KO The Input Output parameters for this O ee instruction can be copied directly from CTRIO Location CTRIO Location a Local Base C Local Base the CTRIO Workbench configuration C EBC Connected via ERM EBC Connected via ERM for this CTRIO module Since the Input v400 WordInput v400 s behavior is slightly different when the EE uul vee Output V400 Word Output v400 CTRIO module is in an EBC Base via Bitoutut Co G an ERM you must specify whether the CTRIO module is in a local base or in an EBC base CTRIO in Local Base CTRIO in EBC Base You must have the CTRIO Config IBox at the top of your ladder stage program along with any other configuration IBoxes If you have more than one CTRIO in your PLC you must have a different CTRIO Config IBox for EACH CTRIO module in your system that util
177. ory location that will be used by the instruction Slave ID specifies the slave ECOM 100 PLC that will be targeted by the ECWX instruction From Master Element Src specifies the location in the master ECOM100 PLC where the data will be sourced from Number of Bytes specifies the number of bytes to write to the slave ECOM 100 PLC To Slave Element Dest specifies the slave address the data will be written to Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Parameter DL405 Range K0 255 See DL405 V memory map Data Words K0 90 From Master Element Src See DL405 V memory map Data Words Number of Bytes K1 128 To Slave Element Dest X Y C S T CT GX GY V See DL405 V memory map SUCCESS 0 0 0 cece eee X Y C GX GY B See DL405 V memory map EITOR eccacyatetntraeetanscsnne nies X Y C GX GY B See DL405 V memory map DL405 PLC User Manual Supplement Box Instructions Rev B 107 DirectSOFT IBox Instructions for DL405 PLCs eee ECWX Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a diff
178. ote The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute CTRIO Run To Position Mode 2 CTRRTPM2 1B 1020 CTRIO K1 Output K2 Frequency K1000 Function K10 Duty Cycle K50 Position K15000 Workspace Success Error Error Code With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes DL405 PLC User Manual Supplement Box Instructions Rev B 23 7 DirectSOFT IBox Instructions for DL405 PLCs Br CTRRIPM2 Example Rung 1 This sets up the CTRIO module in slot 2 of the base Each CTRIO module in the system will need a separate CTRIO Config IBox before any CT Rxxxx Boxes can be used The CTRIO has been configured to use V2000 through V2025 for its input data and V2100 through V2131 for its output data Workspace Input V2000 V2025 28 Output V2100 V2131 Rung 2 This CTRIO Run To Position Mode 2 Box sets up Output 2 in CTRIO 1 to output pulses at a Frequency of 1000 Hz with a 5096 Duty Cycle use the Greater than Chl Fnl comparison operator until the input position of 15 000 is reached co 2 gt CTRIO Run To Position Mode 2 CTRRTPM2 1B 1020 CTRIO K1 Output K2 Frequency K1000 Function K10 Duty Cycle K50 Position K15000 Workspace Success Error Error Code 238 DL405 PLC
179. other ECOM100 based IBoxes ECxxxx You must have an ECOM100 Config IBox for each ECOM100 module in your system Configuration IBoxes must be at the top of your program and must execute every scan This IBox defines ECOM100 KO to be in slot 3 Any ECOM100 IBoxes that need to reference this specific module such as ECEMAIL ECRX would enter KO for their ECOM100 parameter The Status register is for reporting any completion or error information to other ECOM100 IBoxes This V memory register must not be used anywhere else in the entire program The Workspace register is used to maintain state information about the ECOM100 along with proper sharing and interlocking with the other ECOM100 IBoxes in the program This V memory register must not be used anywhere else in the entire program The Message Buffer of 65 words 130 bytes is a common pool of memory that is used by other ECOM100 IBoxes such as ECEMAIL This way you can have a bunch of ECEMAIL IBoxes but only need 1 common buffer for generating and sending each EMail These V memory registers must not be used anywhere else in your entire program ECOM100 Config ECOM100 ECOM100 x Slot Status Workspace Msg Buffer 65 WORDs V1400 v1500 DL405 PLC User Manual Supplement Box Instructions Rev B 6 1 DirectSOFT IBox Instructions for DL405 PLCs ECOM100 Disable DHCP ECDHCPD IB 736 DS5 6 Used HPP N A 62 ECOM100 Disable DH
180. ptitude l emploi en ce qui a trait aux activit s risque lev Pour des renseignements additionnels touchant la garantie et la s curit veuillez consulter la section Modalit s et conditions de notre documentation Si vous avez des questions au sujet de l installation ou du fonctionnement de cet quipement ou encore si vous avez besoin de renseignements suppl mentaires n h sitez pas nous t l phoner au 770 844 4200 Cette publication s appuie sur l information qui tait disponible au moment de l impression la soci t AutomationDirect nous nous efforcons constamment d am liorer nos produits et services C est pourquoi nous nous r servons le droit d apporter des modifications aux produits ou aux publications en tout temps sans pr avis ni quelque obligation que ce soit La pr sente publication peut aussi porter sur des caract ristiques susceptibles de ne pas tre offertes dans certaines versions r vis es du produit Marques de commerce La pr sente publication peut contenir des r f rences des produits fabriqu s ou offerts par d autres entreprises Les d signations des produits et des entreprises peuvent tre des marques de commerce et appartiennent exclusivement leurs propri taires respectifs AutomationDirect nie tout int r t dans les autres marques et d signations Copyright 2013 Automationdirect com Incorporated Tous droits r serv s Nulle partie de ce manuel ne doit tre copi e reprodui
181. put and the specified Input Function K10 must already be configured as a Counter or Quad Duty Cycle K50 Counter This configuration is done via CTRIO Position Workbench Workspace V403 io Success C4 The CTRIO Run To Position Mode IBox will take Error multiple PLC scans to complete Each time this IBox Error Code is triggered it will run to completion exactly one time It will start running on the rising edge of the input circuit and once triggered it will run to completion Any rising edges generated before the IBox completes will be ignored The IBox is complete when the either the Success bit or Error bit are set ON It references the CTRIO in the CTRIO Config IBox that is controlling the CTRIO module CTRRTPM2 Parameters CTRIO This number corresponds to the CTRIO specified in the CTRIO Config IBox for the CTRIO module being used Output Identifies which CTRIO Output to configure Frequency Specifies the pulse output frequency in Hertz Function Specifies which CTRIO Input resource and the comparison operator that determines when the target position is reached The following is a list of the valid resource comparison operators Description Less Than Ch1 Fn1 Greater Than Ch1 Fn1 Less Than Ch1 Fn2 Greater Than Ch1 Fn2 Less Than Ch2 Fn1 Greater Than Ch2 Fn1 Less Than Ch2 Fn2 Greater Than Ch2 Fn2 Duty Cycle Specifies the duty cycle of the output pulses 0
182. r cre Ko program Workspace V40D The Workspace parameter is an internal Slave ID KI H private register used by this IBox and MUST From Sie element ere C0 BE UNIQUE in this one instruction and ee ae me L MUST NOT be used anywhere else in your Success co program Error co Whenever this IBox has power it will read element data from the specified slave into the given destination V memory buffer giving other Network RX and Network WX Boxes on that Network a chance to execute For example if you wish to read and write data continuously from 5 different slaves you can have all of these NETRX and NETWX instructions in ONE RUNG driven by SP1 Always On They will execute round robin style automatically NETRX Parameters e Network specifies the CPU port s DCM s ECOM s Network defined by the NETCFG instruction Workspace specifies a V memory location that will be used by the instruction Slave ID specifies the slave PLC that will be targeted by the NETRX instruction From Slave Element Sro specifies the slave address of the data to be read Number of Bytes specifies the number of bytes to read from the slave device To Master Element Dest specifies the location where the slave data will be placed in the master PLC Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed
183. r for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan enable DHCP in the ECOM100 DHCP is the same protocol used by PCs for using a DHCP Server to automatically assign the ECOM100 s IP Address Gateway Address and Subnet Mask Typically this is done using NetEdit but this IBox allows you to enable DHCP in the ECOM100 using your ladder program The ECDHCPE is leading edge triggered not power flow driven similar to a counter input leg The commands to enable DHCP will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON The ECDHCPE does more than just set the bit to enable DHCP in the ECOM100 but it then polls the ECOM100 once every second to see if the ECOM100 has found a DHCP server and has a valid IP Address Therefore a timeout parameter is needed in case the ECOM100 cannot find a DHCP server If a timeout does occur the Error bit will turn on and the error code will be 1004 decimal The Success bit will turn on only if the ECOM100 finds a DHCP Server and is assigned a valid IP Address If successful turn on C100 If there is a failure turn on C101
184. rage SUMBIN Parameters JT o Sum Binary Numbers SUMBIN IB 502 Start Address 400 ti End Addr inclusive 400 Result DWORD binary V400 gt Start Address specifies the starting address of a block of V memory location values to be added together Binary End Addr inclusive specifies the ending address of a block of V memory location values to be added together Binary Result DWORD Binary specifies the location where the sum of the block of V memory binary values will be placed Parameter DL405 Range Start Address See DL405 V memory map Data Words End Address inclusive See DL405 V memory map Data Words Result DWORD Binary See DL405 V memory map Data Words 56 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs mm M SUMBIN Example In the following example the SUMBIN instruction is used to total the sum of all Binary values in words V2000 thru V2007 and store the resulting 8 digit double word Binary value in V3000 and V3001 Sum Binary Numbers SUMBIN IB 502 Start Address 2000 End Addr inclusive V2007 Result DWORD binan 3000 3001 DL405 PLC User Manual Supplement Box Instructions Rev B 57 DirectSOFT IBox Instructions for DL405 PLCs a Sum Real Numbers SUMR IB 542 DS5 6 Used HPP N A 58 Sum Real Numbers sums up a list of consecu
185. range Number of Elements The number of consecutive V Memory locations to process BCD Start of Destination The first V Memory location of the destination range Parameter DL405 Range Start of Source All V Memory Number of Elements K1 4095 All V Memory Start of Destination All V Memory Note The Source Range and the Destination Range CAN NOT overlap Note If the instruction will be moving double word values the Number of Elements must be an even number Note All of the locations will be moved in the same PLC scan which will cause an increase in the scan time Be aware this increase may be large enough to trip with watchdog timer 168 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs MOVEFOR Example In the following example the MOVEFOR instruction is used to move 8 words of data from V2070 V2077 to V3000 V3007 co Move Range of V using FOR NEXT MOVEFOR IB 204 Start of Source V2070 V2077 Number of Elements K8 Start of Destination V3000 V3007 DL405 PLC User Manual Supplement Box Instructions Rev B 169 DirectSOFT IBox Instructions for DL405 PLCs A_I Pp 2221 Absolute Value Binary ABSBIN IB 504 DS6 The Absolute Value Binary IBox returns the ZAA Used ONLY absolute value of the number Binary decimal Absolute Value Binary HPP WA found in the speci
186. rror Code All V Memory Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute CTRIO Velocity Mode 2 IB 1018 K100000 V401 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes Rung 1 This sets up the CTRIO module in slot 2 of the base Each CTRIO module in the system will need a separate CTRIO Config Box before any CT Rxxxx Boxes can be used The CTRIO has been configured to use V2000 through V2025 for its input data and V2100 through V2131 for its output data CTRIO Config CTRIO CTRIO st Slot Workspace Input V2000 V2025 Output V2100 V2131 Rung 2 This CTRIO Velocity Mode 2 Box sets up Output 3 in CTRIO 1 to output 100 000 pulses at a Frequency of 1000 Hz with a 50 Duty Cycle CTRIO Velocity Mode 2 CTRVEL2 I1B 1018 CTRIO K1 Output K3 Frequency K1000 Duty Cycle K50 Step Count K100000 Workspace V401 Success C1 Error c2 Error Code v3000 DL405 PLC User Manual Supplement Box Instructions Rev B 233 DirectSOFT IBox Instructions for DL405 PLCs CTRIO Run to Limit Mode 2 CTRRTLM2 IB 1019 nee The CTRIO Run to Limit Mode 2 Box will setup 5 onty US the CTRIO or CTRIO2 module to perform a Run to CTRIO Run To Limit Mode 2 HPP
187. ry MATHBIN IB 501 DS5 6 Used HPP N A Math Binary Format lets you enter complex mathematical expressions like you would in Visual Basic Excel or C to do complex calculations nesting parentheses up to 4 levels deep In addition to you can do TT o Modulo 96 aka Remainder Shift Right Math Binary gt gt and Shift Left lt lt Bit wise And amp MATHBIN IB 501 Or Xor and some binary functions WORD Result Convert to BCD BCD Convert to Binary Expression BIN Decode Bits DECO Encode Bits z ENCO Invert Bits INV HEX to Seven Segment Display SEG and Sum Bits SUM Example V2000 V2001 V2003 K10 SUM V3000 amp K001F Every V memory reference MUST be to a single word binary formatted value Intermediate results can go up to 32 bit values but as long as the final result fits in a 16 bit binary word the calculation is valid Typical example of this is scaling using multiply then divide V2000 K1000 K4095 The multiply term most likely will exceed 65535 but fits within 32 bits The divide operation will divide 4095 into the 32 bit accumulator yielding a result that will always fit in 16 bits You can reference BCD V memory values by using the BIN conversion function on a V memory location but NOT an expression That is BIN V2000 is okay and will convert V2000 from BCD to Binary but BIN V2000 V3000 will add V2000 as Binary
188. s e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Description specifies the starting buffer location where the ECOM100 s Module Name will be placed Num Char specifies the number of characters bytes to read from the ECOM100 s Description field Parameter DL405 Range K0 255 See DL405 V memory map Data Words SUCCESS oss ie aie X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words Num Chars K1 128 80 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E ECRDDES Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx IBoxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx IBoxes
189. s register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM10 0 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan read the Subnet Mask of the ECOM100 and store it in V3000 thru V3003 4 decimal numbers The ECOM100 s Subnet Mask could be displayed by an HMI The ECRDSNM is leading edge triggered not power flow driven similar to a counter input leg The command to read the Subnet Mask will be sent to the ECOM100 whenever the power flow into the IBox goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 _FirstScan ECOM100 Read Subnet Mask SPO ECRDSNM ECOM100 Workspace Success Error C101 Subnet Mask 4 words V3000 3003 DL405 PLC User Manual Supplement Box Instructions Rev B 9 1 DirectSOFT IBox Instructions for DL405 PLCs eee ECOM100 Write Description ECWRDES IB 727 DS5 6 Used HPP N A ECOM100 Write Description will write the given Description to the ECOM100 module on a leading edge transition to the IBox If you use a dollar sign or double quote use the PRINT VPRINT escape sequence of TWO dollar signs for a sing
190. s the low alarm limit Low Alarm On when the low limit is reached Low Low Limit V memory location or constant specifies the low low alarm limit Low Low Alarm On when the low low limit is reached Parameter DL405 Range Monitoring Value Binary See DL405 V memory map Data Words High High Limit K0 65535 or see DL405 V memory map Data Words See DL405 V memory map K0 65535 or see DL405 V memory map Data Words See DL405 V memory map K0 65535 or see DL405 V memory map Data Words See DL405 V memory map Low Low Limit K0 65535 or see DL405 V memory map Data Words Low Low Alarm X Y C GX GY B See DL405 V memory map 20 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR HILOALB Example In the following example the HILOALB instruction is used to monitor a binary value that is in V2000 If the value in V2000 meets exceeds the high limit of the binary value in V2011 C101 will turn on If the value continues to increase to meet exceed the high high limit value in V2010 C100 will turn on Both bits would be on in this case The high and high high limits and alarms can be set to the same V memory location value if one high limit or alarm is desired to be used If the value in V2000 meets or falls below the low limit of the binary value in V2012 C102 will turn on If the value
191. separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO K1 Slot K2 Workspace 400 Input v2000 v2025 Output 2030 V20B1 example continued on next page DL405 PLC User Manual Supplement Box Instructions Rev B 13 5 DirectSOFT IBox Instructions for DL405 PLCs eee CTRINPT Example cont Rung 2 This rung is a sample method for enabling the CTRINPT command A C bit is used to allow the programmer to control the command from Data View for testing purposes Turning on CO will cause the CTRINPT instruction to create a single entry preset table but not as a file and use it for the output 0 In this case the single preset will be a set at a count of 15 for output 0 Operating procedure for this example code is to load the CTRINPT ex1 cwb file to your CTRIO then enter the code shown here change to RUN mode enable output 0 by turning on C2 in Data View turn encoder on CTRIO to value above 15 and output 0 light will not come on Now reset the counter with C1 enable CO to execute CTRINPT command to create a single preset table with a preset to set output 0 at a count of 15 then turn encoder to value of 15 output 0 should turn on CTRIO Initialize Preset Table Start CTRINPT CTRINPT co CTRIO Output Entry Type Pulse Time Preset
192. ser Manual Supplement Box Instructions Rev B 27 DirectSOFT IBox Instructions for DL405 PLCs Push On Push Off Circuit PONOFF IB 300 DS5 6 Usea Push On Push Off Circuit toggles an output state whenever its input power flow transitions HPP N A from off to on Requires an extra bit parameter for scan to scan state information This extra bit must NOT be used anywhere else in the program This is also known as a flip flop circuit Parse PONOFF Parameters Push On Push Off Circuit Discrete Input specifies the input that will PONOFF IB 300 toggle the specified output Discrete Input Co Discrete Output specifies the output that Discrete Output Co will be turned on off or toggled z Internal State co Internal State specifies a work bit that is used by the instruction Parameter DL405 Range XY C S T CT GX GY SP B PB See DL405 V memory map X Y C GX GY B See DL405 V memory map Internal State eee eee ee eee X Y C See DL405 V memory map 28 l DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn nn RRR PONOFF Example In the following example the PONOFF instruction is used to control the on and off states of the output C20 with a single input C10 When C10 is pressed once C20 turns on When C10 is pressed again C20 turns off C100 is an internal bit used by the instruction
193. sole property of their respective owners AutomationDirect disclaims any proprietary interest in the marks and names of others Copyright 2013 Automationdirect com Incorporated All Rights Reserved No part of this manual shall be copied reproduced or transmitted in any way without the prior written consent of Automationdirect com Incorporated AutomationDirect retains the exclusive rights to all information included in this document AVERTISSEMENT A Nous vous remercions d avoir achet l quipement d automatisation de Automationdirect com en faisant des affaires comme AutomationDirect Nous tenons ce que votre nouvel quipement d automatisation fonctionne en toute s curit Toute personne qui installe ou utilise cet quipement doit lire la pr sente publication et toutes les autres publications pertinentes avant de l installer ou de l utiliser Afin de r duire au minimum le risque d ventuels probl mes de s curit vous devez respecter tous les codes locaux et nationaux applicables r gissant l installation et le fonctionnement de votre quipement Ces codes diff rent d une r gion l autre et habituellement voluent au fil du temps Il vous incombe de d terminer les codes respecter et de vous assurer que l quipement l installation et le fonctionnement sont conformes aux exigences de la version la plus r cente de ces codes Vous devez tout le moins respecter toutes les sections applicables du Code na
194. specified slave into the given destination V memory buffer giving other ECOM100 RX and ECOM100 WX Boxes on that ECOM100 network a chance to execute For example if you wish to read and write data continuously from 5 different slaves you can have all of these ECRX and ECWX instructions in ONE RUNG driven by SP1 Always On They will execute round robin style automatically ECRX Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Slave ID specifies the slave ECOM 100 PLC that will be targeted by the ECRX instruction From Slave Element Src specifies the slave address of the data to be read Number of Bytes specifies the number of bytes to read from the slave ECOM 100 PLC To Master Element Dest specifies the location where the slave data will be placed in the master ECOM100 PLC Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Parameter DL405 Range K0 255 See DL405 V memory map Data Words K0 90 See DL405 V memory map Number of Bytes K1 128 To Master Element Dest See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map EN
195. stant K decimal values KO K65535 and or binary decimal V memory locations You must ensure that threshold limits are valid that is HH gt H gt L LL Note that when the High High or Low Low alarm condition is true that the High and Low alarms will also be set respectively This means you may use the same threshold limit and same alarm bit for the High High and the High alarms in case you only need one High alarm Also note that the boundary conditions are inclusive That is if the Low boundary is K50 and the Low Low boundary is K10 and if the Monitoring Value v 2158 o Hi Low Alarm Binary HILOALB IB 401 Monitoring Value Binary High High Limit TAO gt High High Alarm High Limit TAO High Alarm Low Limit TAO Low Alarm Low Low Limit TAO b Low Low Alarm co equals 10 then the Low Alarm AND the Low Low alarm will both be ON If there is no power flow to the IBox then all alarm bits will be turned off regardless of the value of the Monitoring Value parameter HILOALB Parameters e Monitoring Value Binary specifies the V memory location of the Binary value to be monitored High High Limit V memory location or constant specifies the high high alarm limit High High Alarm On when the high high limit is reached High Limit V memory location or constant specifies the high alarm limit High Alarm On when the high limit is reached Low Limit V memory location or constant specifie
196. stant value to write to the specified register Destination Register selectable option 0 Ch1Fn1 Accumulator 10 Ch2Fn1 Reset Value 1 Ch1Fn2 Accumulator 11 Ch2Fn2 Reset Value 2 Ch2Fn1 Accumulator 12 Ch1A Filter Time CTRIO2 3 Ch2Fn2 Accumulator 13 Ch1B Fi ilter Ti CTRIO2 4 OutO Position 14 Ch1C F ilter Ti CTRIO2 5 Out Position 15 Ch1D Filter Ti CTRIO2 6 Out2 Position 16 Ch2A F ilter Ti 7 Out3 Position 17 Ch2B F ilter Ti CTRIO2 8 Ch1Fn1 Reset Value 18 Ch2C F ilter Ti CTRIO2 9 ChiFn2 Reset Value 19 Ch2D Filter Ti me me me me CTRIO2 me me me CTRIO2 Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Register Write succeeds and OFF if the Register Write fails Error This BIT will be OFF if the Register Write succeeds and ON if the Register Write fails Parameter DL405 Range K0 255 K O FFFFFFFF All V Memory All User V Memory SUCCESS iie es X Y C GX GY B All Bit Memory EO CE osos poc RENE X Y C GX GY B All Bit Memory 230 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Note The gray triangle at the right end of an input leg indicat
197. stored Parameter DL405 Range R 3 402823E 38 3 402823E 38 All P Memory All User V Memory K0 5 All User V Memory 180 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs RTOBIN Example In the following example the RTOBIN instruction is used to convert the real value R3 14159 to a binary number which is stored in V2166 K4 in the decimal points implies that the data will have four digits to the right of the decimal point The resulting value in V2166 is 31416 _On SP1 Real to Unsigned Binary w Implied Decimal Pt and Rounding 1 eee RTOBIN IB 565 Value DWORD Real R3 14159 Number of Decimal Points Result WORD Unsigned Binary DL405 PLC User Manual Supplement Box Instructions Rev B 18 DirectSOFT IBox Instructions for DL405 PLCs Real to Double Unsigned Binary with Implied Decimal Point and Rounding RTOBIND IB 567 Dos The Real to Double Unsigned Binary with Qaa onty Sed Implied Decimal Point and Rounding IBox Real to Double Unsigned Binary wilmplied Decimal Pt and Rounding ppp WA converts the 32 bit real number to a 32 bit RTOBIND IU n Value DWORD Real R3 14159 t Unsigned Binary decimal value Number of Decimal Points K5 h compensating for an implied number of Result DWORD Unsigned Binary V2170 decimal points then rounding the number up if needed
198. succeeds and ON if the ECRDPL fails PEERLINK Status 6 Words The first of the 6 consecutive V Memory registers where the PEERLINK Status values will be stored Parameter DL405 Range K0 255 All User V Memory SUCCESS i diebns ro ants X Y C GX GY B All Bit Memory EFTOT i cn ente e eod X Y C GX GY B All Bit Memory PEERLINK Status All User V Memory Note When the ECRDPL IBox is allowed to execute the Success and Error BITs are both set to OFF One of B these Bits is guaranteed to be ON after the IBox execution is complete These BITs will retain their ON OFF value until the IBox is executed again Note The gray triangle at the right end of an input leg indicates the input is edge triggered Meaning that each time the input logic transitions from OFF to ON this instruction will execute ECOM100 Read PEERLINK Status ECRDPL IB 742 ECOM100 Workspace Success Error PEERLINK Status 6 words V2000 V2005 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes 2 12 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs ECRDPL Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 3 as ECOM100 K1 All other ECxxxx IBoxes refer to this module as K1 If
199. te ou transmise de quelque facon que ce soit sans le consentement pr alable crit de la soci t Automationdirect com Incorporated AutomationDirect conserve les droits exclusifs l gard de tous les renseignements contenus dans le pr sent document DirectSOFT IBox Instructions for DL405 PLCs rm H m SR E Q R MG as Notes a DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs WAUTOMATIONDIRECT Please include the Manual Number and the Manual Issue both shown below when communicating with Technical Support regarding this publication Manual Number DL405 IBOX S Supplement to D4 USER M Issue Original Edition Rev B Issue Date 7 14 Publication History Issue Description of Changes 1st Edition Original Edition Rev A Minor Corrections Rev B Added DireciSOFT6 IBox Instructions DL405 PLC User Manual Supplement Box Instructions Rev B 5 DirectSOFT IBox Instructions for DL405 PLCs C Overview The IBox Instructions listed in this supplement are in addition to the Standard RLL Instructions found in Chapter 5 of the DL405 User Manual This supplement contains IBox instructions that are available in DirectSOFT5 and those that are available in DirectSOFT6 The new Box instructions for DzrectSOFT6 are labelled as DirectSOFT6 ONLY For more information on DirectSOFT and to download our Fr
200. tered into CTRIO Workbench I O Map to configure this specific CTRIO module These starting addresses are the memory locations used in the CTRIO IBox instruction as the Word Input Bit Input Word Output and Bit Output addresses as shown below For more information on this topic refer to the CTRIO User Manual Program Control chapter CTRIO Config CTRIO CTRIO Slot Workspace Word Input v2000 v2017 Bit Input B40415 0 B40423 15 Word Output v2100 v2123 Bit Output B40515 0 B40522 15 DL405 PLC User Manual Supplement Box Instructions Rev B 1 19 DirectSOFT IBox Instructions for DL405 PLCs eee CTRIO Add Entry to End of Preset Table CTRADPT IB 1005 DS5 6 Used HPP N A CTRIO Add Entry to End of Preset Table on a leading edge transition to this IBox will append an entry to the end of a memory based Preset Table on a specific CTRIO Output resource This Box will take more than 1 PLC scan to execute Either the Success or Error bit will turn on when the command is complete If the Error Bit is on you can use the CTRIO Read Error Code CTRRDER IBox to get extended error information Entry Type KO Set K1 Reset K2 Pulse On uses Pulse Time K3 Pulse Off uses Pulse Time K4 Toggle K5 Reset Count o CTRIO Add Entry to End of Preset Table CTRADPT IB 1005 CTRIO Output K0 ba Entry Type V400 i Pulse Time Preset Count Workspace V400 id Success co xi Error co
201. tional de pr vention des incendies du Code national de l lectricit et des codes de la National Electrical Manufacturer s Association NEMA Des organismes de r glementation ou des services gouvernementaux locaux peuvent galement vous aider d terminer les codes ainsi que les normes respecter pour assurer une installation et un fonctionnement s rs L omission de respecter la totalit des codes et des normes applicables peut entrainer des dommages l quipement ou causer de graves blessures au personnel Nous ne garantissons pas que les produits d crits dans cette publication conviennent votre application particuli re et nous n assumons aucune responsabilit l gard de la conception de l installation ou du fonctionnement de votre produit Nos produits ne sont pas insensibles aux d faillances et ne sont ni congus ni fabriqu s pour l utilisation ou la revente en tant qu quipement de commande en ligne dans des environnements dangereux n cessitant une s curit absolue par exemple l exploitation d installations nucl aires les syst mes de navigation a rienne ou de communication le contr le de la circulation a rienne les quipements de survie ou les syst mes d armes pour lesquels la d faillance du produit peut provoquer la mort des blessures corporelles ou de graves dommages mat riels ou environnementaux activit s risque lev La soci t AutomationDirect nie toute garantie expresse ou implicite d a
202. tions Rev B DirectSOFT IBox Instructions for DL405 PLCs INCBYBIND Example In this example the INCBYBIND instruction will add the value K10000 to the double word binary value in V2102 V2103 on every scan that CO is ON Increment by Binary Double 1 INCBYBIND 1B 506 Increment DWORD Binary V2102 V2103 By DWORD Binary K10000 DL405 PLC User Manual Supplement Box Instructions Rev B 203 DirectSOFT IBox Instructions for DL405 PLCs mm a d Increment By BCD INCBYBCD IB 524 DS6 cod The Increment By BCD IBox will add the By EAA o ONLY WORD BCD Value to the Increment Increment by BCD HPP N A WORD BCD Value on each scan the INCBYBCD 1B 524 instruction is enabled Increment WORD BCD By WORD BCD INCBYBCD Parameters Increment WORD BCD The V Memory location where the 16 bit BCD value is located By WORD BCD The WORD BCD value to add Parameter DL405 Range All V Memory KO 9999 All V Memory Discrete Bit Flags Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP66 On when the 16 bit addition instruction results in a carry SP67 On when the 32 bit addition instruction results in a carry SP70 On anytime the value in the accumulator is negative SP73 On when a signed addition or subtraction results in an incorrect sign bit SP75 On when a BCD instruction is executed and a NON BCD number was encountered
203. tive REAL DWORD numbers into a REAL DWORD result You specify the group s starting and ending V memory addresses inclusive Remember that Real numbers are DWORDs o and occupy 2 words of V memory each so Sum Real Numbers the number of Real values summed up is SUMR IB 542 equal to half the number of memory Start Address DWORD V400 g locations Note that the End Address can be End Addr inclusive DWORD V400 g EITHER word of the 2 word ending address Result DWORD for example if you wanted to add the 4 Real numbers stored in V2000 thru V2007 V2000 V2002 V2004 and V2006 you can specify V2006 OR V2007 for the ending address and you will get the same result When enabled this instruction will add up all the numbers in the group so you may want to place a differential contact driving the enable SUMR could be used as the first part of calculating an average SUMR Parameters Start Address DWORD specifies the starting address of a block of V memory location values to be added together Real End Addr inclusive DWORD specifies the ending address of a block of V memory location values to be added together Real Result DWORD specifies the location where the sum of the block of V memory Real values will be placed Parameter DL405 Range Start Address inclusive DWORD See DL405 V memory map Data Words End Address inclusive DWORD See DL405 V memory map Data Words Result DWORD See
204. to V3000 as Binary then interpret the result as BCD and convert it to Binary NOT GOOD Also the final result is a 16 bit binary number and so you could do BCD around the entire operation to store the result as BCD MATHBIN Parameters WORD Result specifies the location where the binary result of the mathematical expression will be placed result must fit into 16 bit single V memory location Expression specifies the mathematical expression to be executed and the result is stored in specified WORD Result Each V memory location used in the expression must be in binary format Parameter DL405 Range See DL405 V memory map Data Words Text 40 l D1405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nn M H MATHBIN Example In the following example the MATHBIN instruction is used to calculate the math expression which multiplies the Binary value in V1200 by 1000 then divides by 4095 and loads the resulting value in V2000 Math Binary MATHBIN IB 501 WORD Result v2000 Expression v1200 K1000 K4095 DL405 PLC User Manual Supplement Box Instructions Rev B 141 DirectSOFT IBox Instructions for DL405 PLCs rr Math Real MATHR IB 541 DS5 6 Used Math Real Format lets you enter complex mathematical expressions like you would in HPP N A Visual Basi
205. truction is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed DHCP Enabled specifies a bit that will turn on if the ECOM100 s DHCP is enabled or remain off if disabled after instruction query be sure to check the state of the Success Error bit state along with DHCP Enabled bit state to confirm a successful module query Parameter DL405 Range ECOM100 K0 255 See DL405 V memory map Data Words SUCCESS ossis es bos X Y C GX GY B See DL405 V memory map EMO wots E EERDAEPEC Ran X Y C GX GY B See DL405 V memory map DHCP Enabled X Y C GX GY B See DL405 V memory map 66 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs nnn RRR ECDHCPQ Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes
206. turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Module ID specifies the location where the ECOM100 s Module ID decimal will be placed Parameter DL405 Range K0 255 See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map EITOL o expe x Es X Y C GX GY B See DL405 V memory map See DL405 V memory map Data Words 86 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs cj ECRDMID Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type Boxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx Boxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECom100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 On the 2nd scan read the Module ID of the ECOM100 and store it in V2000 The ECRD
207. ur P Address TERETE program cunt Either the Success or Error bit parameter will GatewayAddress o0 0 0 0 turn on once the command is complete If there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 This setup data is stored in Flash ROM in the ECOM100 and will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SP0 NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECIPSUP Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written IP Address specifies the module s IP Address Subnet Mask specifies the Subnet Mask for the module to use Gateway Address specif
208. using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan read whether DHCP is enabled or disabled in the ECOM100 and store it in C5 DHCP is the same protocol used by PCs for using a DHCP Server to automatically assign the ECOM100 s IP Address Gateway Address and Subnet Mask The ECDHCPQ is leading edge triggered not power flow driven similar to a counter input leg The command to read Query whether DHCP is enabled or not will be sent to the ECOM100 whenever the power flow into the Box goes from OFF to ON If successful turn on C100 If there is a failure turn on C101 FirstScan ECOM100 Query DHCP Setting SPO ECDHCPQ ECOM100 Workspace Success Error DHCP Enabled DL405 PLC User Manual Supplement Box Instructions Rev B 67 DirectSOFT IBox Instructions for DL405 PLCs a ECOM100 Send E mail ECEMAIL IB 711 DS5 6 Used HPP N A ECOM100 Send EMail on a leading edge transition will behave as an EMail client and send an SMTP request to your SMTP Server to send the EMail message to the EMail addresses in the To field and also to those listed in the Cc list hard coded in the ECOM100 It will send m ECOM100 Send EMail the SMTP request based on the specified Beene leat ECOM100 which corresponds to a specific CRE
209. ut Bit address as defined by the I O configuration in the ERM Workbench 1 18 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL205 Range K0 255 K0 7 See DL205 V memory map Data Words Input Word Bit See DL205 V memory map Data Words Output Word Bit See DL205 V memory map Data Words CTRIO Example local base Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CT Rxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO Slot Workspace Input v2000 v2025 Output 2030 2061 CTRIO Example EBC base Overview ERM Workbench must first be used to assign memory addresses to the I O modules in the EBC base Once the CTRIO module memory addresses are established using ERM Workbench they are used in CTRIO Workbench and in a CTRIO Box instruction to configure and define a specific CTRIO module For this example the CTRIO module uses V2000 V2017 for its Word Input data and V40416 0 V40423 15 for its Bit Input data The module uses V2100 V2123 for its Word Output data and V40515 0 V40522 15 for its Bit Output data The starting addresses V2000 and V40416 for inputs and V2100 and V40515 for outputs are en
210. value in the accumulator is negative 190 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs DECBYBIN Example In this example the DECBYBIN instruction will subtract the value K100 from the binary value in V2112 on every scan that CO is ON co Decrement by Binary DECBYBIN IB 507 Decrement WORD Binary V2112 By WORD Binary K100 DL405 PLC User Manual Supplement IBox Instructions Rev B 19 1 DirectSOFT IBox Instructions for DL405 PLCs A Decrement By Binary Double DECBYBIND IB 508 DS6 cod The Decrement By Binary Double Box will Vita o ONLY subtract the By DWORD Binary Value from Decrement by Binary Double HPP N A the Decrement DWORD Binary Value on DECBYBIND 16 508 each scan the instruction is enabled Em By DWORD Binary DECBYBIND Parameters Decrement DWORD Binary The V Memory location where the 32 bit Binary Double decimal value is located 28 By DWORD Binary The DWORD Binary decimal value to subtract Parameter DL405 Range All V Memory Discrete Bit Flags KO 4294967295 All V Memory Description SP63 On when the result of the instruction causes the value in the accumulator to be zero SP64 On when the 16 bit subtraction instruction results in a borrow SP65 On when the 32 bit subtraction instruction results in a borrow
211. will perform the WX on the specified ECOM100 s network which corresponds to a specific unique ECOM 100 Configuration ECOM100 IBox at the top of your program The Workspace parameter is an internal private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program Whenever this IBox has power it will write data from the master s V memory buffer to the Used ECOM100 WX Network Write performs the WX instruction with built in interlocking with WA all other ECOM100 RX ECRX and ECOM100 WX ECWX Boxes in your program to Rare o ECOM100 WX Network Write ECWX IB 741 ECOM100 KO s Workspace aon t Slave ID ko From Master Element Src TAO a Number Of Bytes K1 a To Slave Element Dest co Success co M Error co specified slave starting with the given slave element giving other ECOM100 RX and ECOM100 WX Boxes on that ECOM100 network a chance to execute For example if you wish to read and write data continuously from 5 different slaves you can have all of these ECRX and ECWX instructions in ONE RUNG driven by SP1 Always On They will execute round robin style automatically ECWX Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V mem
212. words V402 V415 With each execution this instruction will run to completion even if the input logic transitions to OFF before the instruction completes 224 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs a ERMSTATS Example Rung 1 The ERM Config Box is responsible for coordination interlocking of all ERM type Boxes for one specific ERM module Tag the ERM in slot 1 as ERM KI All other ERxxxx IBoxes refer to this module as K1 If you need to move the module in the base to a different slot then you only need to change this one IBox 1 ERM Config ERM ERM Slot Workspace v400 Rung 2 The error information will be read from ERM 1 with the result placed into twelve S memory locations starting at V402 C1 will be enable if the read is a success C2 will be enabled if the attempted read results in failure co eo ERM Read Status ERMSTATS ERM Workspace Success al Error Status Buffer 12 words V402 V415 DL405 PLC User Manual Supplement Box Instructions Rev B 225 DirectSOFT IBox Instructions for DL405 PLCs mm A EEeEKLONIL LARMEELIA LI I LTUL LOAEEEEUHLAEEEEOEOLULNLUD XEOEAAa AGRGLLLAKOO G Aeqfj CTRIO Edit Level CTRELVL IB 1015 DS6 ONLY Used HPP N A The CTRIO Edit Level IBox will configure the Level Mode behavior for a Discrete Output of a CTRIO module It references the CTRIO in the CTRIO
213. x Instructions for DL405 PLCs E HILOAL Example In the following example the HILOAL instruction is used to monitor a BCD value that is in V2000 If the value in V2000 meets exceeds the high limit of K900 C101 will turn on If the value continues to increase to meet exceed the high high limit C100 will turn on Both bits would be on in this case The high and high high limits and alarms can be set to the same value if one high limit or alarm is desired to be used If the value in V2000 meets or falls below the low limit of K200 C102 will turn on If the value continues to decrease to meet or fall below the low low limit of K100 C103 will turn on Both bits would be on in this case The low and low low limits and alarms can be set to the same value if one low limit or alarm is desired to be used SP1 Hi Low Alarm BCD HILOAL IB 421 Monitoring Value BCD 2000 High High Limit K1000 High High Alarm C100 High Limit K900 High Alarm C101 Low Limit K200 Low Alarm C102 Low Low Limit K100 Low Low Alarm C103 DL405 PLC User Manual Supplement IBox Instructions Rev B 19 DirectSOFT IBox Instructions for DL405 PLCs eee Hi Low Alarm Binary HILOALB IB 401 DS5 6 Used HPP N A Hi Low Alarm Binary monitors a binary decimal V memory location and sets four possible alarm states High High High Low and Low Low whenever the IBox has power flow You enter the alarm thresholds as con
214. y cycle of the output pulses 0 5096 Step Count This DWORD value specifies the number of pulses to output A Step Count value of 1 or OxFFFFFFFF causes the CTRIO to output pulses continuously Negative Step Count values must be V Memory references Workspace A V Memory register that is used internally by this IBox It must not be used by any other instructions in the PLC Success This BIT will be ON if the Setup Velocity Mode succeeds and OFF if it fails Error This BIT will be OFF if the Setup Velocity Mode succeeds and ON if it fails Error Code A V Memory register that is used to store the Error if the Setup Velocity Mode fails The following table has a list of the possible Error Code values Error Code Description 0 No Error 2002 Output Enable was already ON when the Instruction was enabled 2003 The CTRIO module reported an error Use the CTRIO Read Error CTRRDER IBox to read the CTRIO module s error code to determine what went wrong DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs Parameter DL405 Range K0 255 K0 3 K20 20000 K20 65535 CTRIO2 All User V Memory K0 99 All User V Memory K0 2147483647 All User V Memory All User V Memory All Bit Memory All Bit Memory CTRVEL2 Example CTRVEL2 CTRIO Output Frequency Duty Cycle Step Count Workspace Success Error E
215. y locations Parameter DL405 Range K0 255 See DL405 V memory map Data Words X Y C GX GY B See DL405 V memory map ENON BOE OR IO ERE CEDENS X Y C GX GY B See DL405 V memory map IP Address 4 Words See DL405 V memory map Data Words 84 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs E ECRDIP Example Rung 1 The ECOM100 Config IBox is responsible for coordination interlocking of all ECOM100 type IBoxes for one specific ECOM100 module Tag the ECOM100 in slot 1 as ECOM100 KO All other ECxxxx IBoxes refer to this module as KO If you need to move the module in the base to a different slot then you only need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx IBoxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDS V402 V502 Rung 2 On the 2nd scan read the IP Address of the ECOM100 and store it in V3000 thru V3003 4 decimal numbers The ECOM100 s IP Address could be displayed by an HMI The ECRDIP is leading edge triggered not power flow driven similar to a counter input leg The c
216. y need to change this one IBox V400 is used as a global result status register for the other ECxxxx Boxes using this specific ECOM100 module V401 is used to coordinate interlock the logic in all of the other ECxxxx Boxes using this specific ECOM100 module V402 V502 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer B5 WORDS V402 V502 Rung 2 Whenever an EStop is pushed ensure that president of the company gets copies of all EMails being sent The ECOM100 EMail Setup Box allows you to set change the SMTP EMail settings stored in the ECOMIOO ECOM100 EMail Setup EStop Pushed ECEMSUP C11 ECOM100 Workspace Success Error Error Code SMTP Server IP Addr Sender Name Sender Email Port Number Timeout sec Cc president acme com example continued on next page 72 DL405 PLC User Manual Supplement Box Instructions Rev B DirectSOFT IBox Instructions for DL405 PLCs lt M ECEMRDS Example cont Rung 3 Once the EStop is pulled out take the president off the cc list by restoring the default EMail setup in the ECOM100 The ECEMRDS is leading edge triggered not power flow driven similar to a counter input leg The ROM based EMail configuration stored in the ECOM100 will be copied over the working copy whenever the power flow into the IBox goes from OFF to ON the working
217. yield 50 50 duty cycle is defined as on half the time and off half the time e Step Count specifies the number of pulses to output as a 32 bit Hex number a value of Kffffffff will cause the profile to run continuously as long as the output is enabled Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the instruction has successfully completed Error specifies a bit that will turn on if the instruction does not complete successfully Parameter DL405 Range K0 255 K0 3 K20 20000 See DL405 V memory map Data Words K0 99 See DL405 V memory map K0 2147483647 See DL405 V memory map See DL405 V memory map Data Words SUCCESS 000 cece X Y C GX GY B See DL405 V memory map X Y C GX GY B See DL405 V memory map DL405 PLC User Manual Supplement Box Instructions Rev B 153 DirectSOFT IBox Instructions for DL405 PLCs eee CTRVELO Example Rung 1 This sets up the CTRIO card in slot 2 of the local base Each CTRIO in the system will need a separate CTRIO I box before any CTRxxxx I boxes can be used for them The CTRIO has been configured to use V2000 through V2025 for its input data and V2030 through V2061 for its output data CTRIO Config CTRIO IB 1000 CTRIO Slot Workspace Input 2000 v2025 Output V2030 V20B1 Rung 2 This CTRIO Velocity Mode IBox sets up Output 0 in C
218. you need to move the module in the base to a different slot then you only need to change this one IBox V1501 is used as a global result status register for the other ECxxxx IBoxes using this specific ECOM100 module V1502 is used to coordinate interlock the logic in all of the other ECxxxx Boxes using this specific ECOM100 module V1400 V1500 is a common 130 byte buffer available for use by the other ECxxxx Boxes using this specific ECOM100 module 1 ECOM100 Config ECOM100 ECOM100 Slot Status Workspace Msg Buffer 65 WORDs V1400 V1500 Rung 2 Each time that CO is enabled 6 PEERLINK status locations will be read from the ECOM100 and stored in V2000 V2005 C1 will be enabled if the read is a success C2 will be enabled if the attempted read results in failure co 2 ECOM100 Read PEERLINK Status ECRDPL ECOM100 Workspace Success Error PEERLINK Status 6 words V2000 V2005 DL405 PLC User Manual Supplement Box Instructions Rev B 2 13 DirectSOFT IBox Instructions for DL405 PLCs C ECOM100 Write PEERLINK Pause ECWRPLPA IB 743 DS6 ONLY Used HPP N A The ECOM100 Write PEERLINK Pause IBox will Enable and or Disable the PEERLINK processing in the specified ECOM100 It references the ECOM100 of the ECOM100 Config IBox that is controlling the ECOM100 module in a specific slot The ECOM100 Config contains built in interlocking logic that is used to synchronize the processin
219. your Success co program Error Either the Success or Error bit parameter will Error Code V400 s turn on once the command is complete If Gateway Address 0 0 0 0 there is an error the Error Code parameter will report an ECOM100 error code less than 100 or a PLC logic error greater than 1000 The Gateway Address is stored in Flash ROM in the ECOM100 and the execution of this IBox will disable the ECOM100 module for at least a half second until it writes the Flash ROM Therefore it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on the second scan Since it requires a LEADING edge to execute use a NORMALLY CLOSED SP0 STR NOT First Scan to drive the power flow to the IBox In order for this ECOM100 IBox to function you must turn ON dip switch 7 on the ECOM100 circuit board ECWRGWA Parameters e ECOM100 this is a logical number associated with this specific ECOM100 module in the specified slot All other ECxxxx Boxes that need to reference this ECOM100 module must reference this logical number Workspace specifies a V memory location that will be used by the instruction Success specifies a bit that will turn on once the request is completed successfully Error specifies a bit that will turn on if the instruction is not successfully completed Error Code specifies the location where the Error Code will be written Gateway Address specifies the Gateway IP Address that will be written to the module

Download Pdf Manuals

image

Related Search

Related Contents

OK W-D4 User's Manual  L`écrit est dans l`escalier - Association Française pour la Lecture    d-briDGe  全 文 - 国土技術政策総合研究所  On the Development of Real-Time Multi  MSI Gaming GE70 0ND-072  Une lecture de l`inachèvement par le blanc dans La  FULL CONTAINER HANDLERS  

Copyright © All rights reserved.
Failed to retrieve file