26 - 09 - 2017

Numato library

The lybrary supports some devices, produced from Numato Lab company:

http://numato.com/

 

Block: 2 Channel USB Relay Module

URL: http://numato.com/2-channel-usb-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.

Parameters:

  • CommPort - the virtual communication port, where device is connected with computer;
  • CommunicatePerSec  - communication period between every Read/Write operations. If this parameter is 0, the next command will be send immediately after previous one;
  • GPIO - the parameter opens GPIO interface for manage pin type (digital/analog) and pin direction (input/output). More for GPIO interface can be read here: http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs

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.

 

Block: 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:

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.

Parameters:

  • CommPort - the virtual communication port, where the device is connected with computer;
  • CommunicatePerSec  - communication period between every Read/Write operations. If this parameter is 0, the next command will be send immediately after previous one;
  • GPIO - the parameter opens GPIO interface for manage pin type (digital/analog) and pin direction (input/output). More for GPIO interface can be read here: http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs

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.

 

Block: 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:

 

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.

Parameters:

  • CommPort - the virtual communication port, where the device is connected with computer;
  • CommunicatePerSec  - communication period between every Read/Write operations. If this parameter is 0, the next command will be send immediately after previous one;
  • GPIO - the parameter opens GPIO interface for manage pin type (digital/analog) and pin direction (input/output). More for GPIO interface can be read here: http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs

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.

 

Block: 8 Channel Bluetooth GPIO Module


The spetial in this block are its parameters, which are important because of wireless coomunication between device and computer and sometime some commands can be lost: RepeatLostCommand, WaitBetweenCommands.

Parameters:

  • CommPort - the virtual communication port, where the device is connected with computer;
  • CommunicatePerSec  - communication period between every Read/Write operations. If this parameter is 0, the next command will be send immediately after previous one;
  • GPIO - the parameter opens GPIO interface for manage pin type (digital/analog) and pin direction (input/output). More for GPIO interface can be read here: http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs
  • Disable - If the device is not connected to the computer, the diagram can be run only if this functional block block is disabled;
  • RepeatLostCommand - sometime wireless commands between the bluetooth device and computer are lost, then the SCADA repeats the last unprocessed command again to the device. If the user want fast communication with the device, he can stops the repeat of lost commands. If the reliability of the system is more important, then this parameter has to be unchecked;
  • WaitBetweenCommands - this is a sleep period in milisecond, the longest sleep gives more stability in bluethooth communication;
  • HideErrorMessages - Sometime the communication between PC and device raises errors. This parameter can hide the errors;