Wish - Scale Values

I second this request.

It would be very helpful to have high level commands to query and set the analog scale values from a chart or OptoScript.

The addition of two operations:

  • GetAnalogFullScale(ioName)
  • SetAnalogFullScale(ioName, newFullScaleValue)

would allow programmers to add logic to access and manipulate analog scaling values.

These functions would be useful in applications where the end equipment users can make equipment modifications in the field. We would like to limit device specific changes to a single configuiation include file, so when we update software, we do not overwrite device specific changes.

The config file would contain the scaling factor for this specific device:


100.0 ^ConfigMyConfigurableMfcFullScaleFlowInSCCM @!

or

500.0 ^ConfigMyConfigurableMfcFullScaleFlowInSCCM @!

Code-wise, it would look like this:

, in the Power Up chart:

SetAnalogFullScale(MyConfigurableMfc, ConfigMyConfigurableMfcFullScaleFlowInSCCM);

in other charts, the current full scale value could be accessed as follows:

UserSetpointError = (SetPointFromUser > GetAnalogFullScale(MyPresetMfc));

Apparently, the hardware memory map can be used to access this information, however there are drawbacks to using the hardware memory map –

  1. Figuring out what memory address is to feed to the ReadNumTableFromIoUnitMemMap() function is, well, painful and prone to error.
  2. If the Analog I/O point is ever moved, there are now multiple places in the strategy that need to be changed.
  3. Embedding the scale value in the controller configuration make it difficult to install logic upgrades on devices as we sometimes need to make other changes to the controller configuration.
1 Like