Number Problems

The Plc Kid

Member
Join Date
Feb 2009
Location
Macon, Georgia
Posts
3,233
I need some help with a panelview 1400e display we have a value that should be changing but it is static. Upon further investigation i found the instruction that gives this data to the panelview. There is a multiply instruction that has a floating point as its first number which is 354.2867 which is multiplied by a constant number of 10 and the result is stored in n28:3. The floating point data is changing but the data in n28:3 always stays the same even when the floating point number goes to something like 20.4526.

It appeas as if the original programmer was tring to convert this floating point number into a integer of just 354 but is this the correct way to do it. I do not understand why it does not work.I would thank that the result data would change some? I thought that maybe there was siomething else writing a number to n28:3 but that is not the case because i did a cross ref on n28:3 and the multiply instruction in that ladder is the only place it is used and we have no indirect adderessing being used.

This is a plc 5/60 enhanced rev b3

Can some help me understand what the heck is going on?
 
If you change the value in N28:3 manually does it change back?

If it does change back to what it is, then you are getting the result of the MUL instruction.

If it doesn't change back, then I would check to see the LAD file has a JSR pointing to it that has true conditions and make sure the code is actually functioning. Easiest way would be add a branch around the MUL, put a latch on it using some unused bit.
 
Last edited:
The proble is the way the instruction is being used i can take the floating point number address is F70:101 and i put in another mul instrucion at the bottom of the program with a destination of N25:0 which is a new data file that i created just to test tis with and the result is zero?

Could this be a firmware issue?
 
Originally posted by The Plc Kid:

...and we have no indirect adderessing being used.

Did you also check for indexed addressing? This is anything with the # symbol ahead of it. A COP instriction or any of the file manipulation instructions could get you.

Originally posted by The Plc Kid:

Could this be a firmware issue?

I doubt it. This would be a pretty specific issue with a pretty common instriuction. By the way, was your last post a question or a statement that confuses you? Ican't tell if you actually tried the extra multiply or not. If the result stays 0 and you can change the value of N25:0 in the data table then that piece of code is not being executed. If you are sure the ladder file is being called somewhere then start looking for things like RET and TND somewhere higher in the file as these would abort the file execution before the instructions are executed.

Keith
 
Keith

I did try the additional multiply and got the same result the destination loaction never changed but i can put a number in the destination word and it stays. This sub routine is always called and the code above it is executing because the line is running production.The multiply instructions the original and the one i added are unconditional always executed.

I looked at a very similar line that uses slc and the code is cloose and it works there. I checked for indexed addresses also. Not used.
 
If you can type a number into N25:0 or the other integer and the values stay where they are the instructions are not being executed. Something is causing the ladder file to exit before the plc gets to those instructions. What else is in the file? Does everything else work? Can you print the offending ladder file to a PDF and post it here. Can you post the program?

Keith
 
As a test, change the target of the multiply to another float. Then perform a MOV (I'm not sure if the PLC5 has that but I'm assuming) of the float value into the N register. Observe the, now float, target of the multiply. See if it changes.
 
Could this be a result of the static/dynamic setting of the data table(s), or one of the other protection mechanisms that a PLC5 has?

It has been a few years since I worked with them, so my terminology might be wrong...
 
1. Place an AFI in front of the MUL instruction to prevent it from executing.

2. Goto the data table for n28:3 and manually enter a value.

2a. If it changes, then the MUL instruction was indeed the only thing acting on n28:3. I'd make sure that the program file for the MUL instruction is being scanned. After that ????

2b. If you can't manually change n28:3 when the MUL instruction is disabled, then something else is acting on it. Do a cross reference on n28:3 to see if another instruction is setting the value. Be sure to look a little up the cross reference list to see if it is being acted on as part of a group/block function. Another possibility is that your panelview is writing to n28:3, rather than just reading it. Disconnect the panelview from the PLC and check if you can manually change n28:3. If you don't see anything, then I would suspect an indirect address issue or ???.

Gotta go. Good luck
 
2b. If you can't manually change n28:3 when the MUL instruction is disabled, then something else is acting on it. Do a cross reference on n28:3 to see if another instruction is setting the value. Be sure to look a little up the cross reference list to see if it is being acted on as part of a group/block function. Another possibility is that your panelview is writing to n28:3, rather than just reading it. Disconnect the panelview from the PLC and check if you can manually change n28:3. If you don't see anything, then I would suspect an indirect address issue or ???.
Be sure to check for any indirect addressing or COP / FLL instructions.

Indirects can be tough to track down. They would show up something like:

N28:[N28:0] or
N[N7:1]:28 or
N[N7:1]:[N28:0]

Numbers in the brackets are the indirect indices. They will also show up as such in a cross reference, and you can use the search bar to search the program for partial terms, like:

N28:[
or
N[

Good luck
 

Similar Topics

Complete noob here, using a Click C0-02DD1-D to run a test stand. Requirement is to turn on motor run for X seconds, turn off and dwell for X...
Replies
6
Views
1,019
Hi, I have this weird issue whenever I try to change the SNN from a Point IO Im missing the three ... dots to open the pop up and change it...
Replies
4
Views
595
I'm doing my first PanelView 5000 application with Logix View Designer v8, and am of course jumping in headfirst. One thing I don't find is a way...
Replies
4
Views
656
Hi PLCs.net! I was curious: How many axis can a B&R APC910 control? Is there a hard limit like certain AB controllers? I'm new to B&R, so would...
Replies
0
Views
352
Hi all, I really need help with this one. I'm at a complete loss... For months and months, I've had no problems with pressing a NEXT button to...
Replies
14
Views
1,385
Back
Top Bottom