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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [S7plc EPICS driver] REAL type record jumps to zero
From: Pavel Masloff <[email protected]>
To: [email protected]
Date: Tue, 27 Sep 2011 10:04:16 +0400

Hello guys!

My name is Paul and I work as Control Engineer at the Efremov Scientific Institute of Electro-physical Apparatus in St. Petersburg, Russia. We are currently involved in the ITER project, doing commutation switches for TF and PF superconducting coils. You might have heard of the largest Tokamak reactor being built in the south of France.

From the control standpoint we are proposed to use EPICS control system and Siemens PLCs. Maybe you can help me for I have experienced some problems gathering data from PLC in to EPICS. To be specific, I collect REAL type data (electrical current) with a discretization of 100 ms (PLC send-cycle) and 300 ms (EPICS recvTimeout). Here is what I get in EPICS:

Instead of a smooth staircase-shape curve with, say, 100 ms discretization (Fig. a) - my curve reaches zero periodically (Fig. b). So it's the same staircase-shape curve, but when the value changes, it becomes 0 beforehand. In other words, the last value is not retained. It is as if pulsing: value-0-value-0-value-0-etc. Maybe it can be better illustrated (see figures a and b, sorry for the quality). So I guess, it is due to this 200 ms differential - PLC sends data every 100 ms, EPICS receives data every 300 ms. Yet, it's proposed the EPICS recvTimeout to be 2 to 5 times the send intervall of the PLC. In my case it is 3.


1) Fig. a
+
+                                   -----------
+                        -----------    
+             -----------
+  -----------
+                                  
+                                                  
+
0+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


2) Fig. b
+
+                                                     -----------
+                                    -----------    
+                   -----------
+  -----------
+
+
+
0             ------           ------           ------




What do you think might be the problem? Can the last value be retained by means of EPICS somehow. Because, from what I can see, EPICS thinks it is nothing (0) when there is no signal, whereas I need it to be at least the previous value to form a curve like on Fig. a.
I have observed (in CSS BOY) that while this zero-jump the FLOAT32 record was flashing READ_ALARM. This might be the case. But I have no idea how to fix this.


  • This is my db file:

record (ai,"TEST-FDU-COMM:I_VCB")
{
    field(PINI, "YES")
    field(DTYP, "S7plc")
    field(INP, "@plc1_cfg/70 T=FLOAT32")
    field(SCAN, "I/O Intr")
    field(TSE, "-2")
    field(EGU, "Amps")
    field(PREC, "2")
    field(HIHI, "80000")
    field(HHSV, "MAJOR")
    field(HIGH, "70000")
    field(HSV, "MINOR")
    field(LOLO, "0")
    field(LLSV, "NO_ALARM")
    field(LOW, "2500")
    field(LSV, "MINOR")
}


  • Here is a line from the plcConfig.cfg file:

s7plcConfigure      plc1_cfg, 172.20.92.1, 2000, 86, 2, 1, 300, 100, "test REAL mode InWork 1"

  • PLC communicates via Ethernet cyclically every 100 ms (OB35  :  Cyclic 100ms)


It is interesting, though, that if I deal with data of other type(longin or bi), then there is no such a problem.
Perhaps, the reason may lie within this data type itself (FLOAT32). Maybe, I should have gotten it in WORD-type instead and process afterwards. What do you think?


Thanks in advance and I look forward to hearing from you!



--
Sincerely,

Pavel Maslov, MSc
R&D Institute for Electro-Physical Apparatus


Mobile: +7 (951) 672 22 19
Phone: +7 (812) 461 01 01

Replies:
Re: [S7plc EPICS driver] REAL type record jumps to zero Marty Smith
RE: [S7plc EPICS driver] REAL type record jumps to zero Di Maio Franck

Navigate by Date:
Prev: RE: Sequence monitor not getting callback Zelazny, Michael Stanley
Next: Re: [S7plc EPICS driver] REAL type record jumps to zero Marty Smith
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: devLib2 release 2.2 Michael Davidsaver
Next: Re: [S7plc EPICS driver] REAL type record jumps to zero Marty Smith
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·