Support Forums
Can you zero or clear an Analog Output value

Programming question:

I'm using an Analog output (VTS Datatype) writing to a PLC DINT by way of a "Numeric Input" on the page to allow user to enter a passcode (EQU in PLC) to permit the action of a selector switch, right below the numeric input box.

When you enter the correct number, "it is retained in the VTS tag browser" and will work okay. But I need a way to clear it out after a minute or so. VTS Help file says "it is retained".

Workaround right now is they have to change the value from the correct number to a different one and then it's all set for the second time.

Otherwise it only works the first time because of the tag browser doesn't have the correct number in the space.

A script or an expression? but where does it go? I found lots of possibilities for the expression, value equals the correct number and after time lapses 30 seconds analog output : 0.

Help would be awesome!

Programming question: I'm using an Analog output (VTS Datatype) writing to a PLC DINT by way of a "Numeric Input" on the page to allow user to enter a passcode (EQU in PLC) to permit the action of a selector switch, right below the numeric input box. When you enter the correct number, "it is retained in the VTS tag browser" and will work okay. But I need a way to clear it out after a minute or so. VTS Help file says "it is retained". Workaround right now is they have to change the value from the correct number to a different one and then it's all set for the second time. Otherwise it only works the first time because of the tag browser doesn't have the correct number in the space. A script or an expression? but where does it go? I found lots of possibilities for the expression, value equals the correct number and after time lapses 30 seconds analog output : 0. Help would be awesome!

Have the correct entry start a ton timer in the plc to trigger a data copy to the tag the Analog Output tag addresses.

Have the correct entry start a ton timer in the plc to trigger a data copy to the tag the Analog Output tag addresses.

Century Control Systems, Inc. www.centurycontrolsystems-inc.com

Thanks Mel,

I did that but it doesn't change the value of the VTS Tag. I don't think I have my VTS Analog Output Tag configured right.

He doesn't see a change when it's made in the PLC. He only writes to the PLC.

Thanks Mel, I did that but it doesn't change the value of the VTS Tag. I don't think I have my VTS Analog Output Tag configured right. He doesn't see a change when it's made in the PLC. He only writes to the PLC.

The Analog/Digital Input/Output tags are deprecated. The only one that is needed is Digital Output for the rare times you need a pulse.

Using an Analog Control tag for the output, a Trigger tag, and a Multi-Write tag is how I would solve your problem. The Trigger determines when to write, the Multi-Write determines what to write and actually performs the write.

Note that the value of the Analog Control tag is not the value of its output point in the controller. The only way to check the value was written 100% is either to make an Analog Status tag to read it back or look at it in the PLC.

The Analog/Digital Input/Output tags are deprecated. The only one that is needed is Digital Output for the rare times you need a pulse. Using an Analog Control tag for the output, a Trigger tag, and a Multi-Write tag is how I would solve your problem. The Trigger determines when to write, the Multi-Write determines what to write and actually performs the write. Note that the value of the Analog Control tag is not the value of its output point in the controller. The only way to check the value was written 100% is either to make an Analog Status tag to read it back or look at it in the PLC.

Assuming that you have control of the PLC program, another way to accomplish this would be to use a single Analog Status tag to read & write the PLC address. When setting up the tag, make sure that the ""Enable Output" box is checked on the I/O tag of the configuration dialog.

Once set up, the user can enter a number using the numeric entry widget which writes a new value to the PLC, the PLC can then, after a short delay, force the value back to 0 which will be read back & displayed by the Analog Status tag. Using this scheme, the value displayed in VTScada will always get set back to 0 after the PLC delay.

Assuming that you have control of the PLC program, another way to accomplish this would be to use a single Analog Status tag to read & write the PLC address. When setting up the tag, make sure that the ""Enable Output" box is checked on the I/O tag of the configuration dialog. Once set up, the user can enter a number using the numeric entry widget which writes a new value to the PLC, the PLC can then, after a short delay, force the value back to 0 which will be read back & displayed by the Analog Status tag. Using this scheme, the value displayed in VTScada will always get set back to 0 after the PLC delay.

Lawrence MacNeil
Trihedral Engineering Limited

Thank you to everyone for the HELP. I got brought back to this project and tried Mr. MacNeil's solution and it worked like a charm!! I'm a happy camper. smile

Thank you to everyone for the HELP. I got brought back to this project and tried Mr. MacNeil's solution and it worked like a charm!! I'm a happy camper. :D
120
5
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft