i am now confused

panthripu

Member
Join Date
Mar 2004
Posts
228
Hi i am confused in this simple program .Pls help

A #WF_RESET
JCN T32A
L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL
T32A: SET
A #WF3_RESET_1
JC T32C
L DB124.DBD600
L #WF3_TOTAL
+R
T DB124.DBD612
What i undertand is inline 1 , if #WT_RESET becomes 1
Load content of DB124.DBD600 and acc1
Load content of #WF3_TOTAL in acc2
and add them.
or keep adding DB124.DBD600 to itself untill #WT_RESET becomes 0
when i tried to seach location of #WF3_TOTAL i can see it in STAT only.
 
Code:
A #WF_RESET // If "1" then continue, if 0 go to "T32A"
JCN T32A 
L DB124.DBD600 // Load value in Acc1 
L #WF3_TOTAL // Load value in Acc1 and value form Acc1 in Acc2
+R // Add value from Acc1 and Acc2
T #WF3_TOTAL // transfer the Sum from Acc1 and Acc2 into "WF3_TOTAL
T32A: SET // Make RLO high
A #WF3_RESET_1 // If "1" then go to T32C, if 0 go then continue
JC T32C 
L DB124.DBD600 // See previous
L #WF3_TOTAL
+R
T DB124.DBD612
Basicly it only adds 2 values when a sertain bit is high or low
 
Hi there,
when i tried to seach location of #WF3_TOTAL i can see it in STAT only.

When you open the instance DB (the DB which is called with this FB) you will find the address of #WF3_TOTAL in there.
 
Hi i am confused in this simple program .Pls help

A #WF_RESET
JCN T32A
L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL
T32A: SET
A #WF3_RESET_1
JC T32C
L DB124.DBD600
L #WF3_TOTAL
+R
T DB124.DBD612
What i undertand is inline 1 , if #WT_RESET becomes 1
Load content of DB124.DBD600 and acc1
Load content of #WF3_TOTAL in acc2
and add them.
or keep adding DB124.DBD600 to itself untill #WT_RESET becomes 0
when i tried to seach location of #WF3_TOTAL i can see it in STAT only.



What you understand is not understood correctly.

The L x.y instruction always loads into ACCU1 and it pushes the previous contents of ACCU1 into ACCU2.


A #WF_RESET
JCN T32A == IF WF_RESET is OFF, jump over
L DB124.DBD600 == DBD600 into ACCU1
L #WF3_TOTAL == WF3_TOTAL into ACCU1, DBD600 into ACCU2
+R == ADD ACCU1 and ACCU2
T #WF3_TOTAL == SAVE in Total
T32A: SET == make RLO '1'
A #WF3_RESET_1
JC T32C == IF RESET 1 is ON, jump over
L DB124.DBD600 == DBD600 into ACCU1
L #WF3_TOTAL == WF3_TOTAL into ACCU1, DBD600 into ACCU2
+R == ADD ACCU1 and ACCU2
T DB124.DBD612 == SAVE in DBD612
 
one more doubt

This is a part of program for batching of some material . db124.dbd600 is the location where the actual quantity of material is being batch is stored. Once the Actual quantity becomes equal to set quantity , the feeder stops.This batch hopper is then emptied out.
For next batch when start command is given , the previous value of db124.dbd600 is stored in a location #WF3_TOTAL
and db124.dbd600 is reset to zero.
Now second batch qantity is stored in db124.dbd600 and same time total material fed is calculated by adding stored value of previous batch and persent value of db124.dbd600.
#WF_RESET IS ONE SHOT INPUT (HIGH FOR ONE CYCLE)
#WF3_RESET_1 IS ACTIVATE FOR 1 SECOND.

The problem started when
A #WF_RESET
JCN T32A
L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL


the above code didnt store db124.dbd600 (example 300kg) but stored 900kg.
How can it be possible ?

L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL

this part what i understand keeps of adding the content of DB124.DBD600 to itself but when the trigger bit to activate this code is for one scan cycle , how it can happen ?
and It happens only few time in past one year.
 
# wf_reset

It is reset when start pushbutton is pressed for new batch. this startpushbuton generates on pulse(rising edge)
 
Where do you reset the db124.dbd600 to zero after start button is pressed? It should be done in the same program cycle you add db124.dbd600 to the total value.
 
confused

L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL
In this part if DB124.dbd600 value is 50 then this program will keep on adding 50 to iteself....50,100,150,200......so on.

if i see this part only and #WF_RESET IS RISING EDGE

A #WF_RESET
JCN T32A
L DB124.DBD600
L #WF3_TOTAL
+R
T #WF3_TOTAL

Then my question is ,in one scan cycle , it will add only once .Right ?
 
Ok, now I understand.

Yes, DB124.DBD600 is added to WF3_TOTAL once per cycle every time #WF_RESET is 1.

Have you checked the pushbutton? It might have a bad contact, if it some times flickers the batch is still added every time.
 
confused

When we press the start button #WF_RESET is rising pulse of it.So it add up the contents of DB124.DBD600 to #WF3_TOTAL.Also after 1seconds of pressing the start button(there is timer) the content of DB124.DBD600 is reset to zero.

Now as we doubt on push button , it is possible that within 1second its contacts got actuated two three times or even the operator pressed the button twice within one second.
Because if i press the button after one second nothing will happen.The value of #WF3_TOTAL will remain same as DB124.DBD600 is reset to zero.
How can it be avoided if the problem comes from pushbutton.
 
Could the DB124.DBD600 be reset right after you add it to #WF3_TOTAL?
Is there some reason you have to wait for one second? What is the use of DB124.DBD612?
 
still confused.

It seems the timer of 1 sec. is as a safety. because our intention is to first add the quantity of previous batch to total fed quantity and then reset the batch quantity.
I attached the trends , if you see it the blue is the quantity of individual batch and pink is the total materail fed.
You can see one interesting thing that when the reset command was sent to the blue got reset but during same time the total quantity started increasing( time of rest of blue & increasing time of pink is same) and this time is less that 1 sec.
In actual the pink(total fed quantity) should start increasing after start of next batch i.e at 16:10:38 hrs.
The pink one is db124.dbd612 and blue one is bd124.dbd600.
 

Similar Topics

Which of the following input operations require a conversion to digital form prior to input? a) disk b) analog c) contact closures d) limit...
Replies
12
Views
3,879
Hey all! I recently purchased myself a Panelview Plus off of ebay and i was hoping that i could upgrade the firmware on it to Version 9 or so and...
Replies
7
Views
2,744
Good morning everyone. I am apparently confused on the COP instruction. What I am trying to do is copy a DINT to a DINT in a User Defined Data...
Replies
16
Views
6,947
Hey guys, Im currently using the above flex IO to turn on two outputs these outputs go to two flashing red beacon lights. Here's the scenario: My...
Replies
4
Views
1,706
I'm event AV Technician (Sound, Projection, and Lighting). Over the last couple of years I've used a Weigl ProCommander PHX to control some event...
Replies
9
Views
2,696
Back
Top Bottom