ML1200 makes my head hurt

bwheat

Member
Join Date
Sep 2003
Location
LA
Posts
174
Take a look at this program. The add part works fine but when I want to subtract the subtract subtracts about 3 times. Any idea why? All of the extra undescribed coils are basically a roll your own oneshot. I already had a oneshot in front of the sub block but it kept subtracting more than I wanted it to so I was just trying something.
Running an Allen Bradley ML1200 Series C.

ml1200.jpg
 
Last edited:
Make sure your B3:25 (1st bit in your Subtract rung) is not flickering on to off. Just latch it on in the previous rung then unlatch it after you have done your subtract or with another unrelated rung elsewhere in your program. The oneshot will fire each time that bit or the NC bit in the rung goes true. Check that normally closed bit also.....
 
My original code had B3/33 where xic B3/25 is. The B3/24 and 25 were just to see what it would do. However I will try the latch thing out also. What I have doesnt work.
Thanks.
 
Maybe you want to give the (GRT + MOV) part its own rung. Duplicate the other logic, of course.

I've seen some cases where I think the MOV was getting completed before the SUB/MUL/DIV/ADD was finished computing. At least, that was what SEEMED to be going on.

I think if you split that rung in two, you might see better results.

AK
 
Ok here is my original code before I started trying things.
The results are the same. N7:16 starts at 33. If I turn on
B3/33 from the RSLogix (not the panelview because this is a
ML1200 and I cant be on line with the PLC and have the Panelview
connected) the sub block should only execute once because of
the oneshot. The oneshot is not used anywhere else in the
program. Also the GRT should not let the sub block execute
anytime N7:16 is less than 1... But it STILL DONT WORK!!!! banghead

ml1200-2.jpg
 
Read Bernie's reply just above yours again, I think he hit the nail on the head.

You are subtracting the contents of N7:16 FROM 11 and storing it in N7:16 again. Anytime N7:16 is greater than 11, you will get a negative result.
 
Massive case of rectal-cranial inversion syndrome. For positive integers, everytime you subtract a larger number from a smaller number it is negative...
Oops
I just love it when they have these forums you can run to and show the world how stupid you can be...
Thanks for the help.
 
Anytime the "original" value of N7:16 is equal to or less than 11, your count will go negative. Where does the initial value come from and can you add logic to keep it above zero (or 11)? Also, you've limited the upper range to 99 so you may have to watch that as well.
 

Similar Topics

Hey all! Long time reader, first time poster! I have an EA9-T7CL and an MicroLogix 1200 connected via DF1. I'm all good and got everything mostly...
Replies
3
Views
653
Hi every master,Recently i met a fault about 1762-L40BWA 1,When i get the PLC, The Fault light is lighting, I am not remember the fault message,I...
Replies
0
Views
720
Hello everybody and master,I met a problem about ML1200.It is described as below: 1,When i got this PLC,The FAULT light is lighting, My computer...
Replies
4
Views
1,112
I had planned to use PTO instructions to control a servo motor, single axis only. We have a ML1200 BWA model. According to the ML1200 manual...
Replies
7
Views
3,492
I am using Modbus to read 36 registers from a ML1200. 2 of those registers are suppose to be L11 data and 2 of the registers are F8 data. Long...
Replies
3
Views
1,393
Back
Top Bottom