PN952 Posted February 10, 2016 Report Share Posted February 10, 2016 I'm pretty new to ladder logic but have a long background writing code in C++, C#, and more. I tend to look at solving my problems the way I would when writing code, which doesn't always translate to ladder logic. This is my first time working with VisiLogic and I'm updating an existing project. The implementation consists of a motor that runs for a time specified in a Delay Timer that I will refer to as DT 1. I need to add another motor that will run for the same amount of time specified in the preset of DT 1 after the first motor is finished running. I'm thinking I should add another timer (DT 2) for the second motor because there are different actions that have to happen when DT 1 and DT 2 expire. DT 1's preset is set by the operator via an on-screen variable. Is there a way to pull the preset time from DT 1 into DT 2 so that I don't have to add another operator entry field to the screen? Is there a way to detect when the preset of a Delay Timer has changed? Any advice is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 11, 2016 MVP 2022 Report Share Posted February 11, 2016 Yes and yes. Use the "Load Timer/Counter Preset" (under the Store Menu) to move the TD1 preset into an ML and then "Store Timer/Counter Preset" to move the ML value into TD2. You can detect an update of the TD1 Preset by using the "Legal Entry" bit in the operator entry function. It will go high when an update is made. You can then use a Positive Transition of this bit to do the Load & Store for TD2. Quote Link to comment Share on other sites More sharing options...
PN952 Posted February 11, 2016 Author Report Share Posted February 11, 2016 Perfect, thanks. I figured out the Load and Store Timer/Counter preset but had not discovered the Legal Entry bit. Quote Link to comment Share on other sites More sharing options...
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.