Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1073

    Hello Team,

    I want to save some configuration values before deploying the app….
    What i have found is that as soon as i “Upload” the app and download it to the device
    all Controls and Fields that i have pre-configured are GONE!!!

    So i said, I need to find me a way of storing those values/button status before i upload the app…

    And there i found “Databases”….. which using a .CSV file i can have Rows and Columns..
    Not a big deal…i went into MSExcel and created a template, exported it as .CSV, uploaded it
    to my Local Files Databases.

    So lets say i want to have access to write to ROW #1, COLUMN #1 which is the first value of the configuration record….

    How would i have to build my statement to have access to it ??? READ/WRITE ACCESS…. so i can store the values and when the app is downloaded and started the first thing to do would be READ the values i pre-configured from the database.

    If i can have one example….i can to the rest….

    Thank You….

    • This topic was modified 1 year, 2 months ago by RFARDONK.


    First of all why U want to store in the app the state and the preconfigured value? This is HMI app which connect with many brands PLC devices, all these values are stored in this devices. First if U open or load the app all values are read from connected PLC and set the correct state for all switches, buttons, fields, slider, etc…, then U can changes and write it in real time to the PLC Memory again.

    If U want for example set on startup the app the state of the switch which is not connected with any device, U can use system method direct in switch or background expression connected with many switches and other objects:


    Name SWITCH
    value $System.pulseOnce ? LoadState : !LoadState

    or if U connect with exp1
    SWITCH value EXP1.value

    Background EXP1

    Name EXP1
    value $System.pulseOnce ? LoadState : !LoadState

    Name – name of Your switch,
    LoadState – for switch 1/0, true/false ( on first start the app will be loaded MainState to the value field of the switch).




    And you are correct in all your points….

    Here is my challenge…

    Im trying to develop a generic application that can be pre-configured before deployment.
    – Yes, all data is stored in PLCs.
    – There can be an undetermined amount of Sites.
    – Each site may have up to 8 different groups of different PLCs.
    – Some of the groups may have up to 3 PLCs
    – The app may be used Locally through LAN so a Local IP is required for the MODBUS/TCP MASTER and can be different by Site.
    – The app may be used Remotely and can have a Static IP or a DomainName of the Site’s Router with Port Forwarding to the Site’s MODBUS/TCP Master IP.
    – The app will be configured/tight to a unique MASTER MODBUS/TCP GATEWAY Serial Number.

    So as you see, If i want to have a generic application and want it to be pre-configured, i want to
    create a Profile of Values and Switches that will tell a. which groups are available b. how many
    PLCs per group c. Connection Information d. Security

    So based on the values and pre-configured switches (On/Off) groups of PLCs and Tags will be used.
    Hidden properties of Groups will be Enabled/Disabled based of Control Switches that were Pre-Configured.

    And here is the BUT, I just did the first test….. So i PRE-Configured a Test Site….
    I ACTIVATED the App, UPLOADED IT, The Remote Site REDEEMED the Activation Code, The App was DOWNLOADED
    But ALL, values were empty, and switches were turned OFF.

    If i were to send UPDATES regularly, the app will be de-configured.
    I already noticed that when a UPDATE is performed and the new version of the app is downloaded the COMMS Monitor
    for the PLCs is turned OFF. I can instruct to turn it ON very easy…… BUT the Site’s personnel is not supposed
    to have access to the Configuration Page.

    The application must be capable to either ADD additional PLCs Groups, or ADD additional PLCs within a Group just
    by turning ON Group/PLCs Switches.

    And everything is working perfectly…once i provide the connection information and configure the switches…..
    Groups appear and disappear. Just not after i “SEND” the new version.

    • This reply was modified 1 year, 2 months ago by RFARDONK.

    By the way…. all Values entered are in TEXT/NUMBER fields and all PLCs Groups to be enabled/disabled are to be controlled by Switches (ON/OFF).


    As per documentation here is a sample .CSV
    which initially i have placed in both Assets and Databases “databases://”+FileName.value

    So how to i read the rows and columns….???

    RecipeIdent | FieldName1 | FieldName2 | FieldNameN |
    Recipe1 | Value1 | Value 2 | ValueN |



    So this is what was going on….

    I was configuring the values and switches to the required Site Configuration….
    I uploaded the “new version”
    I downloaded the “new version”as update
    The configuration screen was showing ALL value field empty and switches OFF
    I decided to entered Edit Mode and when i “edited”the field it actually contained the correct value.
    in the value property….but not in the value field was showing “”.

    So this is what worked….i defined

    value as …. SwitchX.continuosValue

    Now all Text/Number field and Switches show the intended data and status
    after i Update with a new version.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.