Change Log

1.1.263

2023-06-02

arrigo-dc

arrigo-wamp-host

arrigo-services-state

arrigo-services-ssf

arrigo-services-chart

arrigo-services-volume

arrigo-services-db

1.1.233

2023-05-03

arrigo-dc

arrigo-wamp-host

arrigo-services-state

arrigo-services-ssf

arrigo-services-chart

arrigo-services-volume

arrigo-services-db

1.1.211

2022-06-07

arrigo-dc

arrigo-wamp-host

arrigo-services-state

arrigo-services-ssf

1.1.202

2021-12-10

1.1.201

2021-12-10

1.1.194

2021-12-08

A portal to the legacy (existing EXOscada) domain. Use these functions while you are waiting for the proper datasource interface for advanced read/write to variables. Be careful! This is raw read/write. No access control at all. Make sure that your client code (OnManeuver, OnChanged, OnOpen) does NOT send in the variables as strings. Define the variables in the serverside function. Make sure the variable values are within boundaries before write.

request/response Message type definition for variable quality.

const  Request = 0,
        Response = 1,
        Update = 2,
        ErrorNotExist = 3,
        ErrorUnreachable = 4,
        Pending = 5,
        Expired = 6,
        AboutToExpire = 7,
        UnknownError = 8;
read

call read. The function returns immediately with an response array containing variable responses. Check the type for each response. If this is the first time the variable is read, the value is still pending, and type for object is 5, according to the definition above. You have to manually enumerate and check if you need to read again, to make sure that every variable has its value before proceeding.

If you set upp an interval in the view, which periodically calls the function, the type will update and client side can be updated when variables is read. We strongly recommend that you use these functions with caution, as a last resort. Use expressions and OneShot bindings in OnOpen as long as you can. This is only for variables which you not know during compile time.

async function readFromController(args, callInfo){
    const read = callInfo.context.legacy.read;
    const variables = ["Controller_A1.QSystem.Sec"];
    const readResult = await read(variables);
    console.log(readResult);
    return readResult;
}

variables contains an array of read results. Each entry is the response for corresponding read variable in the array sent in.

[{
    "value": 40,
    "variable": "Controller_A1.QSystem.Sec",
    "type": 1,
    "timestamp": "2021-12-08T14:59:29.777131Z"
}]

write

Same as read. Only difference is that only one variable is possible to write at a time. The write method has same response object as above, but is not an array.

async function writeToController(args, callInfo){
    const write = callInfo.context.legacy.write;
    const variable = {variable: "Controller.DigOut(7)", value: 1};
    const writeResult = await write(variable);
    console.log(writeResult);
    return writeResult;
}
execute

This method can execute EXObasic snippets, or oneliners. This can be used for synchronizing controllers, block/unblock alarms e.t.c.

async function blockAlarm(args, callInfo){
    const execute = callInfo.context.legacy.execute;
    const executeResult = await execute("UnreachableAlarms.Controller_A1.Block");
    console.log(executeResult);
    return executeResult;
}

1.0.186

2021-11-26

1.0.185

2021-10-14

1.0.184

2021-08-23

1.0.183

2021-07-09

1.0.176

2021-05-03

1.0.136

2021-04-28