News:

  • May 18, 2024, 04:31:38 AM

Login with username, password and session length

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

Bolt

  • Hero Member
  • *****
  • Posts: 550
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: 3666
    • 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: 550
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: 5996
  • 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: 3666
    • 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: 550
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: 2121
  • 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: 3666
    • 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.