Runtime system variables: what are they good for?

Domat Control System Forums SoftPLC Runtime (english) Runtime system variables: what are they good for?

This topic contains 0 replies, has 1 voice, and was last updated by  Jan Vidim 17.1. 2013 15:10.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #12606

    Jan Vidim
    Keymaster

    Communication at the ports

    HW.CommError.<driver>
    Read only.
    false communication at this channel is OK
    true at this channel, at least one variable has a communication error

    System.Communication.Block
    Read / write.
    Globally stops communication at all channels. If the communication is stopped by this variable, the HW.CommError.<driver> variable is false, even if the channel has a physical commuication error.
    false not blocked, communication enabled
    true blocked, communication disabled

    HW.PriorityRefresh.<channel>
    Read / write.
    Forced update of the variables at rising edge (M-Bus only). Used for controlled meter readout based on an event.

    HW.LogPortMonitor.CircularSize.<driver>
    Read / write.
    File size (in kB) for record of Port Monitor to the Flash memory of a PLC (MiniPLC) or to a HDD (SoftPLC). It makes sense only if HW.LogPortMonitor.<driver> is True.
    0 no limitation of the file size – take care, the disk / flash memory may be full soon and this may spoil other processes!

    HW.LogPortMonitor.<driver>
    Read / write.
    false default – communication is not sampled
    true communication is sampled
    Alarm LED and alarms

    System.Alarms.IndicatorModeManual
    Read / write.
    At process stations with the alarm LED it specifies how this LED will be controlled. When Auto, the LED is controlled according to the alarms in the process station:
    no alarms – off
    at least one unacknowledged alarm – flashing
    at least one unreset alarm – on.
    When in Manual mode, the LED is controlled by the System.Alarms.IndicatorManualState variable.
    false automatic mode
    true manual mode, LED controlled by System.Alarms.IndicatorManualState

    System.Alarms.IndicatorManualState
    Read / write.
    Controls the alarm LED, if System.Alarms.IndicatorModeManual is in true.
    false LED off
    true LED on

    System.Alarms.AcknowledgeCount
    Read only.
    Number of active alarms (in blocks BD49, BD50) in the system.

    System.Alarms.ActiveCount
    Read only.
    Number of active unacknowledged alarms (in blocks BD49, BD50) in the system.

    System.Alarms.MemoryCount
    Read only.
    Number of alarms in memory (inactive, unreset) (in blocks BD49, BD50) in the system.

    System time

    System.RTC
    Current system time inclusive time zome and daylight saving time (DST) shift. It is used to control time schedulers and other processes which should take into account the time zone and DST. The time zone is defined in the IDE in Project properties <Project> – Properties – Time zones & daylight savings.

    System.RTCDaylight
    Flag of the daylight saving time. Transition between DST and winter time follows according to a table defined in Project Properties.
    false it is normal time now
    true it is DST now

    System.RTCUTC
    Current system time – world time (Universal Time Coordinated), used for processes where the time must rise continuously (which is not the case at the moment when the DST goes to normal (winter) time).
    Starting and stopping of the runtime

    System.RunMode
    Read only.
    Status of IDE or runtime.
    0 stop
    1 starting ?
    2 run (Full Run)
    3 stopping (Shut Down Full Run)
    4 only blocks are calculated (Evaluation only)
    8 only the drivers are communicating (Communication only)

    System.WaitForApplicationStop
    Read / write.
    Defines if the runtime must be stopped safely, i.e. based on completing a set of process conditions. If so, the variables System.StopRequest and System.StopAllowed must be used – see below.
    false normal runtime stop
    true “safe” stop

    System.StopRequest
    Read only.
    If the runtime has to be stopped (remotely over IDE) this variable goes to true and based on this demand, the program may start to execute activities for a safe stop. As soon as these conditions are fulfilled (eg. temperature drop at a heat exchanger under a certain value, clear shutting of the valves indicated by signal from end switches, etc.), the program must set the StopAllowed variable to True, which stops the program finally. In the meantime, the program is in Stopping mode (Shut Down Full Run).
    false runtime is not stopping
    true runtime accepted the stop command

    System.StopAllowed
    Read / write.
    When writing true to StopAllowed the runtime is stopped (of course only if the safe stop was required (System.WaitForApplicationStop = true), and the runtime stop request was accepted (System.StopRequest = true), see above).

    RcWare DB

    System.RcWareDB.SavingEnabled
    Read / write.
    Enables / blocks data saving into a RcWare DB, if the saving is enabled, it is controlled by the time interval. SavingEnabled blocks saving even for the SaveNow command. If the interval is 0, the data is saved only on request of the SaveNow variable (e.g. for metering, values are stored only if necessary).
    false data is not saved in the database
    true data is saved in the database

    System.RcWareDB.SaveNow
    Read / write.
    Saves data on the rising edge; after the saving is completed, the flag is set to false.

    System.RcWare.DB.Status – same as for proxy
    Read only.
    To identify connection status and save errors
    -2 communication not configured, the data is not communicated
    0 database not accessible (DB configuration, internet connection etc.)
    RcWare Proxy server

    System.SoftPLCProxy.Status
    Read only.
    To identify connection status to proxy server
    -2 communication not configured, no data transfer
    -1 communication to proxy is configured, but the project is stopped or it did not try to connect yet
    0 error while connecting to proxy
    1 connected to proxy and registering values
    2 connected to proxy and communicating.

    Event logging

    System.Logger.Enable
    Read / write.
    Enables logging of system events of runtime into a file.
    false events are not logged
    true events are logged

    System.Logger.Facilities
    Read / write.
    Bit field to specify what kind of events will be logged:
    0 Generic
    2 Runtime
    4 UpdaterEngine
    1024 SoftplcProxy
    2048 PortMonitor
    4096 RcWareDb

    System.Logger.Level
    Read / write.
    Defines which events according to their importance are stored
    1 Debug0
    2 Debug
    4 Info
    6 Warning
    9 Error
    10 None

    Actual values saving

    System.ForceSaveValues
    Read / write.
    On rising edge, actual variables are saved into a file to the disk or Flash memory. (Otherwise, the variables are saved each 30 mins periodically, if not disabled by the No save request to flash variable.)

    System.ValuesLastSaveTime
    Read only.
    Last time stamp of saving values regardless what the reason was (even if the runtime itself did it)

    System.Variables.CurrentValuesLoaded
    Read only.
    Only for „large“ PLC, true = actual values were read from the .vars file. Normally, after runtime start the variables are read from the .splcproj project file, then the runtime checks if the .vars file exists. If it does, its CRC is checked, if it is OK, the values are copied from the .vars file to the runtime.
    false actual values are from the .softplc project (so most probably those wich were stored at the last upload of the project from IDE)
    true actual values are from the .vars file (i.e. those which were saved 30 mins ago, or at forced writing (System.ForceSaveValues))

    Note: a running RT writes to the .vars file only, IDE writes to .vars as well as to .splcproj (so that the values are consistent with the project).

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.