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 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")
}

 



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



    Xu Jie,
   Southwestern Institute of Physics
    Chengdu, Sichuan 610041
    China
    Email: [email protected]
    Tel: +86-28-8285-0326



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

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


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


Navigate by Date:
Prev: seq 2.3.0 with dynamic PV-array assignment? Laznovsky Michael (PSI)
Next: asyn port driver written in Python Wang Xiaoqiang (PSI)
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: RE: seq 2.3.0 with dynamic PV-array assignment? Laznovsky Michael (PSI)
Next: re:Re: EPICS connect to PLC:Illegal field value PV ;Connection timed 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 ·