Vai al contenuto

Availability of a SNMP to Modbus converter

Home Forum Discussioni su problematiche generali Availability of a SNMP to Modbus converter

Stai visualizzando 3 post - dal 1 a 3 (di 3 totali)
  • Autore
    Post
  • #35974
    Anonimo
    Inattivo

    I would like to know if you have a SNMP/Modbus converter, or if yours SlimLine products can deal with SNMP protocol. I’ve a project on which have to interface an UPS that uses SNMP protocol.

    #39458
    Sergio Bertana
    Amministratore del forum

    We not have any SNMP to Modbus converter, but our SlimLine and Netsyst products can manage the SNMP protocol. We have developped the eLLabSNMPLib library for that purpose. This topic (Unfortunaltely it’s in Italian) treats the argument with a source code example, the example contains also the library. In the library you can found 2 FBs.

    The SNMPAgent FB, allows the systems to act as SNMP agent, so they can be reached by any standard SNMP manager programs (i.e. Nagios, Cacti, etc..). By program it’s possible to define all the OIDs must be published and assign to them any program variables. Here an example:

    VDefs.Type:=16#02; (* Variable type (Integer) *)
    VDefs.Writable:=TRUE; (* The variable can be written *)
    VDefs.OID:=ADR(‘1.3.6.1.4.1.36955.1’); (* OID definition *)
    VDefs.Address:=ADR(Value); (* Variable address *)
    VDefs.Length:=SIZEOF(Value); (* Variable length *)

    The SNMPManager FB, allows the system to act as SNMPManager, with this FB you can read any OID from any systems, you define the IP address, the Community, the OID and the type of variable to be read. The FB reads the OID value and stores the result on the defined program variable. Here an example:

    SNMPMng.Address:=ADR(‘192.168.0.184’); (* Agent address *)
    SNMPMng.Community:=ADR(‘public’); (* Community *)
    SNMPMng.VType:=16#04; (* Variable type (Octect string) *)
    SNMPMng.OID:=ADR(‘1.3.6.1.4.1.36955.2’); (* OID to be read *)

    #39461
    Sergio Bertana
    Amministratore del forum

    To answer to your question about SNMP/Modbus converter, if your needs are only to read some OIDs from the UPS and make them available to your program or reachable by Modbus you can use the SNMPManager FB to read the OIDs and store them to program variables mapped on the DB 100 memory area. So they can be reachable by the Modbus.

    If you want make a real SNMP/Modbus converter you have to write a program that manages the modbus requests, on a modbus request reception sends a SNMP request, waits for the SNMP answer and send it back to the Modbus client.

Stai visualizzando 3 post - dal 1 a 3 (di 3 totali)
  • Devi essere connesso per rispondere a questo topic.