Host Engineering Forum
General Category => ECOMs and ECOM100s => Topic started by: reedsr on May 23, 2012, 03:44:47 PM
-
Hi,
New here and new to PLCs specifically the DL06 and the ECOM100. A vendor recently had promised us a feature and is unable to provide said feature so I am left with the task of implementing MODBUS to the DL06 PLC which will send 4-20mA outputs to our DCS. Our DCS is old and pretty much only talks 4-20 or Digitals.
So I have been reading the manual all day and browsing. I understand Decimal/Octals, and their conversions. I am reading the section regarding the READ/WRITE routine creation and I have some questions that I hope someone can help with.
Background Info:We have an Analyzer that is configured as a slave for MODBUS TCP/IP, we have this DL06 with the ECOM100 that is supposed to talk with it. I have the registers on the slave I want to read.
On to the Routine
[LD K0110] (ECOM SLOT and Location) - I am comfortable with this
[LD K34] (I need Registers 40004-40020 assuming 2 bytes per word) - I think I am ok with this
[LDA O?????] (I need help here, I think this is the PLC address to store the read memory but I
am not sure what the value should be, also this is supposed to be octal)
[RX ?????] ( I need help here, the manual says it specifies slave address and valid data type, all
I know is that I need 40004-40020)
So as you can see I figured out the easy part but I am struggling on the rest.
Once the above is functional the next item that needs accomplished is to take those values that are read and convert them to 4-20mA and output them so my DCS can read them.
Any help would be greatly appreciated, if you had the time to help me out over the phone that would be even better.
Thanks
-
In the 'LDA Oxxxx' the xxxx will simply be the numbers of the starting 'V' memory. For example, if you will be reading into V2400 then that instruction will be 'LDA O2400'
The address of the information in the slave is another matter. Get the Modbus address of the data for your documentation of the slave device then reference the conversion information in the manual to map that Modbus address to the equivalent area in the DL PLC. [Edit - It appears this will be V3, though sometimes you may have to adjust by 1.]
Refer to http://support.automationdirect.com/docs/modbus_conversion.xls at AutomationDirect for additional help.
-
regarding the LDA Oxxx, does it matter what location they go to? is there a suggested/recommended location? if I need to convert them for output does it matter where they go?
V3 is what I had come up with before I guess I just needed someone to confirm that.
Assuming the above works, how would I go about converting the stored values from their V location say V2400 through V2400(Oct) + 20(Dec) to an analog 4-20mA output? we have the modules for those as well.
For this example lets assume the signal is 0-100 and that needs to correspond to 4-20mA. What steps would I need to take?
Thanks for the response so far.
-
In the manual for the DL06 note the V registers which are assigned for specific things (like the Accumulated value of timers or counters or the system values). Refer to the 'DL06 System V-memory' and 'DL06 memory map' tables. I usually start at V200 and work up. Also, obviously, avoid the V registers dedicated to the operation of your analog module.
As far as the conversion that will depend on the specific numeric type of the data read from the Analyzer and the specific setup of the analog module. The documentation PDF for the analog module will help a lot.
-
reedsr,
You said you were comfortable with this: LD K0110. The "Location" is the Module ID number. However, since you are trying to use Modbus TCP, you must have a Peer-to-peer Configuration in your H0-ECOM100 that converts this Module ID number to the IP address of your Modbus TCP slave. The rest...
LD K34 (This will read 34 bytes; 17 registers)
LDA Oxxxx (where xxxx is the octal address of the V-memory that will contain the register values you are reading. Observe the cautions b_carlton has pointed out, as well as what is in the manual. I usually start at V2000, thus, LDA O2000.
RX V3 (the V3 parameter is translated by the H0-ECOM100 to mean Holding Register 40004)
Now, I don't want to confuse you further. However, the above procedure (LD,LD,LDA,RX) can be managed easier by using DirectSOFT5's IBoxes instead. Instead of having these 4 instructions, you could:
- Use IB-710 ECOM100 "ECOM100 Configuration" IBox at the top of your PLC program.
- Use IB-740 ECRX "ECOM100 RX Network Read" IBox (this is a macro that actually contains the LD,LD,LDA,RX and other stuff).
Just a suggestion.
Hope this helps!
-
Thanks for the help, we managed to get the MODBUS communications running as well as the 4-20mA and Digital outputs working today and it only took about 6 hours for 2 people that had never done this before. It was definitely a learning experience.