DUTs
GVLs
GVL_COM
//{attribute 'qualified_only'}
VAR_GLOBAL
// Define COM Ports/Buffers incl. library Tc2_SerialCom
SerialRXBuffer_CVMI_CATCH_PTM_01 : ComBuffer;
SerialTXBuffer_CVMI_CATCH_PTM_01 : ComBuffer;
SerialRXBuffer_CVMI_ROUGH_PTM_01 : ComBuffer;
SerialTXBuffer_CVMI_ROUGH_PTM_01 : ComBuffer;
SerialRXBuffer_CVMI_KTOF_PTM_01 : ComBuffer;
SerialTXBuffer_CVMI_KTOF_PTM_01 : ComBuffer;
// SerialRXBuffer_CVMI_KTOF_PTM_02 : ComBuffer;
// SerialTXBuffer_CVMI_KTOF_PTM_02 : ComBuffer;
// Serial Terminal
fbSerialLineControl_CVMI_CATCH_PTM_01: SerialLineControl;
fbSerialLineControl_CVMI_ROUGH_PTM_01: SerialLineControl;
fbSerialLineControl_CVMI_KTOF_PTM_01: SerialLineControl;
// fbSerialLineControl_CVMI_KTOF_PTM_02: SerialLineControl;
//SERIAL IO
{attribute 'TcLinkTo' := '.Status:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Status;
.D[0]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 0;
.D[1]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 1;
.D[2]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 2;
.D[3]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 3;
.D[4]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 4;
.D[5]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 5;
.D[6]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 6;
.D[7]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 7;
.D[8]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 8;
.D[9]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 9;
.D[10]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 10;
.D[11]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 11;
.D[12]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 12;
.D[13]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 13;
.D[14]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 14;
.D[15]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 15;
.D[16]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 16;
.D[17]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 17;
.D[18]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 18;
.D[19]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 19;
.D[20]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 20;
.D[21]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 21
'}
stComIn_CVMI_CATCH_PTM_01 AT %I* : EL6inData22B;
{attribute 'TcLinkTo' := '.Ctrl:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Ctrl;
.D[0]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 0;
.D[1]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 1;
.D[2]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 2;
.D[3]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 3;
.D[4]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 4;
.D[5]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 5;
.D[6]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 6;
.D[7]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 7;
.D[8]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 8;
.D[9]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 9;
.D[10]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 10;
.D[11]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 11;
.D[12]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 12;
.D[13]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 13;
.D[14]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 14;
.D[15]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 15;
.D[16]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 16;
.D[17]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 17;
.D[18]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 18;
.D[19]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 19;
.D[20]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 20;
.D[21]:=TIIB[CVMI_PNL1_EP06_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 21
'}
stComOut_CVMI_CATCH_PTM_01 AT %Q* : EL6outData22B;
{attribute 'TcLinkTo' := '.Status:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Status;
.D[0]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 0;
.D[1]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 1;
.D[2]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 2;
.D[3]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 3;
.D[4]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 4;
.D[5]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 5;
.D[6]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 6;
.D[7]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 7;
.D[8]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 8;
.D[9]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 9;
.D[10]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 10;
.D[11]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 11;
.D[12]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 12;
.D[13]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 13;
.D[14]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 14;
.D[15]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 15;
.D[16]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 16;
.D[17]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 17;
.D[18]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 18;
.D[19]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 19;
.D[20]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 20;
.D[21]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 2^Data In 21
'}
stComIn_CVMI_ROUGH_PTM_01 AT %I* : EL6inData22B;
{attribute 'TcLinkTo' := '.Ctrl:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Ctrl;
.D[0]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 0;
.D[1]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 1;
.D[2]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 2;
.D[3]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 3;
.D[4]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 4;
.D[5]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 5;
.D[6]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 6;
.D[7]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 7;
.D[8]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 8;
.D[9]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 9;
.D[10]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 10;
.D[11]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 11;
.D[12]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 12;
.D[13]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 13;
.D[14]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 14;
.D[15]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 15;
.D[16]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 16;
.D[17]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 17;
.D[18]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 18;
.D[19]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 19;
.D[20]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 20;
.D[21]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 2^Data Out 21
'}
stComOut_CVMI_ROUGH_PTM_01 AT %Q* : EL6outData22B;
(*
{attribute 'TcLinkTo' := '.Status:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Status;
.D[0]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 0;
.D[1]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 1;
.D[2]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 2;
.D[3]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 3;
.D[4]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 4;
.D[5]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 5;
.D[6]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 6;
.D[7]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 7;
.D[8]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 8;
.D[9]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 9;
.D[10]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 10;
.D[11]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 11;
.D[12]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 12;
.D[13]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 13;
.D[14]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 14;
.D[15]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 15;
.D[16]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 16;
.D[17]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 17;
.D[18]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 18;
.D[19]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 19;
.D[20]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 20;
.D[21]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 21
'}
stComIn_CVMI_KTOF_PTM_02 AT %I* : EL6inData22B;
{attribute 'TcLinkTo' := '.Ctrl:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Ctrl;
.D[0]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 0;
.D[1]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 1;
.D[2]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 2;
.D[3]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 3;
.D[4]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 4;
.D[5]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 5;
.D[6]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 6;
.D[7]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 7;
.D[8]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 8;
.D[9]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 9;
.D[10]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 10;
.D[11]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 11;
.D[12]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 12;
.D[13]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 13;
.D[14]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 14;
.D[15]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 15;
.D[16]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 16;
.D[17]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 17;
.D[18]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 18;
.D[19]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 19;
.D[20]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 20;
.D[21]:=TIIB[KTOF_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 21
'}
stComOut_CVMI_KTOF_PTM_02 AT %Q* : EL6outData22B;
*)
{attribute 'TcLinkTo' := '.Status:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Status;
.D[0]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 0;
.D[1]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 1;
.D[2]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 2;
.D[3]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 3;
.D[4]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 4;
.D[5]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 5;
.D[6]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 6;
.D[7]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 7;
.D[8]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 8;
.D[9]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 9;
.D[10]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 10;
.D[11]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 11;
.D[12]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 12;
.D[13]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 13;
.D[14]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 14;
.D[15]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 15;
.D[16]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 16;
.D[17]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 17;
.D[18]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 18;
.D[19]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 19;
.D[20]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 20;
.D[21]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM TxPDO-Map Inputs Channel 1^Data In 21
'}
stComIn_CVMI_KTOF_PTM_01 AT %I* : EL6inData22B;
{attribute 'TcLinkTo' := '.Ctrl:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Ctrl;
.D[0]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 0;
.D[1]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 1;
.D[2]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 2;
.D[3]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 3;
.D[4]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 4;
.D[5]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 5;
.D[6]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 6;
.D[7]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 7;
.D[8]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 8;
.D[9]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 9;
.D[10]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 10;
.D[11]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 11;
.D[12]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 12;
.D[13]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 13;
.D[14]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 14;
.D[15]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 15;
.D[16]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 16;
.D[17]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 17;
.D[18]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 18;
.D[19]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 19;
.D[20]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 20;
.D[21]:=TIIB[CVMI_PNL1_EP03_EP6002-0002]^COM RxPDO-Map Outputs Channel 1^Data Out 21
'}
stComOut_CVMI_KTOF_PTM_01 AT %Q* : EL6outData22B;
END_VAR
GVL_Devices
//{attribute 'qualified_only'}
VAR_GLOBAL
(*Rack Mounted Turbo Pumps*)
{attribute 'TcLinkTo' := '.i_xR1 := TIIB[CVMI_PLC_E06_EL1088]^Channel 1^Input;
.i_xLSpd := TIIB[CVMI_PLC_E06_EL1088]^Channel 2^Input;
.i_xSTART := TIIB[CVMI_PLC_E06_EL1088]^Channel 3^Input;
.i_xFault := TIIB[CVMI_PLC_E06_EL1088]^Channel 4^Input;
.q_RunDO := TIIB[CVMI_PLC_E07_EL2088]^Channel 1^Output;
.q_xLSpd := TIIB[CVMI_PLC_E07_EL2088]^Channel 2^Output;
.i_iCurrentMon := TIIB[CVMI_PLC_E08_EL3064]^AI Standard Channel 1^Value;
.i_iRawSpeed := TIIB[CVMI_PLC_E08_EL3064]^AI Standard Channel 2^Value
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:PTM:01
io: io
'}
CVMI_GJ_PTM_01 : FB_PTM_Agilent;
{attribute 'TcLinkTo' := '.i_xR1 := TIIB[CVMI_PLC_E06_EL1088]^Channel 5^Input;
.i_xLSpd := TIIB[CVMI_PLC_E06_EL1088]^Channel 6^Input;
.i_xSTART := TIIB[CVMI_PLC_E06_EL1088]^Channel 7^Input;
.i_xFault := TIIB[CVMI_PLC_E06_EL1088]^Channel 8^Input;
.q_RunDO := TIIB[CVMI_PLC_E07_EL2088]^Channel 7^Output;
.q_xLSpd := TIIB[CVMI_PLC_E07_EL2088]^Channel 8^Output;
.i_iCurrentMon := TIIB[CVMI_PLC_E08_EL3064]^AI Standard Channel 3^Value;
.i_iRawSpeed := TIIB[CVMI_PLC_E08_EL3064]^AI Standard Channel 4^Value
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:PTM:02
io: io
'}
CVMI_GJ_PTM_02 : FB_PTM_Agilent;
{attribute 'TcLinkTo' := '.i_xR1 := TIIB[CVMI_PLC_E09_EL1088]^Channel 1^Input;
.i_xLSpd := TIIB[CVMI_PLC_E09_EL1088]^Channel 2^Input;
.i_xSTART := TIIB[CVMI_PLC_E09_EL1088]^Channel 3^Input;
.i_xFault := TIIB[CVMI_PLC_E09_EL1088]^Channel 4^Input;
.q_RunDO := TIIB[CVMI_PLC_E10_EL2088]^Channel 1^Output;
.q_xLSpd := TIIB[CVMI_PLC_E10_EL2088]^Channel 2^Output;
.i_iCurrentMon := TIIB[CVMI_PLC_E11_EL3064]^AI Standard Channel 1^Value;
.i_iRawSpeed := TIIB[CVMI_PLC_E11_EL3064]^AI Standard Channel 2^Value
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:PTM:03
io: io
'}
CVMI_GJ_PTM_03 : FB_PTM_Agilent;
{attribute 'TcLinkTo' := '.i_xR1 := TIIB[CVMI_PLC_E09_EL1088]^Channel 5^Input;
.i_xLSpd := TIIB[CVMI_PLC_E09_EL1088]^Channel 6^Input;
.i_xSTART := TIIB[CVMI_PLC_E09_EL1088]^Channel 7^Input;
.i_xFault := TIIB[CVMI_PLC_E09_EL1088]^Channel 8^Input;
.q_RunDO := TIIB[CVMI_PLC_E10_EL2088]^Channel 7^Output;
.q_xLSpd := TIIB[CVMI_PLC_E10_EL2088]^Channel 8^Output;
.i_iCurrentMon := TIIB[CVMI_PLC_E11_EL3064]^AI Standard Channel 3^Value;
.i_iRawSpeed := TIIB[CVMI_PLC_E11_EL3064]^AI Standard Channel 4^Value
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:PTM:04
io: io
'}
CVMI_GJ_PTM_04 : FB_PTM_Agilent;
{attribute 'TcLinkTo' := '.i_xR1 := TIIB[CVMI_PLC_E12_EL1088]^Channel 1^Input;
.i_xLSpd := TIIB[CVMI_PLC_E12_EL1088]^Channel 2^Input;
.i_xSTART := TIIB[CVMI_PLC_E12_EL1088]^Channel 3^Input;
.i_xFault := TIIB[CVMI_PLC_E12_EL1088]^Channel 4^Input;
.q_RunDO := TIIB[CVMI_PLC_E10_EL2088]^Channel 3^Output;
.q_xLSpd := TIIB[CVMI_PLC_E10_EL2088]^Channel 4^Output;
.i_iCurrentMon := TIIB[CVMI_PLC_E14_EL3064]^AI Standard Channel 1^Value;
.i_iRawSpeed := TIIB[CVMI_PLC_E14_EL3064]^AI Standard Channel 2^Value
'}
{attribute 'pytmc' := '
pv: CVMI:MAIN:PTM:01
io: io
'}
CVMI_MAIN_PTM_01 : FB_PTM_Agilent_NoFeedback;
(*Onboard Turbo Pumps*)
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[CVMI_PNL1_EP04_EP2338-0002]^Channel 1^Input;
.i_xFaultNC := TIIB[CVMI_PNL1_EP04_EP2338-0002]^Channel 2^Input;
.q_RunDO := TIIB[CVMI_PNL1_EP05_EP2624-0002]^Channel 1^Output;
.q_xReset := TIIB[CVMI_PNL1_EP05_EP2624-0002]^Channel 2^Output
'}
{attribute 'pytmc' := '
pv: CVMI:CATCH:PTM:01
io: io
'}
CVMI_CATCH_PTM_01 : FB_PTM_Pfeiffer;
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 5^Input;
.i_xFaultNC := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 6^Input;
.i_xRemote := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 7^Input;
.q_RunDO := TIIB[CVMI_PNL1_EP02_EP2624-0002]^Channel 3^Output;
.q_xReset := TIIB[CVMI_PNL1_EP02_EP2624-0002]^Channel 4^Output
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:PTM:01
io: io
'}
CVMI_ROUGH_PTM_01 : FB_PTM_Pfeiffer;
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 1^Input;
.i_xFaultNC := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 2^Input;
.i_xRemote := TIIB[CVMI_PNL1_EP01_EP2338-0002]^Channel 3^Input;
.q_RunDO := TIIB[CVMI_PNL1_EP02_EP2624-0002]^Channel 1^Output;
.q_xReset := TIIB[CVMI_PNL1_EP02_EP2624-0002]^Channel 2^Output
'}
{attribute 'pytmc' := '
pv: CVMI:KTOF:PTM:01
io: io
'}
CVMI_KTOF_PTM_01 : FB_PTM_Pfeiffer;
(*KTOF Turbo Pump*)
(* //Not Installed
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[KTOF_PNL1_EP01_EP2338-0002]^Channel 1^Input;
.i_xFaultNC := TIIB[KTOF_PNL1_EP01_EP2338-0002]^Channel 2^Input;
.i_xRemote := TIIB[KTOF_PNL1_EP01_EP2338-0002]^Channel 3^Input;
.q_RunDO := TIIB[KTOF_PNL1_EP02_EP2624-0002]^Channel 1^Output;
.q_xReset := TIIB[KTOF_PNL1_EP02_EP2624-0002]^Channel 2^Output
'}
{attribute 'pytmc' := '
pv: CVMI:KTOF:PTM:01
io: io
'}
CVMI_KTOF_PTM_01 : FB_PTM_Pfeiffer;
*)
(*Pirani MKS 275 Gauges*)
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP07_EP3174-0002]^AI Standard Channel 1^Value
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:GPI:01
io: io
'}
CVMI_GJ_GPI_01 : FB_972;
(* Not installed for LY-91
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP07_EP3174-0002]^AI Standard Channel 2^Value
'}
{attribute 'pytmc' := '
pv: CVMI:CATCH:GPI:01
io: io
'}
CVMI_CATCH_GPI_01 : FB_MKS275;
*)
(*MicroPirani MKS 925 Gauges*)
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP08_EP3174-0002]^AI Standard Channel 1^Value
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:GPI:01
io: io
'}
CVMI_ROUGH_GPI_01 : FB_9XX;
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP08_EP3174-0002]^AI Standard Channel 2^Value
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:GPI:02
io: io
'}
CVMI_ROUGH_GPI_02 : FB_9XX;
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP08_EP3174-0002]^AI Standard Channel 3^Value
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:GPI:03
io: io
'}
CVMI_ROUGH_GPI_03 : FB_9XX;
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP08_EP3174-0002]^AI Standard Channel 4^Value
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:GPI:04
io: io
'}
CVMI_ROUGH_GPI_04 : FB_9XX;
(*Cold Cathode MKS 500 Gauges*)
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP09_EP3174-0002]^AI Standard Channel 1^Value;
.q_xHV_DIS := TIIB[CVMI_PNL1_EP10_EP2624-0002]^Channel 1^Output
'}
{attribute 'pytmc' := '
pv: CVMI:GJ:GCC:01
io: io
'}
CVMI_GJ_GCC_01 : FB_MKS500;
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP09_EP3174-0002]^AI Standard Channel 2^Value;
.q_xHV_DIS := TIIB[CVMI_PNL1_EP10_EP2624-0002]^Channel 2^Output
'}
{attribute 'pytmc' := '
pv: CVMI:CATCH:GCC:01
io: io
'}
CVMI_CATCH_GCC_01 : FB_MKS500;
(*Hot Cathode MKS 909 Gauges*)
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP09_EP3174-0002]^AI Standard Channel 3^Value;
.q_xHV_DIS := TIIB[CVMI_PNL1_EP10_EP2624-0002]^Channel 3^Output
'}
{attribute 'pytmc' := '
pv: CVMI:MAIN:GHC:01
io: io
'}
CVMI_MAIN_GHC_01 : FB_MKS909;
(*
// Not installed currently
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[CVMI_PNL1_EP09_EP3174-0002]^AI Standard Channel 4^Value;
.q_xHV_DIS := TIIB[CVMI_PNL1_EP10_EP2624-0002]^Channel 4^Output
'}
{attribute 'pytmc' := '
pv: KTOF:GHC:01
io: io
'}
KTOF_GHC_01 : FB_MKS909;
*)
(*Normally Closed Valve with Readback*)
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 1^Input;
.i_xClsLS := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 2^Input;
.q_xOPN_DO := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 11^Output
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:VRC:01
io: io
'}
CVMI_ROUGH_VRC_01 : FB_VRC;
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[CVMI_PNL1_EP12_EP2338-0002]^Channel 1^Input;
.i_xClsLS := TIIB[CVMI_PNL1_EP12_EP2338-0002]^Channel 2^Input;
.q_xOPN_DO := TIIB[CVMI_PNL1_EP12_EP2338-0002]^Channel 11^Output
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:VRC:03
io: io
'}
CVMI_ROUGH_VRC_03 : FB_VRC;
(*Normally Open Valve with Readback, It is actually NC because of Hardware delay*)
{attribute 'TcLinkTo' := '.i_xClsLS := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 5^Input;
.i_xOpnLS := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 6^Input;
.q_xCLS_DO := TIIB[CVMI_PNL1_EP11_EP2338-0002]^Channel 15^Output
'}
{attribute 'pytmc' := '
pv: CVMI:ROUGH:VRC:02
io: io
'}
CVMI_ROUGH_VRC_02 : FB_VRC_NO;
(*Pfeiffer*)
// They share the same serial port
st_Pfeiffer_CTRL_CVMI_CATCH_PTM_01 : ARRAY[1..20] OF ST_PfeifferControl;
st_Pfeiffer_RBK_CVMI_CATCH_PTM_01 : ARRAY[1..20] OF ST_PfeifferStatus;
fb_PfeifferCom_CVMI_CATCH_PTM_01 : FB_PFEIFFER_COM;
st_Pfeiffer_CTRL_CVMI_ROUGH_PTM_01 : ARRAY[1..20] OF ST_PfeifferControl;
st_Pfeiffer_RBK_CVMI_ROUGH_PTM_01 : ARRAY[1..20] OF ST_PfeifferStatus;
fb_PfeifferCom_CVMI_ROUGH_PTM_01 : FB_PFEIFFER_COM;
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_01 : ARRAY[1..20] OF ST_PfeifferControl;
st_Pfeiffer_RBK_CVMI_KTOF_PTM_01 : ARRAY[1..20] OF ST_PfeifferStatus;
fb_PfeifferCom_CVMI_KTOF_PTM_01 : FB_PFEIFFER_COM;
(*
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_02 : ARRAY[1..20] OF ST_PfeifferControl;
st_Pfeiffer_RBK_CVMI_KTOF_PTM_02 : ARRAY[1..20] OF ST_PfeifferStatus;
fb_PfeifferCom_CVMI_KTOF_PTM_02 : FB_PFEIFFER_COM;
*)
(*Varian/Agilent serial goes through Moxa serial ports*)
END_VAR
- Related:
GVL_PLC_Interfaces
//{attribute 'qualified_only'}
VAR_GLOBAL
(*TMO Beamline Vacuum*)
//Outputs
fb_ADS_WATCHDOG_VAC_CVMI_TMO:FB_ADS_WATCHDOG;
(*ETHERCAT BRIDGE COM STATUS*)
//0: Other side is in OP state, >0: Error
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^SYNC Inputs^TxPDO state
'}
xEcatBridge_TxPDO_state AT %I* : BOOL;
//0: External device connected, 1: External device not connected
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^SYNC Inputs^External device not connected
'}
xEcatBridge_External_device_not_connected AT %I* : BOOL;
//0 = Data valid, 1 = Data invalid
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^WcState^WcState
'}
xEcatBridge_WcState AT %I* : BOOL;
(*I/O Inputs from TMO Beamline*)
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Inputs^HUTCH_PLC_NAME
'}
sHUTCH_PLC_NAME AT %I* : STRING(8);
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Inputs^TMO_ROUGH1_VRC_01_OPEN_LS
'}
xTMO_ROUGH1_VRC_01_OPEN_LS AT %I* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Inputs^TMO_ROUGH2_VRC_01_OPEN_LS
'}
xTMO_ROUGH2_VRC_01_OPEN_LS AT %I* : BOOL;
(*I/O Outputs to TMO Beamline*)
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^ENDSTATION_PLC_NAME
'}
sENDSTATION_PLC_NAME AT %Q* : STRING(8):= 'CVMI';
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_ROUGH_VRC_01_OPEN_LS
'}
xIP1_ROUGH_VRC_01_OPEN_LS AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_ROUGH_VRC_02_OPEN_LS
'}
xIP1_ROUGH_VRC_02_OPEN_LS AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_ROUGH_VRC_03_OPEN_LS
'}
xIP1_ROUGH_VRC_03_OPEN_LS AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_TURBOS_ALL_AtSpd
'}
{attribute 'pytmc' := '
pv: TMO:PLC:CVMI:VAC:IP1_TURBOS_ALL_ATSPD
io:i
'}
xIP1_TURBOS_ALL_AtSpd AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_MAIN_xAT_VAC
'}
xIP1_MAIN_xAT_VAC AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_MAIN_xPRESS_OK
'}
xIP1_MAIN_xPRESS_OK AT %Q* : BOOL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_MAIN_rPRESS
'}
rIP1_MAIN_rPRESS AT %Q* : REAL;
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E04_EL6692]^IO Outputs^IP1_HV_SAFETY_ENABLE
'}
xIP1_HV_SAFETY_ENABLE AT %Q* : BOOL;
(*ISEG HV Crate Safety Loop*)
{attribute 'TcLinkTo' := 'TIIB[CVMI_PLC_E13_EL2794]^Channel 4^Output
'}
{attribute 'pytmc' := '
pv: TMO:PLC:CVMI:VAC:HV_SAFETY_ENABLE
io:i
'}
xHighVoltageSafteyLoopEnable AT %Q* : BOOL := FALSE; (*When Enables the High voltage Saftey loop is closed and HV can start.*)
END_VAR
GVL_Variables
//{attribute 'qualified_only'}
VAR_GLOBAL
{attribute 'pytmc' := '
pv: TMO:PLC:CVMI:VAC:OVRDON
io: io
'}
xSystemOverrideMode_CVMI : BOOL := FALSE; (* Global system override for the HXR Vacuum System EBD*)
{attribute 'pytmc' := '
pv: TMO:PLC:CVMI:ON:BEAMLINE
io:i
'}
xOnBeamline : BOOL := TRUE; (*Always assume On Beamline for safety checks*)
rHighVoltageMinPressure : REAL := 1e-05; (*Hard coded High voltage Minimum Enable Pressure*)
END_VAR
POUs
DIAGNOSTICS
PROGRAM DIAGNOSTICS
VAR
//Change the PLC String Name to the actual PLC NAME
sPLCName :STRING := 'PLC-CVMI-VAC';
//Link the sAMSNetID to the Etherat Master netID
i_sAMSNetID AT %I*: AMSNETID;
// DO NOT CHANGE
sAMSNetID : STRING; //used for EPICS PV
sLibVersion_LCLS_General : STRING;(* := stLibVersion_LCLS_General.sVersion*) ;
fbEcatDiag:FB_EcatDiag;
bAllSlaveStateGood : BOOL;
bMasterStateGood :BOOL;
iMasterState: WORD;
sMasterState:STRING;
nSlaveNumber : UINT;
aiSlaveStates: ARRAY[1..256] OF BYTE;
aEcSlaveInfo : ARRAY[1..256] OF ST_EcDevice;
END_VAR
// Instaniating a call to the fbEcatDiag
fbEcatDiag(
I_AMSNetId:=i_sAMSNetID ,
i_xFirstPass:= _TaskInfo[1].FirstCycle,
q_xAllSlaveStatesGood=> bAllSlaveStateGood ,
q_anTermStates=> aiSlaveStates,
q_xMasterStateGood=>bMasterStateGood ,
q_nMasterState=> iMasterState,
q_sMasterState=> sMasterState ,
q_astEcConfSlaveInfo=> aEcSlaveInfo ,
q_nSlaves=> nSlaveNumber);
END_PROGRAM
F_Turbo_NC_NO_Valve_Logic
FUNCTION F_Turbo_NC_NO_Valve_Logic : BOOL
VAR_INPUT
i_stTurbo : ST_PTM; // Turbo Pump
i_stISG : ST_VG; //Gauge measuring inlet Pressure e.g Pirani
i_stBSG : ST_VG; //Gauge measureing backing pressure
iq_stValve_NO : ST_VRC_NO; //Normally Open Valve directly sharing turbo pump vaccum volume.
iq_stValve_NC : ST_VRC; //Normally Closed Valve directly sharing turbo pump vaccum volume.
iq_stValve_NC_second : ST_VRC; //Normally Open Valve on the other side of NO valve that also connects to roughing line.
ads_Error_Present : BOOL; // ADS Communication: Watchdog and ADS Read Error Bit
iq_stRoughRoughValve_NC: ST_VGC_2S; //Normally Closed Valve Downstream of iq_stValve_NC in Beamline Roughing Line.
iq_stRoughRoughValve_NC_second: ST_VGC_2S; //Normally Closed Valve Downstream of iq_stValve_NC_second in Beamline Roughing Line.
x_onBeamline : BOOL; //Whether the Turbopump/Endstation is mounted on the beamline or not.
END_VAR
VAR
END_VAR
IF (x_onBeamline) THEN
F_Turbo_NC_NO_Valve_Logic := (i_stISG.xPRESS_OK AND i_stISG.rPRESS < i_stTurbo.rInletPressureSP) AND
(i_stBSG.xPRESS_OK AND i_stBSG.rPRESS < i_stTurbo.rBackingPressureSP) AND
((iq_stValve_NC.i_xOpnLS AND iq_stRoughRoughValve_NC.eState = E_ValvePositionState.OPEN) OR
(iq_stValve_NO.i_xOpnLS AND (iq_stValve_NC_second.i_xOpnLS AND
iq_stRoughRoughValve_NC_second.eState = E_ValvePositionState.OPEN)))AND (NOT ads_Error_Present);
ELSE
F_Turbo_NC_NO_Valve_Logic := (i_stISG.xPRESS_OK AND i_stISG.rPRESS < i_stTurbo.rInletPressureSP) AND
(i_stBSG.xPRESS_OK AND i_stBSG.rPRESS < i_stTurbo.rBackingPressureSP) AND
(iq_stValve_NC.i_xOpnLS OR(iq_stValve_NO.i_xOpnLS AND iq_stValve_NC_second.i_xOpnLS));
END_IF
END_FUNCTION
F_Turbo_NC_NO_Valve_Logic_NC
FUNCTION F_Turbo_NC_NO_Valve_Logic_NC : BOOL
VAR_INPUT
i_stTurbo : ST_PTM; // Turbo Pump
i_stISG : ST_VG; //Gauge measuring inlet Pressure e.g Pirani
i_stBSG : ST_VG; //Gauge measureing backing pressure
iq_stValve_NO : ST_VRC_NO; //Normally Open Valve directly sharing turbo pump vaccum volume.
iq_stValve_NC : ST_VRC; //Normally Closed Valve directly sharing turbo pump vaccum volume.
iq_stValve_NC_second : ST_VRC; //Normally Open Valve on the other side of NO valve that also connects to roughing line.
EcatBridge_Error_Present : BOOL; // ADS Communication: Watchdog and ADS Read Error Bit
iq_stRoughRoughValve_NC_xOpnLS: BOOL; //Normally Closed Valve Downstream of iq_stValve_NC in Beamline Roughing Line, Open Limit Switch.
iq_stRoughRoughValve_NC_second_xOpenLS: BOOL; //Normally Closed Valve Downstream of iq_stValve_NC_second in Beamline Roughing Line, Open Limit Switch.
x_onBeamline : BOOL; //Whether the Turbopump/Endstation is mounted on the beamline or not.
END_VAR
VAR
END_VAR
IF (x_onBeamline) THEN
F_Turbo_NC_NO_Valve_Logic_NC := (i_stISG.xPRESS_OK AND i_stISG.rPRESS < i_stTurbo.rInletPressureSP) AND
(i_stBSG.xPRESS_OK AND i_stBSG.rPRESS < i_stTurbo.rBackingPressureSP) AND
((iq_stValve_NC.i_xOpnLS AND iq_stRoughRoughValve_NC_xOpnLS) OR
(iq_stValve_NO.i_xOpnLS AND (iq_stValve_NC_second.i_xOpnLS AND
iq_stRoughRoughValve_NC_second_xOpenLS)))AND (NOT EcatBridge_Error_Present);
ELSE
F_Turbo_NC_NO_Valve_Logic_NC := (i_stISG.xPRESS_OK AND i_stISG.rPRESS < i_stTurbo.rInletPressureSP) AND
(i_stBSG.xPRESS_OK AND i_stBSG.rPRESS < i_stTurbo.rBackingPressureSP) AND
(iq_stValve_NC.i_xOpnLS OR(iq_stValve_NO.i_xOpnLS AND iq_stValve_NC_second.i_xOpnLS));
END_IF
END_FUNCTION
FB_PTM_Agilent_NoFeedback
FUNCTION_BLOCK FB_PTM_Agilent_NoFeedback EXTENDS FB_Pump
VAR_INPUT
i_xExtILKOk : BOOL; // Connect to external interlock logic(e.g TURBO_ILK Function), TRUE if not used.
i_stGauge : ST_VG; //Pirani backing gauge for pump interlock
i_rMaxBackingPressure : REAL;
END_VAR
VAR_OUTPUT
{attribute 'pytmc' :=' pv:'}
iq_stPtm : ST_AgilentPTM;
END_VAR
VAR
{attribute 'instance-path'}
{attribute 'noinit'}
sPath: STRING;
//xRunOk : BOOL;
nMaxR1Fault: INT :=5;
nR1Fault : INT;
tFaultWindowDuration : TIME := T#300S;
tR1FaultDuration : TIME := T#120S;
tTimeOutDuration: TIME:= T#10M;
tFaultWindowElapsed: TON;
tR1Fault : TON;
tStartTimeOut : TON;
tR1TimeOut: TON;
step : INT :=0;
nErrorCode: INT :=0;
xBackingPressureOK: BOOL;
iMaxSpeed : INT:=963;
rPowerScale: REAL:=10;//W
rCurrentScale: REAL:=1;//A
(*I/Os*)
i_xSTART AT%I*: BOOL;
i_xR1 AT%I* : BOOL;
i_xR2 AT%I* : BOOL;
i_xLSpd AT%I*: BOOL;
i_iTempMon AT%I*: INT;
i_iPowerMon AT%I*: INT;
i_iCurrentMon AT%I*: INT;
i_iRawSpeed AT %I* : INT;
i_xFault AT%I* : BOOL;
q_RunDO AT%Q* : BOOL;
q_xLSpd AT%Q* : BOOL;
// For logging
// Msg : FB_FormatString;
// fbJson : FB_JsonSaxWriter;
tOverrideActivated : R_TRIG;
iTermBits: UINT := 32767 ; // The terminal's maximum value in bits
END_VAR
(* Basic Agilent Turbo Controls *)
(* Allen Pai, 2021-02-02 *)
(*FB_Input Link ingto Data Structure*)
iq_stPtm.xExtRunOk := i_xExtILKOk;
(*Validate Backing Pressure set point doesn't exceed the Maximum backingPressure*)
iq_stPtm.rBackingPressureSP := BackingPressureSetPoint(iq_stPtm.rBackingPressureSP,i_rMaxBackingPressure);
(* state machine *)
CASE (step) OF
(*Pump Stopped State*)
0: // Pump Stopped State
iq_stPtm.xRunSW:=FALSE;
//Reset Output signals;
iq_stPtm.q_RunDO:=FALSE;
iq_stPtm.q_xSS := FALSE;
iq_stPtm.q_xLSpd:= FALSE;
iq_stPtm.eState := pumpSTOPPED;
step:=10;
(*Idle State waiting to start*)
10: // Idle State, waiting for the xRunSwitch
IF iq_stPtm.xExtRunOk AND iq_stPTM.xRunSW THEN
iq_stPtm.q_RunDO := iq_stPTM.xRunSW; //
step:=20;
END_IF
(*Pump On State*)
20: // Pump is On
iq_stPtm.q_RunDO := iq_stPTM.xRunSW; // done in previous state
//If External Interlock is false or Operator has stopped pump, turn off pump
IF (iq_stPtm.xExtRunOk= FALSE) OR (iq_stPTM.xRunSW = FALSE) THEN
step:= 0;
ELSE
step:=20;
END_IF
END_CASE
(*Check backing gauge pressure*)
//xBackingPressureOK := i_stGauge.xPRESS_OK AND ( i_stGauge.rPRESS < iq_stPtm.rBackingPressureSP);
(* IO Mapping*)
IO();
(*Assign Error Message*)
//iq_stPtm.sError := ErrorMessage(nErrorCode, iq_stPtm.eState);
// Log States and triggers
//ACT_Logger();
ACT_Interlock();
END_FUNCTION_BLOCK
ACTION ACT_Interlock:
This^.tILK(IN:= (i_stGauge.rPRESS>=iq_stPtm.rBackingPressureSP), PT:=T#5S, Q=> );
END_ACTION
ACTION IO:
(*inputs*)
iq_stPtm.i_xSTART:= i_xSTART;
iq_stPtm.i_xR1:= i_xR1;
iq_stPtm.i_xR2:= i_xR2;
iq_stPtm.i_xLSpd:= i_xLSpd;
iq_stPtm.i_xFault:= i_xFault;
(* Real-value calculation *)
If (iTermBits=0) THEN iTermBits := 32767;
END_IF
(*iq_stPtm.i_rCurrentMon := (10*(i_iCurrentMon)/iTermBits)*rCurrentScale;
iq_stPtm.i_rTempMon := 10*INT_TO_REAL(i_iTempMon)/iTermBits;
iq_stPtm.i_rPowerMon := (10*INT_TO_REAL(i_iPowerMon)/iTermBits)*rPowerScale;
iq_stPtm.i_diCurSpd := 10*LREAL_TO_DINT(INT_TO_REAL(i_iRawSpeed)/iTermBits);
*)
(*outputs*)
q_RunDO := iq_stPtm.q_RunDO;
q_xLSpd := iq_stPtm.q_xLSpd;
END_ACTION
METHOD BackingPressureSetPoint : REAL
VAR_INPUT
i_SetPoint : REAL;
rMaxBackingPressure: REAL;
END_VAR
BackingPressureSetPoint := Min(i_SetPoint , rMaxBackingPressure);
END_METHOD
MAIN
PROGRAM MAIN
VAR
fbLogHandler : FB_LogHandler;
//TMO Interface
xEcatBridge_COM_ERROR : BOOL;
ITF_TMO_ROUGH1_VRC_01: FB_TVGC_2S_ADS; //FB for accessing "TMO_ROUGH1_VRC_01" VGC_2S data from PLC-TMO-VAC
ITF_TMO_ROUGH2_VRC_01: FB_TVGC_2S_ADS; //FB for accessing "TMO_ROUGH2_VRC_01" VGC_2S data from PLC-TMO-VAC
i_iWatchdog : UDINT; // PLC-TMO-VAC will write to this Watchdog variable
b_TurboPumpRunningFlag : BOOL;
TurboPumpTOF : TOF;
TurboPumpDelayTime : TIME := T#30s;
fbGetCurTaskIndex : GETCURTASKINDEX;
END_VAR
fbLogHandler();
// Run the Diagnostics PRG
DIAGNOSTICS();
(*PLC-TMO-VAC ADS interface*)
(*//Writes watchdog bit to remote vac_TMO reading the vacuum components
fb_ADS_WATCHDOG_VAC_CVMI_TMO(
sNetId:= '172.21.132.22.1.1',
nPort:= 851,
sVarName:= 'PRG_ADS_Interfaces.i_iWatchdog',
bError=> );
ITF_TMO_ROUGH1_VRC_01(//Roughing valve Readback from IP1 Roughing Line
sNetId:= '172.21.132.22.1.1',
nPort:= 851,
sVarName:= 'GVL_Hutch_Valves.TMO_ROUGH1_VRC_01',
iWatchdog:= i_iWatchdog,
VGC=> ,
bError=> );
ITF_TMO_ROUGH2_VRC_01(//Roughing valve Readback from the Gas Jet Roughing Line
sNetId:= '172.21.132.22.1.1',
nPort:= 851,
sVarName:= 'GVL_Hutch_Valves.TMO_ROUGH2_VRC_01',
iWatchdog:= i_iWatchdog,
VGC=> ,
bError=> );
*)
(*EtherCAT Bridge Status*)
//xEcatBridge_COM_ERROR := TRUE means that there is an EtherCAT Bridge Communication error.
xEcatBridge_COM_ERROR := (xEcatBridge_TxPDO_state OR xEcatBridge_External_device_not_connected OR xEcatBridge_WcState);
xOnBeamline := (xEcatBridge_COM_ERROR = FALSE) AND (sHUTCH_PLC_NAME = 'TMO');
(*TurboPump running Flag with 30 second Turn Off delay.*)
b_TurboPumpRunningFlag :=
(CVMI_GJ_PTM_01.iq_stPtm.eState = E_PumpState.pumpRUNNING) AND
(CVMI_GJ_PTM_02.iq_stPtm.eState = E_PumpState.pumpRUNNING) AND
(CVMI_GJ_PTM_03.iq_stPtm.eState = E_PumpState.pumpRUNNING) AND
(CVMI_GJ_PTM_04.iq_stPtm.eState = E_PumpState.pumpRUNNING) AND
//(CVMI_MAIN_PTM_01.iq_stPtm.i_xAtSpd) AND There is currently no readback so Turbo pump state is not checked.
(CVMI_CATCH_PTM_01.iq_stPtm.i_xAtSpd) AND
(CVMI_KTOF_PTM_01.iq_stPtm.i_xAtSpd) AND
// (CVMI_KTOF_PTM_02.iq_stPtm.i_xAtSpd) AND Currently not installed
(CVMI_ROUGH_PTM_01.iq_stPtm.i_xAtSpd);
TurboPumpTOF(IN:= b_TurboPumpRunningFlag, PT := TurboPumpDelayTime);
xIP1_TURBOS_ALL_AtSpd:= TurboPumpTOF.Q;
(*High Voltage Saftey Loop*)// rHighVoltageMinPressure = 1e-05; (*Hard coded High voltage Minimum Enable Pressure*)
xHighVoltageSafteyLoopEnable:= (CVMI_CATCH_GCC_01.IG.rPRESS <= rHighVoltageMinPressure) AND (CVMI_CATCH_GCC_01.IG.xPRESS_OK = TRUE);
(*PIRANI Gauges*)
CVMI_GJ_GPI_01.M_SetBits(32767);
CVMI_GJ_GPI_01(PG=>);
// CVMI_CATCH_GPI_01.M_SetBits(32767);
// CVMI_CATCH_GPI_01(PG=>);
(*uPIRANI Gauges*)
CVMI_ROUGH_GPI_01.M_SetBits(32767);
CVMI_ROUGH_GPI_01(PG=>);
CVMI_ROUGH_GPI_02.M_SetBits(32767);
CVMI_ROUGH_GPI_02(PG=>);
CVMI_ROUGH_GPI_03.M_SetBits(32767);
CVMI_ROUGH_GPI_03(PG=>);
CVMI_ROUGH_GPI_04.M_SetBits(32767);
CVMI_ROUGH_GPI_04(PG=>);
(*Cold Cathode Gauges*)
CVMI_GJ_GCC_01.M_SetBits(32767);
CVMI_GJ_GCC_01(PG:=CVMI_GJ_GPI_01.PG,IG=>,bEP:=TRUE);
CVMI_CATCH_GCC_01.M_SetBits(32767);
CVMI_CATCH_GCC_01(PG:=CVMI_GJ_GPI_01.PG,IG=>,bEP:=TRUE);
(*Hot Cathode Gauges*)
CVMI_MAIN_GHC_01.M_SetBits(32767);
CVMI_MAIN_GHC_01(PG:=CVMI_GJ_GPI_01.PG,IG=>);
(*TURBO Pumps
*In general, if turbo pump setpoints are above the pirani guage readings or there is no downstream open path to a roughing pump, the turbo pump will close.
*
*)
CVMI_GJ_PTM_01(i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_GJ_PTM_01.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_04.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_03.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_01.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH2_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH1_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
i_stGauge:= CVMI_ROUGH_GPI_04.PG,
i_rMaxBackingPressure:= 1,
iq_stPtm=> );
CVMI_GJ_PTM_02(i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_GJ_PTM_02.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_04.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_03.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_01.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH2_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH1_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
i_stGauge:= CVMI_ROUGH_GPI_04.PG,
i_rMaxBackingPressure:= 1,
iq_stPtm=> );
CVMI_GJ_PTM_03(i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_GJ_PTM_03.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_04.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_03.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_01.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH2_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH1_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
i_stGauge:= CVMI_ROUGH_GPI_04.PG,
i_rMaxBackingPressure:= 1,
iq_stPtm=> );
CVMI_GJ_PTM_04(i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_GJ_PTM_04.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_04.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_03.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_01.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH2_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH1_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
i_stGauge:= CVMI_ROUGH_GPI_04.PG,
i_rMaxBackingPressure:= 1,
iq_stPtm=> );
CVMI_MAIN_PTM_01(i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_MAIN_PTM_01.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_02.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_01.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_03.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH1_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH2_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
i_stGauge:= CVMI_ROUGH_GPI_02.PG,
i_rMaxBackingPressure:= 1,
iq_stPtm=> );
CVMI_CATCH_PTM_01(
i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_CATCH_PTM_01.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_02.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_01.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_03.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH1_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH2_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
iq_stPtm=> );
CVMI_KTOF_PTM_01(
i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_KTOF_PTM_01.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_02.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_01.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_03.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH1_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH2_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
iq_stPtm=> );
(*
CVMI_KTOF_PTM_02(
i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_KTOF_PTM_02.iq_stPtm,
i_stISG:= CVMI_CATCH_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_02.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_01.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_03.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH1_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH2_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
iq_stPtm=> );
*)
CVMI_ROUGH_PTM_01(
i_xExtILKOk:= F_Turbo_NC_NO_Valve_Logic_NC(
i_stTurbo:= CVMI_ROUGH_PTM_01.iq_stPtm,
i_stISG:= CVMI_GJ_GPI_01.PG,
i_stBSG:= CVMI_ROUGH_GPI_02.PG,
iq_stValve_NO:= CVMI_ROUGH_VRC_02.iq_stValve,
iq_stValve_NC:= CVMI_ROUGH_VRC_01.iq_stValve,
iq_stValve_NC_second:= CVMI_ROUGH_VRC_03.iq_stValve,
EcatBridge_Error_Present:= xEcatBridge_COM_ERROR,
iq_stRoughRoughValve_NC_xOpnLS:= xTMO_ROUGH1_VRC_01_OPEN_LS,
iq_stRoughRoughValve_NC_second_xOpenLS:=xTMO_ROUGH2_VRC_01_OPEN_LS,
x_onBeamline:= xOnBeamline),
iq_stPtm=> );
(*Serial Communication*)
(*Assign adresses to the pfeiffer controllers connected to this serial terminal*)
st_Pfeiffer_CTRL_CVMI_CATCH_PTM_01[1].iSerialAddress :=1;
st_Pfeiffer_CTRL_CVMI_CATCH_PTM_01[1].xEnableComm := TRUE;
(* Instanitate the Function block for serial communication with Pfeiffer*)
fb_PfeifferCom_CVMI_CATCH_PTM_01(astPfeifferControl := st_Pfeiffer_CTRL_CVMI_CATCH_PTM_01,
astPfeifferStatus:= st_Pfeiffer_RBK_CVMI_CATCH_PTM_01,
SerialRXBuffer:= SerialRXBuffer_CVMI_CATCH_PTM_01,
SerialTXBuffer:= SerialTXBuffer_CVMI_CATCH_PTM_01);
(* Copy Status Pv's into the PTM structure*)
CVMI_CATCH_PTM_01.M_Serial_IO(st_Pfeiffer_RBK:= st_Pfeiffer_RBK_CVMI_CATCH_PTM_01[1], st_Pfeiffer_CTRL:= st_Pfeiffer_CTRL_CVMI_CATCH_PTM_01[1]);
st_Pfeiffer_CTRL_CVMI_ROUGH_PTM_01[1].iSerialAddress :=1;
st_Pfeiffer_CTRL_CVMI_ROUGH_PTM_01[1].xEnableComm := TRUE;
fb_PfeifferCom_CVMI_ROUGH_PTM_01(astPfeifferControl := st_Pfeiffer_CTRL_CVMI_ROUGH_PTM_01,
astPfeifferStatus:= st_Pfeiffer_RBK_CVMI_ROUGH_PTM_01,
SerialRXBuffer:= SerialRXBuffer_CVMI_ROUGH_PTM_01,
SerialTXBuffer:= SerialTXBuffer_CVMI_ROUGH_PTM_01);
CVMI_ROUGH_PTM_01.M_Serial_IO(st_Pfeiffer_RBK:= st_Pfeiffer_RBK_CVMI_ROUGH_PTM_01[1], st_Pfeiffer_CTRL:= st_Pfeiffer_CTRL_CVMI_ROUGH_PTM_01[1]);
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_01[1].iSerialAddress :=1;
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_01[1].xEnableComm := TRUE;
fb_PfeifferCom_CVMI_KTOF_PTM_01(astPfeifferControl := st_Pfeiffer_CTRL_CVMI_KTOF_PTM_01,
astPfeifferStatus:= st_Pfeiffer_RBK_CVMI_KTOF_PTM_01,
SerialRXBuffer:= SerialRXBuffer_CVMI_KTOF_PTM_01,
SerialTXBuffer:= SerialTXBuffer_CVMI_KTOF_PTM_01);
CVMI_KTOF_PTM_01.M_Serial_IO(st_Pfeiffer_RBK:= st_Pfeiffer_RBK_CVMI_KTOF_PTM_01[1], st_Pfeiffer_CTRL:= st_Pfeiffer_CTRL_CVMI_KTOF_PTM_01[1]);
(*
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_02[1].iSerialAddress :=1;
st_Pfeiffer_CTRL_CVMI_KTOF_PTM_02[1].xEnableComm := TRUE;
fb_PfeifferCom_CVMI_KTOF_PTM_02(astPfeifferControl := st_Pfeiffer_CTRL_CVMI_KTOF_PTM_02,
astPfeifferStatus:= st_Pfeiffer_RBK_CVMI_KTOF_PTM_02,
SerialRXBuffer:= SerialRXBuffer_CVMI_KTOF_PTM_02,
SerialTXBuffer:= SerialTXBuffer_CVMI_KTOF_PTM_02);
CVMI_KTOF_PTM_02.M_Serial_IO(st_Pfeiffer_RBK:= st_Pfeiffer_RBK_CVMI_KTOF_PTM_02[1], st_Pfeiffer_CTRL:= st_Pfeiffer_CTRL_CVMI_KTOF_PTM_02[1]);
*)
(*Vacuum Gate Valve*)
fbGetCurTaskIndex();//getting index for first cycle of PLC operation
IF(xOnBeamline) THEN //If OnBeamline then stay open.
CVMI_ROUGH_VRC_01.M_Set_OPN_SW(TRUE);
CVMI_ROUGH_VRC_01(
i_xExtILK_OK:= TRUE,
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
ELSE
CVMI_ROUGH_VRC_01(//CVMI:ROUGH:VRC:01 can open when the pressure across the valve is below 10 torr //add the beamline
i_xExtILK_OK:= (ABS(CVMI_ROUGH_GPI_01.PG.rPRESS - CVMI_ROUGH_GPI_02.PG.rPRESS)<3000.0),
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
END_IF
//CVMI:ROUGH:VRC:02 close when either pressure in the the GJ and CATCH chambers are above 10 torr.
//-- delete when controls uncommented lines are proven to be correct
(*
IF((CVMI_GJ_GPI_01.PG.rPRESS >10.0)) THEN
//Set Valve to OPEN
CVMI_ROUGH_VRC_02.M_Set_CLS_SW(False);
END_IF
*)
CVMI_ROUGH_VRC_02(
i_xExtILK_OK:= NOT(CVMI_GJ_GPI_01.PG.rPRESS >10.0)
AND (xTMO_ROUGH1_VRC_01_OPEN_LS AND xTMO_ROUGH2_VRC_01_OPEN_LS),
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
//Normally Open Bypass Valve -- delete when controls uncommented lines are proven to be correct
//CVMI:ROUGH:VRC:02 close when either pressure in the the GJ and CATCH chambers are above 10 torr.
(*
IF(xOnBeamline) THEN
CVMI_ROUGH_VRC_02.M_Set_CLS_SW(FALSE);
ELSIF (NOT xOnBeamline OR (CVMI_GJ_GPI_01.PG.rPRESS > 10.0)) THEN
CVMI_ROUGH_VRC_02.M_Set_CLS_SW(TRUE);
END_IF
//_TaskInfo[fbGetCurTaskIndex.index].FirstCycle
CVMI_ROUGH_VRC_02(
i_xExtILK_OK:= TRUE,
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
*)
IF(xOnBeamline) THEN //If OnBeamline then stay open.
CVMI_ROUGH_VRC_03.M_Set_OPN_SW(TRUE);
CVMI_ROUGH_VRC_03(
i_xExtILK_OK:= TRUE,
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
ELSE
CVMI_ROUGH_VRC_03(//CVMI:ROUGH:VRC:03 can open when the pressure across the valve is below 10 torr //add the beamline
i_xExtILK_OK:= (ABS(CVMI_ROUGH_GPI_03.PG.rPRESS - CVMI_ROUGH_GPI_04.PG.rPRESS)<3000.0),
i_xOverrideMode:= xSystemOverrideMode_CVMI,
iq_stValve=> );
END_IF
(*Update EtherCAT Bridge Outputs*)
xIP1_ROUGH_VRC_01_OPEN_LS := CVMI_ROUGH_VRC_01.M_IsOpen();
xIP1_ROUGH_VRC_02_OPEN_LS := CVMI_ROUGH_VRC_02.M_IsOpen();
xIP1_ROUGH_VRC_03_OPEN_LS := CVMI_ROUGH_VRC_03.M_IsOpen();
//xIP1_TURBO_FAULT AT %Q* : BOOL; already updated at turbo pump logic.
xIP1_MAIN_xAT_VAC := CVMI_CATCH_GCC_01.IG.xAT_VAC;
xIP1_MAIN_xPRESS_OK := CVMI_CATCH_GCC_01.IG.xPRESS_OK;
rIP1_MAIN_rPRESS := CVMI_CATCH_GCC_01.IG.rPRESS;
xIP1_HV_SAFETY_ENABLE := xHighVoltageSafteyLoopEnable;
END_PROGRAM
- Related:
PRG_COM
PROGRAM PRG_COM
VAR
END_VAR
(*Instanitate Serial port com function *)
fbSerialLineControl_CVMI_CATCH_PTM_01(
Mode:= SERIALLINEMODE_EL6_22B,
pComIn:= ADR(stComIn_CVMI_CATCH_PTM_01),
pComOut:=ADR(stComOut_CVMI_CATCH_PTM_01),
SizeComIn:= UINT_TO_INT(SIZEOF(stComIn_CVMI_CATCH_PTM_01)),
TxBuffer:= SerialTXBuffer_CVMI_CATCH_PTM_01,
RxBuffer:= SerialRXBuffer_CVMI_CATCH_PTM_01,
Error=> ,
ErrorID=> );
fbSerialLineControl_CVMI_ROUGH_PTM_01(
Mode:= SERIALLINEMODE_EL6_22B,
pComIn:= ADR(stComIn_CVMI_ROUGH_PTM_01),
pComOut:=ADR(stComOut_CVMI_ROUGH_PTM_01),
SizeComIn:= UINT_TO_INT(SIZEOF(stComIn_CVMI_ROUGH_PTM_01)),
TxBuffer:= SerialTXBuffer_CVMI_ROUGH_PTM_01,
RxBuffer:= SerialRXBuffer_CVMI_ROUGH_PTM_01,
Error=> ,
ErrorID=> );
fbSerialLineControl_CVMI_KTOF_PTM_01(
Mode:= SERIALLINEMODE_EL6_22B,
pComIn:= ADR(stComIn_CVMI_KTOF_PTM_01),
pComOut:=ADR(stComOut_CVMI_KTOF_PTM_01),
SizeComIn:= UINT_TO_INT(SIZEOF(stComIn_CVMI_KTOF_PTM_01)),
TxBuffer:= SerialTXBuffer_CVMI_KTOF_PTM_01,
RxBuffer:= SerialRXBuffer_CVMI_KTOF_PTM_01,
Error=> ,
ErrorID=> );
(*
fbSerialLineControl_CVMI_KTOF_PTM_02(
Mode:= SERIALLINEMODE_EL6_22B,
pComIn:= ADR(stComIn_CVMI_KTOF_PTM_02),
pComOut:=ADR(stComOut_CVMI_KTOF_PTM_02),
SizeComIn:= SIZEOF(stComIn_CVMI_KTOF_PTM_02),
TxBuffer:= SerialTXBuffer_CVMI_KTOF_PTM_02,
RxBuffer:= SerialRXBuffer_CVMI_KTOF_PTM_02,
Error=> ,
ErrorID=> );
*)
END_PROGRAM