
adccommunitymod (AutomationDirect) asked a question.
Created Date: January 29,2003
Created By: stoker
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
In the manual for DL05 there are quiet a few boxes that doesn't tell if they affect the ackumulator/stack values, such as GTS, SBR, RT. I have in mind creating a couple of subroutines that will get simply get properties from the stack and load return values on to the stack.. Does these affect the stack/ack? Is it kept intact/swapped or anything from these operations. I am hoping that any instruction that doesn't mention ack/stack manipulation or usage won't affect it at all.. My project is not on a Live PLC yet so I have been unable to test anything.. Any feedback appreciated http://forum1.automationdirect.com/board/smile.gif
Created Date: January 29,2003
Created by: stoker
In the manual for DL05 there are quiet a few boxes that doesn't tell if they affect the ackumulator/stack values, such as GTS, SBR, RT. I have in mind creating a couple of subroutines that will get simply get properties from the stack and load return values on to the stack..
Does these affect the stack/ack? Is it kept intact/swapped or anything from these operations. I am hoping that any instruction that doesn't mention ack/stack manipulation or usage won't affect it at all..
My project is not on a Live PLC yet so I have been unable to test anything..
Any feedback appreciated http://forum1.automationdirect.com/board/smile.gif
Created Date: January 31,2003
Created by: stoker
I just found out after putting my program in the PLC that you can not trust the acc/stack to follow to and from a subrutine..
It would have been really helpful if there was a accum/stack and status flag monitoring possibility (Such as siemens has).. Couldnt find anything like that (DL05)
Created Date: February 10,2003
Created by: Lancie1
Stoker,
There are many DL commands that have built- in stack reporting bits. They are type SP bits. Examples that come to mind: The LD (Load) command. It has bit SP76, which turns on if the value loaded into the accumulator is equal to 0. For the POP command (shifts the stack up one level), there is SP63, which is set when the result of the instruction causes the accumulator to equal 0. CMPV (Compare) command has SP61, set if compare values are equal.
Created Date: February 11,2003
Created by: stoker
Thanks man, that wasn't what I was looking for in this case but good to know http://forum1.automationdirect.com/board/smile.gif
I was trying to use the stack as a parameter container for subroutines, but when trying it on a PLC i found that the accumulator and stack does not stay put after jumping to the subroutine, nor after return.. By stack/status monitor I am thinking of a rll status/monitor view that will show how each line affects it..