Problem with simple Integer functions in Micrologix 1400

Paul Rasavage

Member
Join Date
Oct 2011
Location
Beaverton, OR
Posts
3
For some reason, I cannot get even the most simple integer to integer function to work, e.g., (MOV N18:24 to N31:2).

I have also tried MULT:
MULT
Source A: 10
Source B: N18:24
Dest: N31:2

There are no errors that I can find, yet N31:2 is always 0 !!!

I have tried all sorts of things but for some reason I cannot operate on one integer and get the result into another register.

Any ideas?
Thanks!
paul
 
The PLC is in REMOTE RUN.

The logic is as stated:
one rung with a permissive bit --[ ]-- which I toggle.


--[ ]-------------|MULT |---
|Source A: 10 |
|Source B: N18:24| (which has a value of 12)
|Dest: N31:2 | (which always contains 0,
but should contain 120)

I am obviously missing the obvious, but I'm not seeing it.
paul
 
Are you scanning the Subroutine that you are trying to do the math in?

Unless you wrote your code in Ladder 2 you need to have a JSR that runs the sub routine you have your math in.
 
Welcome to the forum Paul.

Can you zip your .RSS file and attach it to a post? The forum can usually home in on these kinds of problems in just a few minutes if we can see your program.
 
your answer will always be zero when you place a zero back into the register.

If on rung 10 you do the multiply the answer is 120 as you say.

BUT, if on rung 30 you move a zero, copy zero , clear the register, or anything to make the result register a zero, then your answer will be zero everytime.

Remember, the last operation on the register wins.

regards,
james
 
You guys were a great help!
It was in a subroutine that was being called, but the permissive wasn't set.
Once I toggled the permissive, the MULT executed correctly.
Thanks for the catch!
paul
 
You guys were a great help!
It was in a subroutine that was being called, but the permissive wasn't set.
Once I toggled the permissive, the MULT executed correctly.
Thanks for the catch!
paul

unless you absolutly need to condition a subroutine call I would strongly suggest you do not do this. This is one of those things that cause all kinds of headaches with no real benifit for using them.
 

Similar Topics

I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
212
It would be awesome if someone could help me out with this problem. We can only use basic XIC XIO OTE OTL and OTU instructions. I'm not sure on...
Replies
33
Views
9,058
I'm trying to create a momentary push button using the pre-made libraries. Unfortunately, it seems they are all latching switches?? I'm not sure...
Replies
1
Views
1,397
Hi! Found this forum by accident and so far it seems to be active. :) PROBLEM: I want to use ARRAY OF BOOLs to determine which coils are set and...
Replies
1
Views
2,674
Hello everyone, I have been attempting to complete a simple weight conversion program... basically it loads in 3 values from a BCD Thumbwheel...
Replies
3
Views
2,974
Back
Top Bottom