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: "Hammonds, John P." <[email protected]>
To: "Hammonds, John P." <[email protected]>, "Kay-Uwe Kasemir" <[email protected]>
Cc: <[email protected]>
Date: Wed, 25 Aug 2004 13:35:23 -0500
Oops, I meant to include tech talk on this one 

John Hammonds
Data Acquisition Systems Manager
Intense Pulsed Neutron Source
[email protected]
(630)252-5317


> -----Original Message-----
> From: Hammonds, John P.
> Sent: Wednesday, August 25, 2004 12:12 PM
> To: 'Kay-Uwe Kasemir'
> Subject: RE: EPICS Ethernet/IP & ControlLogix
> 
> OK here is my setup,
> 
> I have a tag RoughPumpSw that has the following properties in the Edit
Tag
> Pane:
> 
> Tag Name:   RoughPumpSw
> Alias:      Local:2:O.Data.3
> Base Tag:   Local:2:O.Data.3
> Type:       BOOL
> Style:      Binary
> 
> I have a bo record RoughPumpSw that is defined so that
> SCAN:   Passive
> DTYP:   EtherIP
> OUT:    @plc1 RoughPumpSw S 1
> ONAM    ON
> ZNAM    OFF
> 
> 
> It seems that we can start off with the value of RoughPumpSw as 0 on
the
> PLC and I can successfully change it to 1 and the output module on the
PLC
> actually switches on.  When I go to turn it off(0), the value goes
back
> flips back to 1 fairly quickly.  As Kay suggested, I turned on PRO and
get
> back:
> 
> iochammonds> process:   RoughPumpSw
>    link_text  : 'plc1 RoughPumpSw S 10'
>    PLC_name   : 'plc1'
>    string_tag : 'RoughPumpSw', element 0
>    mask       : 0x00000001    spec. opts.: 2
>    plc        : 0x00704DE4    tag        : 0x007FF1F0
> 'RoughPumpSw': write 0
> 'RoughPumpSw': written
> 'RoughPumpSw': got 1 from driver
> 'RoughPumpSw': updated record to tag, val = 1
> process:   RoughPumpSw
>    link_text  : 'plc1 RoughPumpSw S 10'
>    PLC_name   : 'plc1'
>    string_tag : 'RoughPumpSw', element 0
>    mask       : 0x00000001    spec. opts.: 2
>    plc        : 0x00704DE4    tag        : 0x007FF1F0
> 
> 
> This seems to say that the value is read back as a 1 from the PLC
before
> the 0 gets set.  This is a very simple PLC app so I do not see how
delays
> are possible in the PLC.  The ladder logic only has a few simple rungs
and
> a dozen or so tags.
> 
> We have watched the value of RoughPumpSw on the PLC with RSLogix 5000
and
> see no changes.
> 
> If I switch the output field of the bo record to "@plc1
Local:2:O.Data[3]
> all works as expected and I can turn things on and off at will from
the
> IOC.
> 
> I have also tried swithing the OUT of the bo to "@plc1 Relay S 1"
where
> Relay is a Base tag not pointing to anything else.  Here I see the
same
> result where I can set the value to 1 from the IOC but cannot set it
back
> to 0.
> 
> 
> John
> 
> John Hammonds
> Data Acquisition Systems Manager
> Intense Pulsed Neutron Source
> [email protected]
> (630)252-5317
> 
> > -----Original Message-----
> > From: Kay-Uwe Kasemir [mailto:[email protected]]
> > Sent: Wednesday, August 25, 2004 8:35 AM
> > To: Bob Dalesio
> > Cc: Hammonds, John P.; [email protected]
> > Subject: Re: EPICS Ethernet/IP & ControlLogix
> >
> > 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
> > >
> >
> >
> >



Navigate by Date:
Prev: RE: EPICS Ethernet/IP & ControlLogix Allison, Stephanie
Next: asynDriver release 3-3 Marty Kraimer
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 Allison, Stephanie
Next: asynDriver release 3-3 Marty Kraimer
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 ·