Only Archive on “Status change”

Forum Home Forums Understanding the Software Only Archive on “Status change”

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #17412
    TroyV23
    Participant

    Hi,

    I have a digital input logger device in the field that communicates with RapidScada via modbus, and currently I am polling the device to get updated status of each input “ON” or “OFF” but this creates a lot of wasted data.

    A preferred, and more efficient method would be if the archive only contained time stamps when the input status changed, and what that status changed to.

    For Example…

      Current setup:

    Input0001 – ON – 10:00:01
    Input0001 – ON – 10:00:02
    Input0001 – ON – 10:00:03
    Input0001 – ON – 10:00:04
    Input0001 – OFF – 10:00:05
    Input0001 – OFF – 10:00:06

      Preferred Setup:

    Input0001 – ON – 10:00:01
    Input0001 – OFF – 10:00:05

    Is this possible to do inside Rapidscada?
    I am currently archiving to an PostgreSQL database.

    Thanks in advance!

    #17413
    Mikhail
    Moderator

    Hi,
    Historical archives of the default type save data with fixed period.
    To save data on change, enable PostgreSQL archives. They are disabled in the HelloWorld project. Archives can be found and configured in Instances – Default – Server – Archives.

    #17414
    Mikhail
    Moderator

    > I am currently archiving to an PostgreSQL database.
    If so, just configure the archive options.

    #17415
    Mikhail
    Moderator

    Note that you need some intermediate points to draw a chart.

    #17416
    TroyV23
    Participant

    Thanks!

    I will need up to seconds accuracy for the time-stamp of the status changes, how would I achieve that?

    #17419
    Mikhail
    Moderator

    You can mix periodical writing and writing on change. If you published a screenshot of the archive options, I could advice.
    Also I suggest to enable events for those channels.

    #17460
    TroyV23
    Participant

    Settings

    These are the archive settings I chose, but unfortunately it’s still creating periodic logs every second which is too much data.

    If I remove the “write with period” setting. How often will the device be checked for changes?

    Also, side question. Is there a quicker way of editting multiple channels because I find myself having to edit hundreds of lines manually with every change I do. I can select multiple rows but it doesn’t let me edit them simultaneously.

    Thanks!

    #17464
    Mikhail
    Moderator

    If you untick “Write with period”, the archive will write data only when it changes.

    > Is there a quicker way of editting multiple channels
    Method 1
    1. Optionally filter the channels in the table.
    2. Use the replace feature (Ctrl + F).

    Method 2
    Edit a table in XML. Then reload the configuration database.

    #17520
    TroyV23
    Participant

    If you untick “Write with period”, the archive will write data only when it changes.

    How often does rapidscada check for changes? Is it every second?

    2. Use the replace feature (Ctrl + F).

    How do you find & replace when the cell is blank? I wasn’t able to make that work for me.

    Thank you so much for the assistance!

    #17522
    Mikhail
    Moderator

    How often does rapidscada check for changes? Is it every second?

    Approximately 10 times a second.

    How do you find & replace when the cell is blank?

    I think, this is not possible.

    #17526
    TroyV23
    Participant

    Thanks Mikhail, I have the archive working properly now.

    Is there a way to make RapidScada store the Channel Name in the SQL database? Seems it only stores the Channel number.

    #17533
    Mikhail
    Moderator

    Is there a way to make RapidScada store the Channel Name in the SQL database?

    Yes. Create a new deployment profile, and set Extension to ExtDepPostgreSql. Set the parameters on the DB Connection tab.
    When you deploy a project with that profile, it will be written to PostgreSQL.

    #17535
    TroyV23
    Participant

    I’ve made the new profile, uploaded config with the new settings successful.

    However, the Historical table still does not contain the Channel name column, only channel number.

    And advice to make this column?

    #17538
    Mikhail
    Moderator

    Channels and other tables of the configuration database will appear in different tables in the project database schema.

    #17546
    TroyV23
    Participant

    Channels and other tables of the configuration database will appear in different tables in the project database schema.

    Is it possible to get the channel name through the API ?

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