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  <20162017  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  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: EPICS connect to siemens PLC317-2PN/DP: connetction problem
From: Esmaeil Tabar <[email protected]>
To: XU Jie <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 28 Jun 2016 00:02:08 +0000
Hi

TCP connection can be configured with the integrated Profinet interface but not via NetPro. You need to configure it by programming blocks. There is also a an Open Communication Wizard (OC Wizard) on Siemens website for easy configuration of the open communication.

https://support.industry.siemens.com/cs/ww/en/view/98957840

Regards,

Esmaeil Tabar | PLC Engineer| Australian Synchrotron
p: (03) 8540 5394 | f: (03) 8540 4200 
[email protected] | www.synchrotron.org.au
800 Blackburn Road, Clayton, Victoria 3168


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of XU Jie
Sent: Saturday, 25 June 2016 5:11 PM
To: [email protected]; [email protected]
Subject: EPICS connect to siemens PLC317-2PN/DP: connetction problem



Hi,sir:

   I have solved the problem about Illegal field value PV, but still cann't connetc the IOCsoft used the driver package  s7plc.tgz from PSI  to siemens PLC317-2PN/DP. Because I havn't the CP module such as CP343-1 and so on, I'm trying to use CPU integrated ProfiNet interface to achieve TCP communication between the IOCsoft and siemens PLC317-2PN/DP, but it has always problems. How to configure PLC without CP module?


 

Thank you.
Look forward to your answer.
Best regards,
Jie Xu

The detail like the following: 

#!../../bin/linux-x86_64/firstIoc
#< envPaths
## Register all support components
dbLoadDatabase("../../dbd/firstIoc.dbd",0,0)
firstIoc_registerRecordDeviceDriver(pdbbase)
var s7plcDebug 1
s7plcConfigure Testsystem:0,192.168.10.152,2000,10,10,1,2000,500
## Load record instances
dbLoadRecords("../../db/example.db","user=root")
iocInit()
Starting iocInit
############################################################################
## EPICS R3.16.0.1 $Date: Thu 2016-03-03 17:36:43 -0600$ ## EPICS Base built Jun 24 2016 ############################################################################
s7plcInit: starting main thread
s7plcMain: main thread started
s7plcIoParse s7-status: station=Testsystem:0 s7plcIoParse s7-status: offs=0 s7plcIoParse s7-status: dlen=2 s7plcIoParse s7-status: B=0 s7plcIoParse s7-status: L=0xffff8001 s7plcIoParse s7-status: H=0x7fff s7plcIoParse ai-int16-1: station=Testsystem:0 s7plcIoParse ai-int16-1: offs=0 s7plcIoParse ai-int16-1: dlen=2 s7plcIoParse ai-int16-1: B=0 s7plcIoParse ai-int16-1: L=0 s7plcIoParse ai-int16-1: H=0x3e8 s7plcMain Testsystem:0: Connect to 192.168.10.152:2000 on socket 5 s7plcEstablishConnection Testsystem:0: fd=5, IP=192.168.10.152 port=2000 s7plcEstablishConnection Testsystem:0: background connect(5,...) failed: Connection refused s7plcMain Testsystem:0: connect(5, 192.168.10.152:2000) failed: Connection refused. Retry in 10 seconds s7plcMain Testsystem:0: starting send thread Testsystem:0S s7plcMain Testsystem:0: starting recv thread Testsystem:0R s7plcSendThread Testsystem:0: started s7plcReceiveThread Testsystem:0: started cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 40392, cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
## Start any sequence programs
#seq sncfirstIoc,"user=root"
epics> s7plcMain Testsystem:0: Connect to 192.168.10.152:2000 on socket 
epics> 8
s7plcEstablishConnection Testsystem:0: fd=8, IP=192.168.10.152 port=2000 s7plcEstablishConnection Testsystem:0: background connect(8,...) failed: Connection refused s7plcMain Testsystem:0: connect(8, 192.168.10.152:2000) failed: Connection refused. Retry in 10 seconds s7plcReceiveThread Testsystem:0: recv(-1, ..., 10, 0) failed: Bad file descriptor


record (bi, "s7-status")
{
field (DTYP, "S7plc stat")
field (INP,  "@Testsystem:0")
field (SCAN, "I/O Intr")
field (ZNAM, "disconnected")
field (ONAM, "connected")
field (ZSV,  "MAJOR")
field (FLNK, "s7-status-counter")
}
record (calc, "s7-status-counter")
{
field (INPA, "s7-status-counter")
field (CALC, "A+1")
field (FLNK, "s7-disconnect-counter")
}
record (calc, "s7-disconnect-counter")
{   
field (INPA, "s7-status")
field (INPB, "s7-disconnect-counter.LA") field (INPC, "s7-disconnect-counter") field (CALC, "(A=0&&B=1)?C+1:C") } record (ai, "ai-int16-1") { field (DTYP, "S7plc") field (INP,  "@Testsystem:0/0 T=INT16 L=0 H=1000") field (EGUF, "10") field (LOPR, "-10") field (HOPR, "10") field (LINR, "LINEAR") field (PREC, "2") field (SCAN, "I/O Intr") }




-----原始邮件-----
发件人: "XU Jie" <[email protected]>
发送时间: 2016-06-23 12:09:20 (星期四)
收件人: [email protected], [email protected]
抄送: 
主题: re:Re: EPICS connect to PLC:Illegal field value PV ;Connection timed

Hi,sir:

 Thank you for your help, but it still doesn't work and show the problem that: Illegal field value PV .

