EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: asking for help on s7nodave
From: "=?gb18030?b?s8nN/rvG5a0=?=" <[email protected]>
To: "=?gb18030?b?dGVjaC10YWxr?=" <[email protected]>
Date: Thu, 6 Sep 2018 22:09:17 +0800
Hi,
I am following this guideline to make connection between epics and PLC.
http://metis.ipfn.ist.utl.pt/index.php?title=FUSION_Collaborations/ESTHER/Slow_Control/EPICS_%26_Siemens_PLC_Tutorial
http://oss.aquenos.com/epics/s7nodave/docs/2.1.3/manual.html#recordreference.deviceaddress

In the second link, I think I reach Step4, which means I can type s7nodaveConfigurePollGroup and s7nodaveConfigureIsoTcpPort  command
However, in the first link, I do not understand the part below. Where can I modify the
record(bi, "S7:biI1_5poll") ???????    Than I can visit the record by sequencer program???????
Sorry I got big confused here.

---------------

Poll Groups

All the input records in the database have a SCAN field. The IOC application will scan the value of each record at the interval defined in the SCAN field. For a SCAN field of "0.1 second" of a input record, the IOC application will query the PLC for that record's value once every 100 miliseconds.
However, EPICS treats each query independently, so by setting the SCAN field of every input record in this way, EPICS will query each value thorugh the local network and wait for the response before moving on to the next query, resulting in delayed responses.
The s7nodave library allows records to be assinged to polling groups. All the records in a pollgroup are queried in the same network packet, greatly reducing response lag.
In order to assign an input record to a poll group using the s7nodave library, one must set the SCAN field to "I/O Intr", and the INP field to "@myPLC(PG=[POLLGROUP_NAME]) [PLC_ADDR]". This can be seen in the example below for the PV S7:biI1_5poll.
record(bi, "S7:biI1_5poll")
{
        field(SCAN, "I/O Intr")
        field(DTYP, "s7nodave")
        field(INP, "@myPLC(PG=1s) I1.5")
        field(DESC, "S7 PLC I1.5 Binary Input POLLING")
}
Ommiting (PG=[POLLGROUP_NAME]) will assign the PV record to the "default" poll group.

----------------------------------------------

Sequencer Program

The example sequencer program inside this testS7 is a simple state-machine that monitors the value of a PLC port and sets another port to high or low accordingly. This program sequencer can be seen in the [testS7]/tests7App/src/snctests7.stt file:

program snctests7

double v;
short light;
assign v to "S7:biQ1_0";
monitor v;
assign light to "S7:boQ0_7";
ss ss1 {
    state init {
when (delay(1)) {
   printf("snctests7: Startup delay over\n");
   printf("snctests7: Going to low\n");
} state low
    }
    state low {
when (v >= 0.5) {
printf("snctests7: Changing to high %f\n",v);
light = TRUE;
pvPut(light);
} state high
    }
    state high {    
    when (v <= 0.5) {
printf("snctests7: Changing to low %f\n",v);
light = FALSE;
pvPut(light);
} state low
    }
}
------------------
黄 瀛
 
*****开票信息*****
名称:绵阳成威实验室工程技术有限公司
税号:915107 0455 1000 912T
注册地址:四川省绵阳市游仙区仙人路一段32号
开户银行:中国银行绵阳游仙支行
账号:1279 5046 6834
*****送货信息*****
地址:四川省绵阳市游仙区游仙镇仙童街一号,电商谷
联系人:黄瀛
电话:18784065819
************************************************
Ying Huang
Chengwei Lab&Engineering Company
No1 Xiantong Street, Youxian Area, Mianyang City, Sichuan Province, China
86 0816 2967213
 

Navigate by Date:
Prev: RE: Modbus Polling disable/enable Mark Rivers
Next: Re: Linux scan thread suspended Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: asking for help on s7nodave =?gb18030?b?s8nN/rvG5a0=?=
Next: Modbus Polling disable/enable [email protected]
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 06 Sep 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·