Jump to content

VisiLogic Delay Timer - Get Current Value on Change

Recommended Posts

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.

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...