NML Cryogenic control system with OPC

( Last updated: Wed Nov 17 14:45:43 2010 By J. You )

Fault Recovery Procedure

Here are four diagnostic ACNET devices that can be used to check if NMLOPC is healthy. They are available on H55/1.

Sample Dabbel templates for ACNET device setup

Here are some sample dabbel templates for adding/updating ACNET devices.
Please note: OAC is required to re-start for the change to take affect.

Device that returns float value
!
ADD N:NCRR1  ( "Read Real block1 status ", NMLOPC,         , 01FFFFFE, 0 )
SSDNHX READNG (0032/0000/0000/0000)
PRO READNG ( 4, 4, 60)
PDB READNG ( "STS ", "STS ", 16, 4, 4, 0, 0, 0, 0, 1)
FMAP READNG ( "APACS",
  "NML1.|READ_REALA|", "Float", 0, 1)
!

Device that has both reading and setting properties
!
ADD N:NHTSP  ( "NR Dewar HeatEr LOOP SET", NMLOPC,         , 01FFFFFE, 0 )
SSDNHX READNG (0032/0000/0000/0000)
PRO READNG ( 4, 4, 60)
PDB READNG ( "%FUL", "%FUL", 16, 4, 4, 0, 0, 0, 0, 1)
FMAP READNG ( "APACS",
  "NML1.HEX_N.VALVES.LLDEWH_SP", "Float", 0, 1)
SSDNHX SETTNG (0032/0000/0000/0000)
PRO SETTNG ( 4, 4, 60, 00, 00, A8, 41)
PDB SETTNG ( "%FUL", "%FUL", 16, 0, 4, 0, 1, 0)
FMAP SETTNG ( "APACS",
  "NML1.HEX_N.VALVES.LLDEWH_SP", "Float", 0, 1)
!

Device that is alarmable
!
ADD N:C2LLHD ( "SCRH LIQUID LEVEL PROBE ", NMLOPC,         , 01FFFFFE,
            "TvFrig" )
SSDNHX ANALBL (0032/0000/0000/0000)
PRO ANALBL ( 2, 20, 60, 00000000, 42DC0000, 2, 4, 1, 1,
             0, 0, 0, 0, 10, 0, 0)
PRO ANALTX ( 0, 0, 0, 0, " ")
SSDNHX READNG (0032/0000/0000/0000)
PRO READNG ( 4, 4, 60)
PDB READNG ( "%FUL", "%FUL", 16, 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0)
FMAP READNG ( "APACS",
  "NML1.|C2_LT_LLHD|", "Float", 0, 1)
!

Device that returns integer
!
ADD N:NMLUPT ( "NMLOPC Uptime           ", NMLOPC,         , 01FFFFFE, 0 )
SSDNHX READNG (0032/0000/0000/0000)
PRO READNG ( 4, 4, 60)
PDB READNG ( "Min ", "Min ", 10, 4, 4, 0, 1, 0, 0, 1)
FMAP READNG ( "APACS",
  "NML1.|UPTIME|", "Integer", 0, 1)
!

Technical Overview

The NML cryogenic control system uses OPC client-server architecture. APACS OPC server runs on nml-cryo5. And the OPC client is implemented as OAC (NMLOPC) running inside DAE of the accelerator control system.

The client makes use of three open-source java libraries.

The NMLOPC has built in re-try logic to recover from issues like network disruption or APACS server not available. It will try to reconnect to APACS server for a maximum of 3 times. If it still fails to establish the communication, it will trigger an OAC restart process. Notification email is sent for each re-try.

APACS OPC Server configuration

OPC/DCOM configuration for APACS is described here and some DCOM configuration specifically for XP SP2 can be found here.

Other configurations might be needed:

No specical software or account is needed for OAC.

NMLOPC OAC configuration

NMLOPC runs on DCE45. Parameters needed for OPC OAC is stored in database table opc_acl. Here are the table schema and sample data.

use appdb
go

create table opc_acl (
    oac_name        varchar (100) not null,
    opc_server_name varchar (100) not null,
    username        varchar (50)  not null,
    password        varchar (200) not null,
    prog_id         varchar (100) not null,
    phrase          varchar (50)  not null,
    alert_emails    varchar (200)     null,
    active_flag     bit           not null
)
go

delete from opc_acl where oac_name = 'nmlopc'

insert into opc_acl (oac_name, opc_server_name,
username, password, prog_id, phrase, active_flag, heartbeat_tag, update_freq_in_hz,
acnet_control_device, alert_emails)
values ('nmlopc', 'nml-cryo5.fnal.gov', 'serviceAccount', 'EncryptedPassword',
'apacs', 'phrase description', 1, 'NML1.|UPTIME|', '15', 'N:NMLCTL', 'youj@fnal.gov')
go

Other debugging information

/usr/sbin/lsof -u console | grep java | egrep 'pipe|eventpoll' | wc # about 58 at startup.

Security, Privacy, Legal