Help with MSG instruction on 1747 DTAM

gregla

Member
Join Date
Jul 2007
Location
Worcester MA
Posts
5
I have an older machine using a 1747 DTAM with a SLC500. I am trying to create an "auto-screen" for the operator showing some info like seconds left in cycle, # of cycles run, etc. I am wondering how I can do this with this setup. Can I somehow convert timer values to txt/ascii and move the values into the appropriate places in the MSG instruction "words"?
I have read thru the documentation regarding the MSG instruction to display messages on the DTAM and have several examples in the existing program, but nothing like what I want to do above.

Thanks in advance for the help.
-Greg
 
I'll work on posting some code that is already there, but here is what I would like the display to look like (it is 2 rows of 16 characters).


screen.GIF


where the XX would be the .acc of the timer value, and the "High" would be switched between that and "Low" depending upon bit selection made by operator.

The MSG instruction from what I've read and seen in the current program uses 2 ASCII characters per word to store the message that gets displayed. So I could have:
mem-reg.GIF

which would display "ENTER LOW RANGE"
So if I want to display a message that has changing characters (such as the timer counting down), how do I get the timer value and "convert" it to something that I can stick into the appropriate word?
 
Last edited:
Let's take a look at your requirement ...

Can I somehow convert timer values to txt/ascii and move the values into the appropriate places in the MSG instruction "words"?

Can you find an instruction to convert a integer value to ascii?


Just break down your request and ask yourself the appropriate question and do some homework.
 
Per Oakley's advice, request has been redefined to appropriate questions:

1.) Can 1747 DTAM be used in the way that I am envisioning?
(not described in the manual)
2.) Did the strategy I outlined (taking timer.acc value, converting, and moving to appropriate addresses) seem resonable?

From there I should be able to work out the details.
 
Oakley said:
Can you find an instruction to convert a integer value to ascii?
After a bit more homework, I do not believe I can find an instruction to convert an integer to ASCII. The SLC5/03 was apparently the first to use these instructions, but the machine has a SLC5/02. Is there a way around this that someone could suggest?

Thanks,
-Greg
 
1. Your intended display implies that you expect the acc of the timer could be held in 2 digits (00 - 99). Does that seem reasonable?

2. You position the 2 X's such that the first would be in the low byte of the next to last word of the top line (N7:16) while the second would be in the high byte of the last word (N7:17) (shared with the letter 's'). It doesn't make it impossible, just a little more complicated.

3. Assuming that the condition in #1 above is true then do the following:

DIV T4:XX.ACC 10 N7:50 (the N7:50 is any register. We won't be using it. It's just a destination for the instruction.)

At this point S:13 contains the remainder of the division. We need to save that for later.

MOV S:13 N7:51

MOV S:14 N7:16 (this moves the unrounded quotient into the next to last word for the top line)

ADD 48 N7:16 N7:16 (this changes it from the number 0-9 to the ASCII character '0' - '9' if you get what I mean.)

Now we have to deal with the second value. This is the remainder which we stored above.

MOV N7:51 N7:17 (Move it into the word for the last 2 characters on the top line)

ADD 48 N7:17 N7:17 (We now have the character of the least significant value but it's in the space where the 's' will appear)

MUL N7:17 256 N7:17 (Now it's in the upper part of the word)

ADD N7:17 115 N7:17 (We add in the ASCII value for 's' to the low part of N7:17)

OK - so now N7:16 and N7:17 are set up correctly. The rest is up to you.
 
From what I can tell the DTAM Micro can display integer values. Why are you converting the values to ASCII? Just leave them as intgers and display the data location as an integer in the DTAM.


Keith
 
Bernie,

Thank you, I am incorporating your code now.

kamenges,

Unfortunately, it is not a DTAM micro. I have one of those as well and it was easier to manipulate than this DTAM 1747.

Thanks,

-Greg
 
ADD 48 N7:16 N7:16 (this changes it from the number 0-9 to the ASCII character '0' - '9' if you get what I mean.)

Please add the following command

ADD N7:16 8192 N7:16 (this adds the 'space' character (hex 20) before the first of the 2 acc numbers - sorry I left that out)

Now we have to deal with the second value. This is the remainder which we stored above.
 

Similar Topics

Hello All, This might be a simple question for most of you. I am working on performing some tests on an EIP device through RSLogix 5000. Based...
Replies
7
Views
2,034
Hi, I'm trying to ensure I have the correct path to allow msg read from 5380 processor via compactlogix. The SI has installed it in a way I'm not...
Replies
12
Views
6,488
I'm trying to use a MSG instruction to get data from a SLC into a ControlLogix. I want to read some Boolean tags from the SLC. Is it possible to...
Replies
4
Views
2,849
Hello all. I need some help setting up a MSG instruction to transmit 10 bits of data from a compact Logix processor to a micrologix 1400. I have...
Replies
31
Views
19,975
Good morning everyone. I'm relatively new to the Allen-Bradley world. My issue I'm facing is this. I have a remote Refractive Index sensor...
Replies
2
Views
2,248
Back
Top Bottom