TroyV23

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • in reply to: Only Archive on “Status change” #17547
    TroyV23
    Participant

    Im attempting a different path, so I’ve created this feed using the API:

    https://i.postimg.cc/sxZ2X3B3/tmp-1de38a8b-3926-45a1-9bc3-bfc23f60969d.png

    I am not able to display the channel number it always displays as undefined.

    mainApi.getHistData(ARCHIVE_BIT, timeRange, “55500-55508”, function (dto) {
    let outElem = $(“#divData2”);

    if (dto.ok) {
    outElem.html(“”);
    let timestamps = dto.data.timestamps;

    if (timestamps.length > 0) {

    let trend = dto.data.trends[0];

    let table = $(“<table></table>”);
    table.append(“<tr><th>Date</th><th>Time</th><th>Channel</th><th>State</th></tr>”);

    for (let i = 0; i < timestamps.length; i++) {
    let timestamp = timestamps[i];
    let record = trend[i];
    let state = record.df.dispVal;
    let channel = record.cnlNum;

    // Only show On/Off
    if (state !== “On” && state !== “Off”) continue;

    let dt = new Date(timestamp.lt);

    let day = String(dt.getDate()).padStart(2, “0”);
    let month = dt.toLocaleString(“en-US”, { month: “short” });
    let year = dt.getFullYear();

    let hours = String(dt.getHours()).padStart(2, “0”);
    let minutes = String(dt.getMinutes()).padStart(2, “0”);

    let dateStr = ${day}-${month}-${year};
    let timeStr = ${hours}:${minutes};

    // Pick CSS class
    let stateClass = state === “On” ? “state-on” : “state-off”;

    table.append(
    `<tr>
    <td>${dateStr}</td>
    <td>${timeStr}</td>
    <td>${channel}</td>
    <td class=”${stateClass}”>${state}</td>
    </tr>`
    );

    • This reply was modified 1 month, 1 week ago by TroyV23.
    • This reply was modified 1 month, 1 week ago by Mikhail.
    in reply to: Only Archive on “Status change” #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 ?

    in reply to: Only Archive on “Status change” #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?

    in reply to: Only Archive on “Status change” #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.

    in reply to: Only Archive on “Status change” #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!

    in reply to: Only Archive on “Status change” #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!

    in reply to: Only Archive on “Status change” #17416
    TroyV23
    Participant

    Thanks!

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

    in reply to: Modbus Data Formula #14548
    TroyV23
    Participant

    Add your own type by analogy ON-OFF by specifying On: blue, Off:yellow for example

    This worked perfectly! Thank you 🙂

    in reply to: Modbus Data Formula #14530
    TroyV23
    Participant

    On the “Table” view, can I customize the colour of the states “ON” and “OFF” ?

    Right now ON is green, and OFF is red. How Do I use other colours?

    in reply to: Chart not Displaying Data #14527
    TroyV23
    Participant

    I discovered the issue was that my minute archive was not set to active. The chart is populating fine now!

    in reply to: Chart not Displaying Data #14517
    TroyV23
    Participant

    I updated to latest version 6.2.1
    The reports function is now working, but charts are still blank.

    Where can I access the Chart configuration?

    in reply to: Chart not Displaying Data #14515
    TroyV23
    Participant

    I have still been unable to get my chart to display any lines of data, I open the Channel and the Chart is blank. The table populates data just fine, but the reporting function also has an issue.

    When I try and generate a report, it says I have no channels in the drop down

    in reply to: Modbus Data Formula #14391
    TroyV23
    Participant

    I reversed the conditions, it works now 🙂

    in reply to: Modbus Data Formula #14347
    TroyV23
    Participant

    I now have the On-Off condition working but I realized it broke my LED scheme component condition. How do I make the LED indicator condition show green when no alarm, and red when alarm is on.
    The condition options have to be numbers, and that doesn’t work anymore.

    Thanks in advance!

    in reply to: Modbus Data Formula #14281
    TroyV23
    Participant

    Input formula would be Cnl > 0 ? 0 : 1
    Format is Off-On

    Thanks!
    That worked perfectly, I just had to make a custom format to reverse the “Off-On” to “On-Off”.

Viewing 15 posts - 1 through 15 (of 26 total)