Hi, I need a bit of help. I have an S7-300. it is used to detect wether product is too long etc. When I first turn it on it operates fine and an output is operated to open and air valve and blow the product off. But after so long it stops working. We have another machine with iddentical code/sensors etc and it does not do this. The code which detects a product is too long is as follows
AN I124.0 Product length sensor
JC END1
L MD80 Counter (Encoder signal)
L MD90 Product edge
-D
L MD100 Max product length
>D
AN M1.7 Conveyor is running signal
S DBX (AR1.P#8.3)
END1: CLR
When the result of the subtraction is greater than MD100 and I have a 0 in M1.7 to my understanding it should set the DB bit 8.3 (The DB in question is open in the monitor so the DB is fine). It uses the DB word 8 in a comparator to decide wether to reject or not. For a while once it has been rebooted this works exactly as expected and you see a value written into DBW8 but after a while it stops working. You can monitor and see the comparator pick up that the product is too long but it never seems to write to the DB. Can anyone help? A simple reboot cures the problem for a while.
AN I124.0 Product length sensor
JC END1
L MD80 Counter (Encoder signal)
L MD90 Product edge
-D
L MD100 Max product length
>D
AN M1.7 Conveyor is running signal
S DBX (AR1.P#8.3)
END1: CLR
When the result of the subtraction is greater than MD100 and I have a 0 in M1.7 to my understanding it should set the DB bit 8.3 (The DB in question is open in the monitor so the DB is fine). It uses the DB word 8 in a comparator to decide wether to reject or not. For a while once it has been rebooted this works exactly as expected and you see a value written into DBW8 but after a while it stops working. You can monitor and see the comparator pick up that the product is too long but it never seems to write to the DB. Can anyone help? A simple reboot cures the problem for a while.