10 - 12 - 2024

Numato library

AltonaLab is an Official distributor of Numato:

http://numato.com/

 AltonaLab SCADA software has functional blocks for communication and control of all the Numato devices. Each Numato device is specific and has a different number of GPIOs(General purpose In/Out), some have relays, have different communication interfaces. For this reason, at AltonaLab SCADA software, functional blocks are grouped into different libraries.

It is important to know that the GPIO inputs/outputs of the devices can be set up as digital inputs or digital outputs but only a part of them can be set as analog inputs. For this purpose, it is a good idea to read the device documentation. Each functional block of AltonaLab has a GPIO parameter, we can use it to set every GPIO as input or output, digital or analog. However, according to the documentation of the device, there are restrictions - which GPIOs of the device can be set as analog inputs!

Numato Ethernet devices are much faster than Numato USB devices!!!

The GPIO parameter is shown below:

More for GPIO interface can be read here: http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs

Some parameters of Numato Ethernet devices can be read/saved using the interface below:

 

Libraries with Numato functional blocks:

  • Numato USB GPIO devices
  • Numato USB Relay devices
  • Numato Bluetooth devices
  • Numato Ethernet GPIO devices
  • Numato Ethernet Relay devices
  • Numato WiFi GPIO devices

The Numato functional blocks have similar parameters. The main difference is that the USB and Bluetooth blocks have parameter for ComPort number, for the Ethernet and the WiFi blocks that use TCP/IP Telnet communication protocol, the IP address and IP port of the device are set.

 

Numato blocks from library: Numato USB GPIO devices

License: Hobby, Industrial

Block's parameters:

  • CommPort - when the devices is connected to the computer, open the Control panel, then open View devices and printers, then find the ComPort of the connected Numato device;
  • CommunicatePerSec - on how many seconds to send a command to the device. The more frequently commands are sent, the faster processes we can control, but the device and the computer are more busy. The time of this parameter is in seconds;
  • Disable - if the parameter is checked, the device will not work at run time of the diagram;
  • FastMode - When we try to control very fast process, we have to set parameter CommunicatePerSec=0, FastMode - checked. At this mode some send to Numato device commands can be lost;
  • OnStopResetDigOuts - if the parameter is checked, when the diagram stops, all the digital outputs will be cleared. The parameter is useful in case, any digital output controls a relay, which has to be stopped, when the diagram stops;
  • WaitBetweenCommands - with this parameter we can control the delay time between send/receive commands to the device. The time of this parameter is in milliseconds;
  • GPIO - with this parameter we can change some of the device GPIOs as digital inputs, digital outputs, analog inputs;

Block's outputs:

  • OnRead - becomes to high level, when a new data is received from Numato device and output GPIO's are updated;
  • CommunicationError - becomes to high level if the device does not respond to the send command;
  • CommPortError - becomes to high level is USB connection to the device is lost;

 

Numato blocks from library: Numato USB Relay devices

License: Hobby, Industrial

The blocks from this library have the same parameters and outputs as the blocks from USB GPIO library. The only one new parameter is:

  • RelayCmdIfInpChanged - means the block will send a new command to the Numato device only if someone of the block's inputs related to device relais is changed. This parameter is used for controlling relays, which need to be switched quickly. It is designed for communication speed optimization purposes;

 

Numato blocks from library: Numato Bluetooth devices

License: Hobby, Industrial

All the bluetooth devices are using the same serial communication as the USB devices.

Block's parameters:

  • CommPort - when the devices is connected to the computer, open the Control panel, then open View devices and printers, then find the ComPort of the connected Numato device;
  • CommunicatePerSec - on how many seconds to send a command to the device. The more frequently commands are sent, the faster processes we can control, but the device and the computer are more busy. The time of this parameter is in seconds;
  • Disable - if the parameter is checked, the device will not work at run time of the diagram;
  • WaitBetweenCommands - with this parameter we can control the delay time between send/receive commands to the device. The time of this parameter is in milliseconds;
  • HideErrorMessages - when we use the device at time critical diagrams and parameter WaitBetweenCommands has a low value, some commands to the device will be lost, we can hide the error messagas because of lost commands is we check this parameter;
  • GPIO - with this parameter we can change some of the device GPIOs as digital inputs, digital outputs, analog inputs;

Block's outputs:

  • OnRead - becomes to high level, when a new data is received from Numato device and output GPIO's are updated;
  • CommunicationError - becomes to high level if the device does not respond to the send command;
  • CommPortError - becomes to high level is USB connection to the device is lost;

 

Numato blocks from library: Numato Ethernet GPIO devices

License: Hobby, Industrial

Block's parameters:

  • DeviceIPAddress - IP address of the Numato device;
  • DevicePort - IP port of the device;
  • UserName, Password - used for authentication to the device;
  • CommunicatePerSec - on how many seconds to send a command to the device. The more frequently commands are sent, the faster processes we can control, but the device and the computer are more busy. The time of this parameter is in seconds;
  • Disable - if the parameter is checked, the device will not work at run time of the diagram;
  • GPIO - with this parameter we can change some of the device GPIOs as digital inputs, digital outputs, analog inputs;

Block's outputs:

  • OnRead - becomes to high level, when a new data is received from Numato device and output GPIO's are updated;
  • CommunicationError - becomes to high level if the device does not respond to the send command;

 


