Setup snmp on S1 controler. - old forum post

phhenning@gmail.com

Joined on 12-03-2007
Posts 1
Setup snmp on S1 controler

Hi,

Ive got a S-Series controller controlling two EB1 controllers that are daisy chaned. The control works fina and is configured in controll basic. I hovever need to send an snmp alarm trap to a PC on the LAN.

1 . How do I confugure the controller from project basic to sent a trap to a given IP.

  1. Can somone help me interface to a Java API.
    basic logon & shut dowm / start up commands

    Report
    12-04-2007, 3:03 PM
    rhernandez

Joined on 11-26-2003
Madrid - SPAIN
Posts 42
Re: Setup snmp on S1 controler

Hello phhenning,
A couple of years ago I answered a similar question, please take a look:
https://www.opto22.com/forums/forums/791/ShowPost.aspx
I will re-write it to fit your needs:
Configure SNMP: Use the Inspect tool of PACManager, type the PAC’s IP address into the device name field and click on Communications->SNMP.
Locate the “public” community and enable Traps for it.
Then scroll down till you see the host 0 entry, configure its community to “public” and type in the IP address of the target computer for SNMP traps.
Don’t forget to press the [Apply] button
Store config into flash and re-start unit. Again, using PACManager, you must save SNMP config into flash and re-start unit in orther to be able to send SNMP Traps for the 1st time:
Click on the Status Write button,
Select the Operation command “Store configuration to flash” and click on [Send Command]
Then, select the Operation command “Restart device from powerup” and click on [Send Command].
A previous test. Loosing a little time testing a trap will prove we are in the right path. You need a tool on the target machine to listen and display received SNMP traps. I believe you already have one otherwise you wouldn’t be posting this question, if you don’t have one you can use a tool like SNMP Trap Watcher
In the same inspect tool of PACManager, click on Envents->Event messages. The configuration window for Event Message #0 will be displayed (you can have up to 128 static messages).
Type a sample message,
Set the parameter “Enable SNMP Trap” to enabled
Change the state of the message to active and inactive alternatively (clicking on [Apply] upon each change). Each time the state of the message moves from inactive to active a trap will be send.
Finally, translate the test into PACControl code. Now we can perform the same operation within a strategy. PACControl provides us with two useful functions: Set I/O Unit Event Message Text and Set I/O Unit Event Message State. Theese functions will allow you to send SNMP messages when needed. One thing is still missing, though: When you use the two functions above you have no control on whether SNMP trap is enabled or not for the message, this also holds for the rest of event-message-configuration parameters. You can write down the memory-map address of each interesting parameter (enable SNMP trap of event message #0 is at address 0xF1200024) and use a 3rd function Write Number to I/O Unit Memory Map.

One note about functions related to I/O Unit. All theese functions require you to have the unit declared under the I/O Units folder. It is possible to declare the PAC-S* as a self-slave I/O unit: use type “Generic OptoMMP device” and 127.0.0.1 as IP address. The controller running the strategy will “talk to himself” whenever you use one of the above functions.
About the Java API interface, I don’t quite understand what exactly you want to do within Java. Starting and stopping a strategy? I suggest you to open a new thread giving more details of your needs. If you want to “talk” to controllers using Java you can download the OptoControl SDK. The information was provided for FactoryFloor controllers but (with the exception of what it is called hostwords) 99% still applies to PAC controllers. Withing the pack you can find a document that will provide you some useful clues of what can be done from Java: 1151_Opto_Controller_Comm_Overview.pdf.