News:

  • June 28, 2026, 12:32:20 AM

Login with username, password and session length

Author Topic: Symbolic Constant in Data View  (Read 17023 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Symbolic Constant in Data View
« on: June 12, 2020, 06:44:43 PM »
Do you think you could add a feature to allow Symbolic Constants in a Data View in the future?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Symbolic Constant in Data View
« Reply #1 on: June 13, 2020, 08:15:20 AM »
Sure.

fwiw, Trend View supports constants

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Symbolic Constant in Data View
« Reply #2 on: June 13, 2020, 06:43:36 PM »
I would find it useful.  Would this make a Constant be adjustable from a DataView?  Is that a good or bad idea?  Kinda makes the Constant a Variable, doesn't it?  Is that even possible for the PLC's memory to write a Constant without writing Project to PLC?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Symbolic Constant in Data View
« Reply #3 on: June 14, 2020, 12:02:31 AM »
I would find it useful.  Would this make a Constant be adjustable from a DataView?  Is that a good or bad idea?  Kinda makes the Constant a Variable, doesn't it?  Is that even possible for the PLC's memory to write a Constant without writing Project to PLC?

Constants are...constant...so no. I?m sure it could added to Data View.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Symbolic Constant in Data View
« Reply #4 on: June 14, 2020, 02:13:02 AM »
I would find it useful.  Would this make a Constant be adjustable from a DataView?  Is that a good or bad idea?  Kinda makes the Constant a Variable, doesn't it?  Is that even possible for the PLC's memory to write a Constant without writing Project to PLC?

If that is what you are wanting to do, then it does not make any sense to add it to Data View.

The old TISOFT TI controllers had "constant memory", that were constants.  In memory (RAM or ROM).  That is not what these are in Do-more.  They are symbolic constants, more like #define in C or enum in C++.  If you change the constant value, you must WRITE your PROGRAM to the PLC for it to take affect.

They are part of Trend View to help with showing instruction status, e.g. an alarm limit that is a constant or an initial value.  They show up as a dotted line.

Data View, it doesn't make any sense from the standpoint of "modifying it in the PLC".

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Symbolic Constant in Data View
« Reply #5 on: June 14, 2020, 08:24:11 AM »
Fair enough, was just throwing that question out there.
I tend to use them for max values, status lookup codes, days of week, months of year, etc. Mostly for program readability. I tend to use them in a compare statement. IF (UserDefinedSetpoint < MaxValueSetpoint, UserDefinedSetpoint, MaxValueSetpoint)
The other day I was trying to analyze a series of calculations and found myself going back and forth between the Documentation Editor and a Data View to see all the values involved, when it would have been nice to line them all up in a logical order in a single Data View.

I do like how they show in a Trend View, as they can be added retroactively and they populate data all the way back to beginning of data set.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Symbolic Constant in Data View
« Reply #6 on: June 14, 2020, 07:01:57 PM »
RS5000 has a checkbox for constants in the tag table. You can still change it in the table without a download, but the program can't. I don't like that. Too easy for someone to inadvertently change a constant. 

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Symbolic Constant in Data View
« Reply #7 on: June 14, 2020, 08:38:30 PM »
Fair enough, was just throwing that question out there.
I tend to use them for max values, status lookup codes, days of week, months of year, etc. Mostly for program readability. I tend to use them in a compare statement. IF (UserDefinedSetpoint < MaxValueSetpoint, UserDefinedSetpoint, MaxValueSetpoint)
The other day I was trying to analyze a series of calculations and found myself going back and forth between the Documentation Editor and a Data View to see all the values involved, when it would have been nice to line them all up in a logical order in a single Data View.

I do like how they show in a Trend View, as they can be added retroactively and they populate data all the way back to beginning of data set.

You definitely understand Symbolic Constants (and use them well!!)

Data View is doing communications (read/write) with a data value in the PLC.

Symbolic Constants are documentation (like a nickname) that are actually just constants, so like ATU said, if they were editable in Data View, you would not understand the right mechanism for "updating" them (Data View Write to PLC would NOT do what you thought).

That doesn't mean we don't need a good shortcut from a Ladder reference to the Symbolic Constant record edit.  Well, I just tried it - there is.  Put your block cursor and then parameter cursor on the symbolic constant (e.g. Jan 1), hit Ctrl+D.  Opens up the Doc Editor at THAT record (Jan Symbolic Constant 1).

Ctrl+D goes to the Documentation Editor record for the element where the parameter cursor is in logic.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Symbolic Constant in Data View
« Reply #8 on: September 18, 2024, 01:05:22 PM »
I have noticed that Symbolic Constants can now be added to a Data View, very handy when reading some code and wondering what a value is. However, I have noticed that as soon as I change a Symbolic Constant in the Documentation Editor, it updates the value in the Data View, even without writing change to PLC. Just an  FYI, I'm sure that's not the intended functionality?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Symbolic Constant in Data View
« Reply #9 on: September 18, 2024, 02:17:27 PM »
I have noticed that Symbolic Constants can now be added to a Data View, very handy when reading some code and wondering what a value is. However, I have noticed that as soon as I change a Symbolic Constant in the Documentation Editor, it updates the value in the Data View, even without writing change to PLC. Just an  FYI, I'm sure that's not the intended functionality?

It's working as intended.  There is no "status" read from the PLC for Symbolic Constants.  The Data View just represents exactly what you see in the Doc Editor.

Similar to the behavior in the Ladder View.  If you have a Symbolic Constant in a relational contact, as soon as you change the Symbolic Constant in the Doc Editor, it gets reflected in the Ladder View.  Even though the PLC is comparing against the old value, the Ladder View will show the "new/pending" symbolic constant value.

Designer and the PLC are "out of sync" - once you write the Project to the PLC, everything will be synchronized.

Yes, strange status can occur when they are "out of sync".  There are certain situations where the differences are large enough that all status gets forced OFF and until you update the project in the PLC, you have NO status.

This is one of those situations that the PLC is "old/pending" and Designer is "newer" but status is still LIVE.