Sideway Posted May 19, 2022 Report Share Posted May 19, 2022 Hi everyone, I am currently working on a small project, in which i am automating the movement of a small "train" of boxes that i am filling with stuff. The train has two commands (move forward / backward) and three sensors (homing_position, box_is_full, box_detection). I control my train with three modes : Homing, Auto and Manual. My problem is the following : In order to move my train, i need to call the commands forward/backward multiple times in my routine in several rungs. I already know i can't use multiple direct coils because only the last direct coil state remains. On the other hand, if i write my code with a lot of set/reset coils, it becomes a bit hard to read. Do you have any suggestion or trick on how i could turn my code so that it remains readable without using set/reset coils ? I wrote TWO versions of my code : -> "train project.vlp" which i know is WRONG, but it is written with direct coils to illustrate how i would like the rendering of my ladder to be. -> "train project with set reset.vlp", which, i hope, is performing well although readability is worse. Cheers, Sideway. PS : I presented here a small project, but i have also been working on bigger projects, with, say 8 or 16 outputs all working together. And you can lose yourself easily with all the set/reset coils invading the project. train project with set reset coils.vlp train project.vlp Quote Link to comment Share on other sites More sharing options...
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.