Help - Search - Members - Calendar
Full Version: word shift
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
slcman
Hi,
I want to log a historic. The most recent event # was stored in n7:0, if a new event occur I want to put N7:0 in N7:1 and write the new event in n7:0. I want to log around 10 event (n7:0 to n7:9)

So, I need a instruction similar to BSL put at world level.

Any idea???

Thanks
Bob O
The FIFO should do what you are looking for.
Ken Moore
You could also use the COP command with scratch registers.
I threw together the following example, move N7:0 through N7:9 to N9:0-N9:9, then move the data back to N7:1 through N7:9 and store the new data in N7:0
finfin
I do it the other way where the newest is at N7:10 and the oldest is at n7:0. That way you can do it with only one copy command. first move the data to n7:10 then Copy N7:1 to n7:0 length 10.

Woops... change that. It uses an extra word. On the event copy n7:1 to n7:0 with a length of 9 then move the new data to n7:9.
slcman
It's work, thanks all dancered.gif

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.