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.
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!
--