Guest hurler Posted December 1, 2003 Report Posted December 1, 2003 Hi all, I was wondering how to reset a group of words in Simatic S7 to Zero. I know in Mitsubishi you can use a ZRST Function which would reset the group you specify to Zero ie [ZRST D0 D20]. Also does S7 have a First Scan On function like Mitsubishi and Omron. Appreciate any feedback. Many thanks Quote
Klaus Posted December 1, 2003 Report Posted December 1, 2003 There is no bit that are 1 only the first scan. You have to make it on our own. Siemens Plc call startup ob's the first scan. Which Ob that is called depending on how the plc is reset. If you add Ob 100,101 and 102 you can set your bit there then reset the bit in ob1. Now you have created a bit that will only be 1 during the first scan of the plc. Regarding the resets of the data word if there is only a few words that you need to reset you can simply do like this. l 0 //Loads 0 into accu1 t db1.dbw 0 //transfers into word 0 t db1.dbw 2 t db1.dbw 4 and so on This can also be done i lad by using the move instruction. If you want to reset a lot of words you can create a loop and use the adressregister to reset your words. Another way is to use Systemfunction Fill and create a db with 0's and fill the other db with.If you have trouble with this let me know and i show you how its done. Quote
Guest hurler Posted December 3, 2003 Report Posted December 3, 2003 Thanks for your reply Klaus. Would the following be correct for a first Scan bit In OB1 Set M250.0 On in OB1 Call FB30 (This is the block I want my First Scan Bit to Occur Say M250.0) Call FB40 (Also called in OB1) In FB30 use the first scan bit in Program In FB40 Reset the M250 First Scan bit which was set on in OB1 Back to OB1 Is this correct?. What would be the best way to activate M250.0 in OB1? Could I also ask whether there is a Pulse function available in Simatic?. Again thanks for the help. Quote
Klaus Posted December 3, 2003 Report Posted December 3, 2003 (edited) No the correct way is to set the first scan bit in ob100 ob 101 and ob102 and then reset the bit at the end of ob1 after all your FB'FC calls. Use the set and reset function. The pulse and set bits are in the bitlogic catalog. If you cant see the catalogs choose menu "view" in the lad,fbd stl editor then check overviews.You can mark a coil or whatever and then press F1 to get help. Very usefull! The pulse function i Siemens is a litte diffrent comparded to Medoc. It uses a memory or a databit to see the diffrens between scans so it important not to use the memorybit as a pulse. Lad example OB100,101,102 Startup Ob's M250.0___M250.0 |/|----------(S) End of OB1 M250.0__ M250.0 | |----------( R) Pulsefunction condition that you_______Pulse_______Actual want to check_________Memory______Pulse | |-------------------------------(P)--------------( ) Actual Pulse memory will be 1 for one scan when condition turns to 1 (P) Positive puls (N) Negative puls Edited December 3, 2003 by Klaus Quote
Guest hurler Posted December 4, 2003 Report Posted December 4, 2003 Again Klaus thanks for reply. Is my interpretation of what you wrote correct? I0.0_________________m100.0_______M120.0 | |-------------------------------(P)--------------( ) [it uses a memory or a databit to see the diffrens between scans so it important not to use the memorybit as a pulse. ] In this case M120.0 will pulse for 1 Scan when I0.0 goes On? Quote
Klaus Posted December 4, 2003 Report Posted December 4, 2003 (edited) Yes you got it completly right. I0.0_________________M100.0______M120.0 | |-------------------------------(P)--------------( ) M120.0 will be 1 for one scan cycle when I0.0 turns from 0 to 1. M100.0 is only there to keep track of when the input changes and cant be uses for something else. I0.0_________________M100.0______M120.0 | |-------------------------------(N)--------------( ) In this case M120.0 will be 1 for one scan cycle when I0.0 turns from 1 to 0. Edited December 4, 2003 by Klaus Quote
Guest hurler Posted December 5, 2003 Report Posted December 5, 2003 Klaus, just a note to say thanks for the help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.