21 - 09 - 2018

SNMP

Block SNMPcontroller:

It is used for controlling the Internet/Ethernet module (IP controller) via SNMP protocol. The device can be at long distance at every poit of the world.

 

 

  • Digital I/O

The device has two registers with 8 I/O each. The names of registers are P3, P5. Every pin of this registers can be set as input or output.

  • Analog inputs

The device has a register P6 with 8 pins, all of them are 10 bit ADC analog inputs in range 0..3.3V.


Every IO of all registers are editable via GPIO interface, please read GPIO Strategy:

http://scada.altonalab.com/index.php/en/scada-design-mnu/inputs-outputs

When the diagram is started, AltonaLab will send all needful commands to determine the IO as inputs or outputs. Then the process will started. This will cost a few seconds.

 Parameters:

  • CommunicatePerSec - the seconds per which the commands for Read/Write operations will be send to device. If this parameter is 0, the commands will be send per every DiscreteTime interval described in block Process.
  • IP Address - IP address of the device;
  • SNMP R/O Pass - password for R/O operations;
  • SNMP R/W Pass - password for R/W operations;
  • InOut  – 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
  • SetIODirection - to send initial commands to device on every start of the process to set the I/O directions of ports P3, P5;

The important output of the block is CommunicationError. Is case the device not answers to the SNMP command, the output will become to hight value for 3 sec.

Device settings:

  • SNMP listen port: 161, this setting is important in case we need to forward the port via LAN router.
  • Defaul settings of the device are: IP port - 172.16.100.2, Password for Read/Write commands: private, Password for read only comands: 000000000000. On center of the device board is a jumper "Reset to Default". If the jumper is set and power up the device, then the device will be reset and default settings will be loaded. A few seconds after power up, the jumper have to be removed.
  • New device or device after reset, have to be connected directly to the computer via LAN cable (not through router). Then IP and mask of the computer LAN network connection have to be set to: 172.16.100.1, 255.255.255.0.
     
    All the device settings can be managed from third pannel Settings->SNMP Device settings:
     

Measuring temperature with the SNMP device and LM335 sensor:

LM335 allows negative temperature to be measured. It works in range -40..+100 degrees Celsius. The sensor increase the voltage with 10mV per every degree Kelvin. The conversation degrees Celsius to voltage is (AnalogInput - 2.7315)*100.0. This means that if the temperature increase over 56 degrees Celsius, the output voltage of the diagram above will exceed 3.3V and this can damage the analog input of SNMP device. It is possible to prevent damage using divisor with resistors but this will decrease accuracy of measurement.

More information about LM335:

http://pdf.datasheetcatalog.com/datasheet/texasinstruments2/lm335.pdf