FET_Destroyer Posted January 5, 2014 Report Posted January 5, 2014 Hello Guys, I used the fifo function with success but only with words or uint. I have an array of 4 words. How can I use it with the fifo? I've done a few months ago a routine that do circular buffer, but a fifo will be better. Any tips? Thanks
Mendon Systems Posted January 6, 2014 Report Posted January 6, 2014 Basically there are three ways to do it that come to mind. 1) Run four fifo functions in parallel with one data word in each fifo 2) Use one fifo function and cycle it four times, once for each data word 3) Create you own version of a fifo using index registers. #1 is probably the easiest to deal with.
FET_Destroyer Posted January 6, 2014 Author Report Posted January 6, 2014 Hi Mendon, I already try the #1, but in my first post I said that I need 4 words but it was just to simplify, in fact, I need an array of 50 words and a fifo with that maybe became unreadable. lol Maybe I'll try the #2, because I can do a loop which cycles 50 times, it seems simpler, I try to do it with index registers but is to complicated for my ladder knowledge so I don't know how to start doing it.
BITS N BYTES Posted January 6, 2014 Report Posted January 6, 2014 I would suggest you consider using a combination of the available Table Data processing instructions. Use your FIFO as a pointer and combine it with record table [DIM] instructions. This gives you multiple types of data for each record. My 2 cents. W474-E1-09 CJ CS NSJ_Instruction_Reference Table Data processing Instructions.pdf
Denideni Posted May 2, 2016 Report Posted May 2, 2016 Question about FIFO, I am using CP1L. What exactly I need is stack of four BCD values FIFO logic, the simplest possible working example of loading to stack and reading from it, because what I try with examples from manual (which is BTW useless for begginers) does not work. just example: When I use SSET I put: first stack address: D100 Number of words: &4 And it is not accepted for some reason?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now