EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: EPICS Ethernet/IP & ControlLogix
From: Kay-Uwe Kasemir <[email protected]>
To: Bob Dalesio <[email protected]>
Cc: "Hammonds, John P." <[email protected]>, [email protected]
Date: Wed, 25 Aug 2004 09:34:38 -0400
Hi:

John, you're right about the "controller" tags.
You can access a controller tag "fred" by simply
using its name, so your basic record configuration is:
  DTYP = "EtherIP"
  INP (or OUT) = "@plc123 fred"

As you noticed, one can drill down through structures
and arrays: Local:2:O.Data[3] accesses the structure
"Local:2:0", element "Data", array element #4.
All the IOC software does is pass the string "Local:2:O.Data[3]"
to the controller, which then decodes the struct & array access.
I have a suspicion that there might be a way to access tags
in programs by using a syntax that e.g. somehow prefixes the
tags in the program with the program name.
But I have not found that documented, so you'd have to try
various ideas yourself: "<program>.<tag>", "<program>:<tag>" etc.

I'm unsure about your BO issue.
So "Local:2:O.Data[3]" <-> binary output works?
A simple "BOOL some_tag" <-> BO should also work.

And the setup
"BOOL tag == alias for Local:2:O.Data[3]" <-> BO record
that you describe should also work, unless you are experiencing
some strange timing.
Assume this:
BO record, SCAN="Passive", DTYP="EtherIP", OUT="@plcxyz tag S 1"
Set the record's TPRO="1".
When you write "1" to the record, you should see that the
device support deposits "1" in the tag table and after up to 1 second later,
the driver wakes up and writes "1" to the PLC.
Then, every second, the driver wakes up again and _reads_(!)
from the PLC. This is meant to support the idea that Bob describes,
where your PLC might have more than just the IOC messing with its tags.
_If_ the driver now finds the tag on the PLC to differ from what it thinks
it should be, so in case the driver finds the tag to be 0 on the PLC,
it will process your record and switch it back to 0.
In this case, with TPRO set to 1, you should see a message ala "got ... from driver".


But in general, the tag <-> alias tag <-> record should work.

-Kay



On Aug 25, 2004, at 8:59, Bob Dalesio wrote:
Hi JOhn,
The reason it is going back to 1 - is that the driver reads the output and reflects that value in the database. This is done as there may be a different master for the outputs - like a Allen-BRadley PanelMate.
For outputs, it is a good idea to have the IOC write to a boolean that is a request to drive an output. Make the output momentary by setting the HIGH field. Have it write to a soft variable in the PLC. Then the PLC can compute any interlock logic necessary to determine if it is safe to write the output.
Kay will have to say more about why the output may not be changing.
Bob


On Tue, 24 Aug 2004 20:54:21 -0500
 "Hammonds, John P." <[email protected]> wrote:
We are starting to examine the use of ControlLogix PLCs at IPNS and I am
looking at Kay's driver for Ethernet/IP. We now have our first test
setup going and we are looking at some of the subtleties with how to
access various types of tags. I am very novice with any PLC so please
forgive my awkward use of terminology.


It appears that the only tags that are accessible to the EPICS driver
are ones provided at the controller level ( in RSLogix 5000 App).  Is
this correct?


We have been able to access inputs (ai & bi) OK but have been having
some trouble with binary outs. So far we have avoided arrays
altogether. We have a binary out module ( relay out I believe ). We
can control an output of this directly using the base tag
Local:2:O.Data[3] with a binary output record. However, when we create
another tag which aliases Local:2:O.Data[3] and point the record at
this, we can turn the output on but cannot turn it off. I have an EPICS
screen that allows me to change the value and monitor the RVAL field.
Here I see the new value (0) temporarily reflected in the RVAL &VAL
fields but then it goes back to 1. No change is seen in RSLogix 5000.
We can reset the Value with RSLogix 5000 and repeat the process. The
same effect is seen for any "soft" tag. BTW the soft records that I
have are type BOOL.



Any ideas?




John Hammonds
Data Acquisition Systems Manager

Intense Pulsed Neutron Source

[email protected]

(630)252-5317



Bob Dalesio [email protected] 410 557 0297 Maryland 505 699 1632 Cell Phone



References:
Re: EPICS Ethernet/IP & ControlLogix Bob Dalesio

Navigate by Date:
Prev: Re: EPICS Ethernet/IP & ControlLogix Bob Dalesio
Next: RE: EPICS Ethernet/IP & ControlLogix Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Ethernet/IP & ControlLogix Bob Dalesio
Next: RE: EPICS Ethernet/IP & ControlLogix Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·