Bigha Posted December 27, 2014 Report Posted December 27, 2014 (edited) Hello! I need to count the number of pulses SM410. Use instructions Counter_M has no effect. How to count the number of pulses(100 mc)? My soft:GX Works2. My plc is L-series(L02SCPU). In FX series It works well. Edited December 27, 2014 by Bigha Quote
Crossbow Posted December 28, 2014 Report Posted December 28, 2014 That should work fine. Is there a reason you chose to use COUNTER_M instead of the IEC instruction CTU? Quote
Gambit Posted December 29, 2014 Report Posted December 29, 2014 (edited) This should work Unless your scantime is over 100 ms Edited December 29, 2014 by Gambit Quote
Bigha Posted December 29, 2014 Author Report Posted December 29, 2014 Yes, you are right! SM410 does not pulsate. But where to turn I don't understand. Can there be? Quote
Gambit Posted December 29, 2014 Report Posted December 29, 2014 SM410 should always pulsate if the PLC is running. However you are only counting when the counter instruction is processed. If your normal scan is larger than 100mS you should count in aan interrupt program. Don't forget to program en EI instruction in the normal scan program. (EI enable interrupt) Quote
Bigha Posted December 29, 2014 Author Report Posted December 29, 2014 Sorry, I don't quite understand Your sentence. I understand that these settings are there? >>>If your normal scan is larger than 100mS you should count in aan interrupt program. Quote
Crossbow Posted December 29, 2014 Report Posted December 29, 2014 One last question, are you using in PLC or simulator? Some of the fast clock pulses are not valid in the simulator. Quote
Gambit Posted December 29, 2014 Report Posted December 29, 2014 What is your PLC scan time ? Are you running the program as a fixed interval or normal scan? Maybe you can upload your program. Quote
Bigha Posted December 30, 2014 Author Report Posted December 30, 2014 >>>>>>>>>>>>What is your PLC scan time ? Current, max, min -200 ms Initial - 0ms >>>>>>>>>>>>>>Are you running the program as a fixed interval or normal scan? All settings are default, I don't know where to see it. Its a screenshot from the PLC in monitor mode.SM410 work. But the pulses are not counted. Or rather, was registered 1 pulse.How to make these pulses was considered I don't understand. Why in FX it works immediately.... Quote
Gambit Posted December 31, 2014 Report Posted December 31, 2014 Try the project attached. Now your program runs based on interrupt I28. I didn't test it but I should work. CTU.zip Quote
Bigha Posted December 31, 2014 Author Report Posted December 31, 2014 Thank you! I'll study it! Happy New Year to everyone. Quote
Bigha Posted January 15, 2015 Author Report Posted January 15, 2015 I decided to use the most simple solution, in order not to complicate. This design will work in all programming environments and controllers Mitsubishi, and no puzzling decisions about care at the time of scan, etc.. All just. Use timers. 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.