RSLogix question ????

downey18

Member
Join Date
Feb 2008
Location
Chicago
Posts
37
Can you guys check out this sequence and explain what I'm doing wrong? This method was suggested to me by someone here but I just can't get it to work or I'm misunderstanding it.

----------------------------
ADD
Source A F8:13
Source B F8:14
Dest L9:0
----------------------------

DIV
Source A L9:0
Source B 10000
Dest S:13
----------------------------

If I have 353343 in L9:0. Then I end up with 36 in S:14 and nothing in S:13. What I want to get is 35 in S:14 and 3343 in S:13. Does it have to do with the floating point number being converted?
 
In your DIV box - have the destination be some dummy location. It will have the rounded result of the division - which you obviousloy don't want. Don't explicitly send anything to the math register.

If you want to retain these 2 values then immediately do two moves:

MOV S:13 to Remainder N regsiter
MOV S:14 to Quotient N register
 
check s:14 the rounded portion is stored in s:13 the unrounded data is stored in S:14 on the devide instruction page 4-9 of the SLC instruction manual publication 1747-RM001c-en-p

looks like Bernie beat me to it
 
I tried replacing the S13 with N7:65 and I'm still having the same problem. Rounded number in S13 and nothing in S14. Mordred is there a link for that manual? I did a search for it but didn't find anything I could download from :(
 
I'm sorry thaat I probably mislead you in my reply. Check out these two PDFs from the knowledgebase (searched on 'rmainder' in 'programmable controllers')
 
bernie_carlton said:
And - in an attempt to make up for it - one more item from the knowledgebase
Holy **** that's exactly what I'm looking for!!!!! I didn't realize this instruction could do this. How do you access the knowledgebase Bernie? There seems to be a lot of stuff there that is invaluable!
 

Similar Topics

Oh, I hope someone can help! I have one little problem holding me up from studying this weekend. I'm using Rslogix micro starter light, it's a...
Replies
7
Views
2,993
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
900
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,769
Hey all, I just joined today. Not sure if this question is in the right place or if anyone has asked it before. I am monitoring a machine from...
Replies
2
Views
1,448
Note, I have NO experience with RSLogix products. Never done anything beyond installing the software for others. Please forgive me for my...
Replies
9
Views
4,637
Back
Top Bottom