How to put a number into a word - RSLogix 500

wildcatherder

Member
Join Date
May 2009
Location
Morro Bay
Posts
168
I know this is a simple question but, honestly, I have not been able to find the answer.

In DirectSoft there is a LD instruction by which one can put a constant into the accumulator and OUT it to a memory location.

I want to do the same thing in RSLogix but cannot figure it out. I've found all kinds of examples of complex counters, timers, sequencers, etc but this basic information does not seem to be online.

I'm looking for instructions compatible with Micrologix 1400

I will be getting a vast technical library on DVD from RockwellAutomation next week but in the meantime, I'm stuck.
 
I'm sure that after 99 posts that is considered an example but I'm going to need something that looks like a ladder logic display so I can see which part of that is the number entered and which part is the word to which I am writing.

If I could write directly to the word, even better.

I have programmed several projects with DirectSoft but never in ASCII.
 
Scada dude, Don't confuse a timer .acc with the accumulator register used in other PLCs.

Wildcatherder, in the ML there is no need to load LD a value into the accumulator and then out it to a word. Just use a MOV instruction to move a constant to the address.

MOV 1234 N7:0.

However, if N7:0 will always have the same constant in it then just enter the value directly into N7:0 using the file editor in the programming software.
 
OK, in a sidebar window, which is labeled Untitled rather than something useful (maybe it is the File Editor?) under Project there is Controller, Program Files, Data Files, etc.

You suggest I open up N7 and "stuff" a number into a word in that window?
 
Here it is graphically.



In the AB PLC all memory is retentive so once you set a constant it will stay until you change it. You can also create files and designate them as static (constants) if you want. Click the properties button to set that feature, but refer to the manual for more information on it.

A100909-2.JPG
 
Last edited:
Still can't see the attachment.

I am getting close to understanding. It's not because I'm lazy or unskilled. I've programmed in higher level languages and DirectSoft. The problem is that, at this level of (un)sophistication, all the things I am searching for on the forums and the web are "stop words": integer, word, load
 
The two step process in AD (LD, OUT) is one command in SLC500 (MOV). SOURCE can be a constant (just type a number) or a memory location which holds a value. DEST would be a memory location (possibly N7:??)

Most all the things which are single math manipulations in AB need several instructions in AD. One thing which may IRK you is when you want to do a series of manipulations but need to have a DESTination register for each command. If the CPT (Compute) instruction is available (processor dependenta) then by all means use it for chained operations.

But there are times when I really appreciate the ability to more finely manipulate the math accumulator in AD.

And Alaric - you circled LAD7 instead of N7 in your image. But I'm sure we get the idea.
 
Thanks, the attachment just appeared when I reloaded the site.
This is exactly what I needed in the form I needed to see it.

I did open a sample project and the Project Name appeared instead of "Untitled". My point was instructions like "use the File Editor" are not a big help, if you have never opened the File Editor before.

That one picture was worth a thousand "hits". I do think you meant to circle the Data File "N7" rather than the Program File "LAD 7"

Thanks again.
 
D'oh. o_O

By the way, posters often use mnemonic instructions and rungs in the forum because its easier and faster than creating a graphic.

When you see mnemonics typed in the forum, try this:

Open the mnemonic editor by double clicking on the rung number of a blank rung. Then paste in the code you see in the forum and press enter. Then you can see what it looks like graphically. This shows you what
ADD N7:0 N7:1 N7:2 will look like

A100909-3.JPG
 
Last edited:

Similar Topics

Hello, I'm trying to trigger an output when an integer number on my program goes up or down. How should I do that? Thanks in advance.
Replies
15
Views
5,423
Hello, I have a Micrologix 1400 PLC and using RSLogix 500. Using a Multi Ranger Ultra Sonic Level Sensor and the input is moved to N7:11, then...
Replies
15
Views
3,956
Hi guys, Got my prior problem narrowed down. The issue I'm having now is that in our hmi most of the numeric input fields have a popup for the...
Replies
7
Views
1,959
From the manual: " Use the period/rate mode to determine the frequency of input pulses by counting the number of internal 4MHz clock pulses over...
Replies
1
Views
1,864
So you have an object on an HMI that will become a number inputted from a numeric pad, which is automatically launched on the HMI, when you touch...
Replies
12
Views
3,300
Back
Top Bottom