03 - 10 - 2024

SMNP.nsm

This example demonstrates how to use the SMNPController block which has 16 digital I/O and 8 analog inputs and can work remotely by TCP/IP SMNP protocol. Parameters of the block are its IP address, passwords for remote access, which are strings and need to be equal on the diagram and on the mobile. Parameter CommandPerMilisec is the time interval in milliseconds per which read/write operations will be made. When the process starts you should wait a few seconds until the first commands for determining the device’s pins as inputs or outputs have passed.

With the SetOuts button the digital outputs 0, 1, 2 of device of register P3 can be set from low to high level. Some digital inputs are shown on the diagram as lamps – register P3, inputs 0, 1, 3, as well as those of register P5, inputs 0, 1.

All the values from analog inputs are presented on the diagram with TextOut controls. 7 of them directly show the input signals which are volt in diapason 0.0 .. 3.3V. Only the input signal 0 is converted to temperature by block ExpressionOneIn with parameter Expression with value (X - 2.7315)*100.0.