How to get Random Variables from PLC

WireGuy1950

Member
Join Date
Jun 2005
Location
Fairport Harbor, Ohio
Posts
155
I'm trying to figure out a method of getting any varible that can be typed into an Operator Interface to have it's value be displayed on the screen.

The system would be an Allen-Bradley SLC 5/04 with eiter a Panel View 1000 (DH+) or a Panel View + (RS232).

I'm trying to avoid having an infinite tag database.

I would like to send a varible down to the PLC, somehow pares it, and then return the value to the OIT on a common tag.

Any thoughts?

Thanks.
 
Have a seperate common variable and processing rung in the ladder for each data type.

Have the operator enter each data type's file number and element number as 2 seperate entries. Then use indirect addressing. Good luck.

By the way, this was a neat feature of the older DTAM and DTAM Micro. It's one feature (access to almost anything) that I would like to see as a standard Panelview feature.

Edit - But Alaric's is much more specific.
 
Last edited:
Use indirect addressing.



Create three tags mapped to an out of the way file, such as N99.

N99:0 - FILE_NUMBER

N99:1 – ELEMENT_NUMBER

N99:2 – REG_VALUE.



Place the following rung in your program



MOV N[N99:0]:[N99:1] N99:2



The value an N99:2 will be an exact copy of that data at the indirected register. If for example N99:0 is 7 and N99:1 is 35, then the value in N99:2 will be exactly whatever is in N7:35.



Be sure to add some range checking to the values in N99:0 and N99:1 or you will fault the processor if you access a non-existent file or element.

To access a Timer or counter you will have to do something like



EQU N99:0 4 MOV T[N99:0].[N99:1].ACC N99:2

(edit:
basically what Bernie said)
 
Last edited:

Similar Topics

Looking for some advice for backing up the programs on a bunch of old random PLCs. All I'm really concerned about is getting the program out of...
Replies
43
Views
4,703
We have several Powerflex 4M (22F-D013N114) VFD’s controlled by compactlogix PLC’s. Control is simple, a run and direction signal with the speed...
Replies
6
Views
1,523
Hi all, I know this is a PLC forum, but I know there is a gread deal of knowlege on drives as well. This drive has been running on stone...
Replies
2
Views
885
Hey folks, I was just wondering what thoughts were about a completely 100% random number generator. I looked on The Google but didn't really open...
Replies
54
Views
16,526
Hello Friends I need to activate random outputs (0-9) and ask for random inputs (0-9). I have created in s71200 a program to generate a random...
Replies
13
Views
4,686
Back
Top Bottom