Introduction

This software is used to write, compile and download the user' scripts to the GRD/cLAN. Before using it please check that the GRDconfig software is able to talk to the device.

Software description

Connecting to the device

There are two ways to connect the GRDconfig to the device. Locally (By USB on the GRD, by LAN/Ethernet on the cLAN) and remotely (through the Middleware)

Connecting to the device - GRD by USB

The USB driver must be installed on order to do it using the USB port.

Expand the "Connect" button and select "Open USB Connection"

device

Connecting to the device - cLAN by LAN/Ethernet

The USB driver must be installed on order to do it using the USB port.

Expand the "Connect" button and select "Open Ethernet Connection"

device

After doing it you will see a list with the cLANs connected to your network. You can choose the "Remote" mode to manually type cLAN's IP address.

device

Choose the one you want to configure.

You will be asked to type a password. It's the same password the cLAN will use to establish a connection to the MW.

device

 

Connecting to the device - cLAN-XF / GRD-XF remotely (XF models only)

The device must be connected to the Middleware in order to be configured remotely. The Middleware version must be 4.2.0 or higher to support remote script upload/download

It is necessary to load into the configurator the parameters of the MW(s) to which you want to connect, in order to gain remote access to the GRDs they have connected. To do this, go to “Software Configuration -> MW Connection”

 

And add as many URL/IPs, ports, and credentials as needed by clicking "New Connection".

aa

Expand the "Connect" button and select "Open MW Connection"

Then choose the connection and the device

 

 

 

Connecting to the device - cLAN-MQ / GRD-MQ remotely (MQ models only)

The cLAN-MQ (firmware 10.5+) and the GRD-MQ (10.3+) can be configured remotely with the Programmer script.

Both the cLAN-MQ/GRD-MQ and the ScriptProgrammer must be connected to the same broker.

Device configuration

Topic configuration. The device will add a text to the topic as explained later.

mqttcfgpubtopic

mqttcfgpubtopic

Configuration topic - Identifying the device

The device will add the ClientID to the base configuration topic.

Example

Subscribe -> grdconfig/enlace/1/clientID

Publish -> grdconfig/enlace/0/clientID

Configuring the ScriptProgrammer for remote MQTT configuration

You must configure the broker access, the base configuration topic and as many client IDs as you need to identify the remote devices.

Go to “Software Configuration -> MQTT Connection”

mqcfg1

mqcfg1

This base topic must match the one configure on the device.

Remote configuration

Expand the "Connect" button and select "Open MQTT Connection"

And selecto the Connection and ClientID of the device you want to configure.

mqcfgcon

Once the connection is established, the 'Download', 'Upload', 'Start', and 'Stop' buttons can be used as if you were locally connected to the device.

Script Versions 1 and 2

In the menu "Project", option "Properties", tab "Script" you can chose between script versions 1, 2 and 3

Version 2 doubles the variables quantity, it allows upper and lower case variables. Version 1 only allows lower case variables.

Programs written in version 3 are identical to those in version 2. They simply take up less space in the device's memory.

7b

The choosen version will be use in two situations. While verifyng the script or before sending it to the device.

If the script version is not compatible with the device you will see this error message.

7c

Upload/Download Script

Once the link is established you can send or received scripts. Before downloading a new script it will be checked.

 

Editing scripts

To write a script you must type the code on the edition text area. Contextual help will be displayed on some functions.

To check if there are errors on the code you can press the “Verify” anytime.

If the software detects an error it will mark it with a red square and will show you the line on the bottom

On this next example we can see a missing ";"

If no errors are found you will see the next pop-up window.

Once the script is verified you can send it to GRD by clicking on “Download to device”.

Script debugging

The Script Programmer has two methods that will help you to debug your application. The GRD's firmware must be 5.2.0 or higher to support these options.

Variable watch

This tool will let you check the numeric and string values. You will also be able to edit these values in run time.

Once the GRD is connected to the "Project" menu, "Watch variables" option and then select "Numeric" or "String"

VarMon

Trace Window

This tool will display messages sent from the script in a pop-up window. You will also be able to send texts to the script to simulate different working conditions.

Once the GRD is connected to the "Project" menu, "Trace Window "option

VarMon

Script Compression

The script maximum size supported by the GRD is 15.000 characters.

If this space is not enough for your application you can compress the script before sending it to the GRD. This will remove all your comments on the code and the extra spaces and tabs.

If you want to keep these comments you have to save a copy of the script in your computer.

To enable the compression go to the "Software Configuration " menu, "Compressed Transfer" option.

Compress

2025-07-02