CODESYS Cloud Adapter
Obtain the AnyViz Cloud Adapter Package from the CODESYS Store and download the libraries as follows:
- CloudAdapter.compiled-library: Compatible library (SP8 or newer)
- CloudAdapter_v2.compiled-library-v3: Signed V2 library with symbol set support (SP15 or newer)
Then open the Library Manager. If the library was downloaded via the download link, click Library Repository to install the library. Now click Add Library to add the AnyViz Cloud Adapter library to the project.
Prepare project
The AnyViz Cloud Adapter automatically makes the variables of the PLC program available in the cloud. For this, a symbol configuration is required in the CODESYS project. It can be used to specify which variables are to be provided and whether they may be written.
Execute function block
A free-running task with low priority is recommended for invoking the AnyViz function block. This ensures that the core program is not affected and communication with AnyViz is not delayed.
Now instantiate the AnyVizClient
FB. The following parameters are mandatory:
ProjectId |
The project number, which can be seen in the portal. |
Password |
Enter a secure password, which must be confirmed later in the portal. |
Example in FBD (Function block diagram)
Example in ST (Structured text)
Optional parameters
Mode |
Operation mode Online (default) to connect to the cloud,
Operation mode Offline to record data locally or
Operation mode Disabled to disable the function block.
|
UserHandle |
When using symbol sets, access to the symbols can be restricted.
Symbol rights can be used to specify which symbols are provided and which access rights are allowed.
The input parameter expects a RTS_IEC_HANDLE which is returned by the UserMgrLogin() function.
|
StorageDirectory |
Specification of a relative or absolute path to define the storage location of the persistent data (configuration and offline recording). If not specified, the default directory is used. |
LiveValueInterval |
Deviating sampling interval for the transmission of the live values to reduce the data volume. If not specified, transmission is at 1 second intervals. |
LocalVisuUrl |
Specify one or more URLs separated by semicolons (;) to be provided in AnyViz (e.g. local WebVisu). |
BrowsePath |
By specifying a relative or absolute path, file access via AnyViz can be enabled. AnyViz users with the required privileges can then access the file system and upload, download, or delete files. |
CustomerPortalId |
Specifying the different portal ID to connect to an OEM instance. |
DisplayName |
Display name in the portal. |
Outputs
Status |
Description of the current status or error in plain text. |
Error |
TRUE on connection error or configuration error. |
Connected |
TRUE if the connection to AnyViz could be established successfully. |