View Full Version : #$%#$% It wont pull the var
May 1st, 2002, 02:35 PM
Hey is it me or are there more posts going now? anyways my prob.
I have used the example programs from AutomationDirect and they seem to work fine
but when i run mine they will not work.
I am storing a 1 or 2 in v1200 of the slave. and storing the var from the slave in v1250 of the master.
Then i compare this and if its 1 Y0 out, if 2 Y1 out.
But i dont think i have my RX setup right.
here is the code for the master RX:
| KF201 |
| K2 |
| O1250 |
| CTA200 | (This line doesnt look right to me)
May 1st, 2002, 05:37 PM
1. Verify that you even have a counter (CT) 200. Only the DL450 appears to have counters higher than CT177
2. To get its current value, refer to the "Memory Map" portion of the manual and look for the "Word Memory Reference" for the current value. For counters the reference is V1000 plus the counter number. For example, Counter 100 in a DL240 has its current value in V1100. So the last box would be (in this case) RX V1100
May 1st, 2002, 08:01 PM
You may have one or two problems in your code.
First, the rung LD KF201 will read from a slave with address set to 1. Make sure the slave's port address is 1, and of course is set to the baud rate, protocol, and parity you are using in the master.
Second, the "F2" in the KF201 indicates port 2 of the CPU. If you are using a DCM in another slot, this value has to change.
Third, as Bernie points out, V1200 should be the accumulated value in counter CT200 (hence the CTA200) I realize the manual only says 0-177 counters, but it also says user memory starts at V1400. I'm not sure what is in V1200, but try putting the value in V2000, for example, in the slave and read that into V2050 in the master. If that works, then you are trying to use a reserved data space. You may want to call the tech guys at AutomationDirect.com for more info.
P.S. I just realized that I assumed (yeah, I should know better) that you were using aDL-250 as your master. Look at the manual for YOUR MODEL for the memory map.
May 2nd, 2002, 11:21 AM
Gonna try the 1400, thanks for the help though
And by the way its on a DL05, the little one ;)
May 2nd, 2002, 02:07 PM
Bernie & Tom: DirectSoft programs all of those so it was changing it to the logical name, v1200 is CTA200. I switched it to v1400 no probs.
GOOD NEWS THOUGH, i got it working. I was told i had the correct cable, of course it wasnt the right one, so i went and hacked up an old one. works great.
Thanks for your guys' help