
adccommunitymod (AutomationDirect) asked a question.
Move range of values
Created Date: January 14,2015
Created By: davehask
**** 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.****
Trying to make a FIFO using a DL05. Is there a instruction or way to Move a range of values (like DoMore has)? I have a working system in DoMore, but trying to use a D0-05 and DSoft5 software.
Created Date: January 14,2015
Created by: scott.lawrence
use the MOV instruction
from the help files:
Step 1 Load the number of V memory locations to be moved into the first level of the accumulator stack. This parameter must be a HEX value.
Step 2 Load the starting V memory location for the locations to be moved into the accumulator. This parameter must be a HEX value.
Step 3 Insert the MOVE instruction which specifies starting V memory location (Vaaa) for the destination table.
Created Date: January 14,2015
Created by: Bob S BN
see example program "EP-MISC-014 " here...
http://support.automationdirect.com/examples.html
Created Date: January 14,2015
Created by: davehask
Thanks Bob, I have that program, but it doesn't work the way I think it should. It doesn't move the first value out unless the table is full (at least that's how it works for me)....unless I don't understand Rung 2.
Created Date: January 14,2015
Created by: Bob S BN
It doesn't move the first value out unless the table is full (at least that's how it works for me)....unless I don't understand Rung 2.
It doesn't remove the first value, per se, it removes the value at the far end of the table (in the example, the tenth address).
Once the table is full, it WILL remove the first value, because it will now be in the tenth address location.
I 've only used the FIFO a few times, mostly to keep moving averages for slow moving conveyor belt speeds. When I would initiate a belt speed change, I would preload the table with the target speed at all the addresses.
Created Date: January 14,2015
Created by: davehask
I want to keep track of timer values that are based on the size of a part that passed in front of a sensor and put those values in a FIFO and then at the correct time (timer value from FIFO plus offset time) turn on a output based on the time value from the FIFO table.
I have done this using the DOMore processors and just trying to recreate in the DL05. I have looked at the example programs and am trying to piece several of them together to get the results I need.
Thanks for your help.
Created Date: January 14,2015
Created by: franji1
FYI: Just make sure you don't use V7400-V7577 w/MOV, this is non-volatile memory. The MOV instruction is how you write to FLASH (see appendix F of the 05 manual.
FYI part 2: I am not sure if MOV supports overlapped memory, e.g. shifting V2000 thru V2077.
Created Date: January 14,2015
Created by: davehask
Can someone help me out here.. I have attached what should be a simple file based on some of the AD examples, but I cannot make it work like I need it to (like I think a FIFO should).
I can load the table ok, but how can I use a variable before the table is full?
Basically what I am going to have is a continuously moving line with parts hanging on it. I am going to measure these parts with a timer and add an offset value to them and put these values in a FIFO. At the proper time (based on my FIFO values) as the line continues to move, I am going trigger a solenoid on & off. I am only looking at an area about 6ft long with a max number of parts of 4-5 so my table will be small.
As I mentioned earlier, I have done something similar using a DoMOre on another project, but this project doesn't warrant the expense of a DoMOre (wish it did). I just cannot figure out how to make this FIFO work in a DL05.
Not looking for someone to do my work, just tell me what I am missing.
Thanks
Created Date: January 15,2015
Created by: milldrone
I can load the table ok, but how can I use a variable before the table is full?
Basically what I am going to have is a continuously moving line with parts hanging on it. I am going to measure these parts with a timer and add an offset value to them and put these values in a FIFO. At the proper time (based on my FIFO values) as the line continues to move, I am going trigger a solenoid on & off. I am only looking at an area about 6ft long with a max number of parts of 4-5 so my table will be small.
davehask,
What is the minimum number of parts in the zone? 0?
Created Date: January 15,2015
Created by: davehask
Yes, it is possible that there may be no parts. Thanks
Created Date: January 15,2015
Created by: Bob S BN
I can load the table ok, but how can I use a variable before the table is full?
The FIFO table, and the examples of how to create it are just for a FIFO table of values. What you do with the values in those memory addresses is a separate issue that you need to tackle.
In the case I mentioned earlier about the moving average of conveyor speed, in a separate rung, I LD the first table address, ADD the rest of the addresses, and DIV by length of table to find the latest average.
In your case (which I don't quite understand yet) you may want a rung to ADD the first two values, and put that value in another address for a minute. Then another rung that adds the first 3 values, and put that somewhere for a minute, and so on.
Then use compare logic to see if any of the added values make up more than your minumum, if so trigger another event, whatever that may be.