Filling a DB with a value (S5 CPU941B)

dorbak

Member
Join Date
Jan 2007
Location
Great White North
Posts
6
Hi All,

I've been lurking/searching the forums for a clue on how to do what I want, and I came across this:
http://www.plctalk.net/qanda/showthread.php?t=27369&highlight=s5

However, I'm looking for something a little more "simple"?

I have a counter which is counting from 0 - 9 and back down again from 9-0. I want to fill the values of 200 words (possibly more ultimately) with the value of the counter.

Right now I can get DB3.DW1 to update with the counter value, but I really don't want to repeat this 200 times manually.

Is there a "quick and dirty" way of indirectly assigning the address of the DB3.DWxxx and filling it that way (by way of a loop)?

I'm a GE Fanuc user, and getting asked to do something similar in the S5 for testing purposes (for data throughput). S5 is very different than what I'm used to :)

Thanks in advance!
 
L KF 100
T MW 0
A DB3 ; Open DB3 in Germany

LOOP:L MW 0
I 1
T MW 0
L DW 1
B MW 0 ; STARTS INDIRECT POINTING
T DW 0 ; REPLACE "0" WITH MW 0 VALUE
L MW 0
L KF 200
< F
SPB =LOOP
THAT IS 100 TIMES SLOWLYER THAN:

L DW1
T DW101
T DW102
T DW103
T DW104
.
.
T DW200
 
Last edited:
Thanks for the quick reply --- I couldn't get the first half working (MW, and A DB3 weren't liked --- I'm guessing its probably due to the CPU/version of S5 that I'm using), but the second bit does work...although tedious in entering all the lines manually...

My kingdom for a cut/paste (I thought I saw one, but I think that was just the DBx editor).

I personally like the Loop method as I can change how much data to modify in one shot --- (I'm not updating any faster than once per second).


Once again, thanks :)
 
If you are using english settings, replace A DB3 with C DB3,

replace MW with FW, replace B MW 0 with DO FW 0, and replace SPB with JC.
 
Thanks to seppoalanen and L D[AR2,P#0.0]!

Once I sat down and decyphered each line, it makes sense! (the DO still throws me for a loop, but I think I've got it now).

I should have come here weeks ago :p
 

Similar Topics

Hey guys, We are facing an issue, Krones hotfill line, around 10-15 fillers out of 110 are overfilling the bottle. Please help us what can...
Replies
13
Views
537
Hi, I am just exploring the options to replace an outdated filling valve controller for a can filler. It has 78 filling valves and runs at max...
Replies
15
Views
4,531
Hi guys I am hoping you can help me. I want to use an Allen Bradley HMI and PLC to record information every time a Cask is filled to an SD drive...
Replies
8
Views
3,224
Hello, i am currently trying to create a plc programme from my Tia portal v16 for a package filling machine. But i am kinda new to the plc stuff...
Replies
48
Views
17,298
Hi all, Interesting problem today with a lot of constraints. Ive posted something similar but Ive made a good amount of progress since then...
Replies
23
Views
6,281
Back
Top Bottom