Numato blocks from library: Numato Ethernet Relay devices

License: Hobby, Industrial

Block's parameters:

  • DeviceIPAddress - IP address of the Numato device;
  • DevicePort - IP port of the device;
  • UserName, Password - used for authentication to the device;
  • CommunicatePerSec - on how many seconds to send a command to the device. The more frequently commands are sent, the faster processes we can control, but the device and the computer are more busy. The time of this parameter is in seconds;
  • Disable - if the parameter is checked, the device will not work at run time of the diagram;
  • RelayCmdIfInpChanged - means the block will send a new command to the Numato device only if someone of the block's inputs related to device relais is changed. This parameter is used for controlling relays, which need to be switched quickly. It is designed for communication speed optimization purposes;
  • StayLoggedIn - because of communication speed optimization - the LogIn authentication is send only one time to the device and connection to the device is permanent, there is not TCP/IP connection for every new command. Please use this parameter only for time critical diagrams;
  • WaitBetweenCommands - with this parameter we can control the delay time between send/receive commands to the device. The time of this parameter is in milliseconds;
  • GPIO - with this parameter we can change some of the device GPIOs as digital inputs, digital outputs, analog inputs;

Block's outputs:

  • OnRead - becomes to high level, when a new data is received from Numato device and output GPIO's are updated;
  • CommunicationError - becomes to high level if the device does not respond to the send command;

 

Numato blocks from library: Numato WiFi GPIO devices

License: Hobby, Industrial

Block's parameters:

  • DeviceIPAddress - IP address of the Numato device;
  • DevicePort - IP port of the device;
  • UserName, Password - used for authentication to the device;
  • CommunicatePerSec - on how many seconds to send a command to the device. The more frequently commands are sent, the faster processes we can control, but the device and the computer are more busy. The time of this parameter is in seconds;
  • WaitBetweenCommands - with this parameter we can control the delay time between send/receive commands to the device. The time of this parameter is in milliseconds;
  • HideErrorMessages - when we use the device at time critical diagrams and parameter WaitBetweenCommands has a low value, some commands to the device will be lost, we can hide the error messagas because of lost commands is we check this parameter;
  • RepeatLostCommand - because of WiFi communication, sometime some commands send to the device can be lost, with this parameter, the functional block will send the lost command again to the WiFi device;
  • Disable - if the parameter is checked, the device will not work at run time of the diagram;
  • GPIO - with this parameter we can change some of the device GPIOs as digital inputs, digital outputs, analog inputs;

Block's outputs:

  • OnRead - becomes to high level, when a new data is received from Numato device and output GPIO's are updated;
  • CommunicationError - becomes to high level if the device does not respond to the send command;

 

 

Examples with Numato devices:

 

Example: 2 Channel USB Relay Module

URL: https://altonalab.com/shop/usb-relay-modules/2-channel-usb-powered-relay-module/

The block has two relays and 4 GPIOs. The demo diagram is shown below:

 

The block has two important digital outputs, which show the correct work of the device. If digital output CommPortError becomes to hight level, this means that a serious communication problem is appeared, maybe the cable between device and computer is unpluged. When the hardware problem is resolved, it is possible the problem to continue because the virtual communication port on computer side is closed. Only restart of the process can resolve the problem. If CommunicationError output becomes to hight level, this means that the last command from computer to device is not processed. The error can appears in case of very long communicational cable between device and computer or from other reasons. This is not serious error and after 3 seconds from last error, the output becomes to low level. The output OnRead becomes to hight level when a new data is received from the device.

Demo diagram: Numato2.nsm. The relays Relay0 and Relay1 are controlled with buttons with the same captions. IO03 is set as digital input and is controlled with checkbox. IO00 and IO01 are set as analog inputs. Because the ADC of the device works in range 0 .. 5 V, analog inputs are converted to voltage via ExpressionOneIn blocks with expression (X*5)/1024. The result is shown with TextOut controls. IO02 is set as digital output and is shown with Lamp control. The both digital outputs, responsable for device problems are shown with Lamp controls too.

 

Example: 8 Channel USB GPIO Module

URL: http://altonalab.com/shop/usb-gpio-modules/8-channel-usb-gpio-module-analog-inputs/

The block has 8 GPIOs. The demo diagram is shown below:

Demo diagram: Numato8.nsm. IO01, IO04, IO05, IO06 are set as digital outputs and are presented on left side of the block. IO00, IO02, IO03 are set as analog inputs. Because the ADC of the device works in range 0 .. 5 V, analog inputs are converted to voltage via ExpressionOneIn blocks with expression (X*5)/1024. The result is shown with TextOut controls. IO07 is set as digital input and is shown with Lamp control. Please note, that not all of the GPIOs can be set as analog inputs. Please reffer with description of device in Numato WEB site.

 

Example: 32 Channel USB GPIO Module

URL: http://altonalab.com/shop/usb-gpio-modules/32-channel-usb-gpio-module/

The block has 32 GPIOs. The demo diagram is shown below:

Demo diagram: Numato32.nsm. Description of the device is similar as previous device. The different is only that the analog inputs work in range 0..3.3V, this is the reason because the expression of ExpressionOneIn blocks are (X*3.3)/1024. With GPIO interface is possible unused IO to be hiden. Please note, that not all of the GPIOs can be set as analog inputs. Please reffer with description of device in Numato WEB site.