Thank you.
Look forward to your answer.
Best regards,
Jie Xu

Subject: Re: EPICS connect to PLC:Illegal field value PV ;Connection timed
From: Nick Levchenko <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 20 Jun 2016 09:35:16 +0000 
    Hi,

"Illegal field value PV: ai-int16-1 s7plcInitRecordAi: illegal INP field type"

Judging by this, your EPICS isn't happy about "INP" field.

This is what you have now:
field (INP,  "@Testsystem:0/0 'T=INT16 L=0 H=1000'")

Looking through this (http://epics.web.psi.ch/style/software/s7plc/s7plc.html) the obvious first thing to try would be to remove extra pair of single quotation marks that you have.
Change
field (INP,  "@Testsystem:0/0 'T=INT16 L=0 H=1000'") to field (INP,  "@Testsystem:0/0 T=INT16 L=0 H=1000")

See if this helps?

______________________

Nick Levchenko
Control Systems Engineer
Integrated Control System Division

European Spallation Source ERIC
P.O Box 176, SE-221 00 Lund, Sweden
Visiting address: Tunavägen 24, Lund

Mobile: +46 721 79 23 64
Phone: +46 46 888 33 64
E-mail: [email protected]

www.esss.se


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 18 June 2016 19:00
To: [email protected]
Subject: Tech-talk Digest, Vol 10, Issue 239

Send Tech-talk mailing list submissions to
	[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
	https://mailman.aps.anl.gov/mailman/listinfo/tech-talk
or, via email, send a message with subject or body 'help' to
	[email protected]

You can reach the person managing the list at
	[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Tech-talk digest..."


Today's Topics:

   1. EPICS connect to PLC:Illegal field value PV ;Connection timed
      out (XU Jie)


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

Message: 1
Date: Sat, 18 Jun 2016 16:12:24 +0800 (GMT+08:00)
From: "XU Jie" <[email protected]>
To: [email protected]
Subject: EPICS connect to PLC:Illegal field value PV ;Connection timed
	out
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Hello sir,
  I used the driver package  s7plc.tgz from PSI and tried to connetct the EPICS IOCsoft and siemens PLC317-2PN/DP  with TCP protocol. When the IOC starts, the problems like these followed:
Illegal field value PV: ai-int16-1 s7plcInitRecordAi: illegal INP field type

Illegal field value PV: ai-int16-1 s7plcGetInIntInfo: uninitialized record

s7plcReceiveThread Testsystem:0: read error after 0 of 10 bytes: Connection timed out

Is the cause of the problems the ioc failed to connect with PLC? Or there are other reasons?

Thank you.
Look forward to your answer.
Best regards,
Jie Xu

< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocfirstIocboot")
epicsEnvSet("TOP","/home/newuser/EPICS/base-3.16.0.1/support")
epicsEnvSet("EPICS_BASE","/home/newuser/EPICS/base-3.16.0.1")
cd "/home/newuser/EPICS/base-3.16.0.1/support"

dbLoadDatabase "dbd/firstIoc.dbd"
firstIoc_registerRecordDeviceDriver pdbbase var s7plcDebug 1

s7plcConfigure Testsystem:0,192.168.10.152,102,10,10,1,2000,500

dbLoadRecords db/first.db

iocInit
Starting iocInit
############################################################################
## EPICS R3.16.0.1 $Date: Thu 2016-03-03 17:36:43 -0600$ ## EPICS Base built Jun  7 2016 ############################################################################
s7plcInit: starting main thread
s7plcMain: main thread started
s7plcMain Testsystem:0: Connect to 192.168.10.152:102 on socket 5 s7plcEstablishConnection Testsystem:0: fd=5, IP=192.168.10.152 port=102 Illegal field value PV: ai-int16-1 s7plcInitRecordAi: illegal INP field type

Illegal field value PV: ai-int16-1 s7plcGetInIntInfo: uninitialized record

s7plcMain Testsystem:0: starting send thread Testsystem:0S s7plcMain Testsystem:0: starting recv thread Testsystem:0R s7plcSendThread Testsystem:0: started s7plcReceiveThread Testsystem:0: started
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=newuser"
epics> s7plcWaitForInput Testsystem:0: select(5, 2.000000 sec) timed out
s7plcReceiveThread Testsystem:0: read error after 0 of 10 bytes: Connection timed out


first.db
record (ai, "ai-int16-1") {
  # map range 0 ... 1000 to 0.0000 ... 10.0000
  field (DTYP, "S7plc")
  field (INP,  "@Testsystem:0/0 'T=INT16 L=0 H=1000'")
  field (EGUF, "10")
  field (LOPR, "-10")
  field (HOPR, "10")
  field (LINR, "LINEAR")
  field (PREC, "2")
  field (SCAN, "I/O Intr")
}

 



_______________________________________________
Tech-talk mailing list [email protected] https://mailman.aps.anl.gov/mailman/listinfo/tech-talk


End of Tech-talk Digest, Vol 10, Issue 239
******************************************





Replies:
RE: EPICS connect to siemens PLC317-2PN/DP: connetction problem XU Jie
References:
EPICS connect to siemens PLC317-2PN/DP: connetction problem XU Jie

Navigate by Date:
Prev: Re: Including libraries in subroutines Stephen Molloy
Next: RE: EPICS connect to siemens PLC317-2PN/DP: connetction problem XU Jie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS connect to siemens PLC317-2PN/DP: connetction problem XU Jie
Next: RE: EPICS connect to siemens PLC317-2PN/DP: connetction problem XU Jie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·