Experimental Physics and Industrial Control System
Emmanuel,
First, I think 1.0V is not going to work as TTL low. For
at least some logic families, you need to be below 0.6V,
and that's with zero noise margin. The safest value for
TTL low is 0.0V.
I don't see any problem with this idea. I would have the
mbbo set the output to 0V or 5V, if the mbbo value is
"low" or "high", and not set it at all if the mbbo value
is "undefined". I would have the mbbi report "low" for
voltages < 0.6V; "high" for voltages > 2.4V; and "undefined"
otherwise. I would have the mbbo's value follow the mbbi's
value, but arrange that the mbbo will not drive the output when
the mbbo is being driven by the mbbi. This is easy to
accomplish: have the mbbo write through a second mbbo record
which is scan-disabled by the PACT field of the mbbi record.
Also, I would have the mbbi record scan disabled by mbbo.PACT
Here the database. -> is a PP link or a forward link. The input
link from mbbo2.SDIS to mbbi.PACT is not shown. The input link
from mbbi.SDIS to mbbo.PACT is also not shown. (ai) is the
same record as ai, reproduced in the diagram so I don't have to
try to show a link going back to the ai record. mbboCalc is a
calcout record, which has a conditional output link programmed to
write only if its input value is (the numeric equivalent of)
"low" or "high". It's ok if ao and ai are asynchronous.
ai -> mbbiCalc -> mbbi -> mbb0 -> mbb02 -> mbboCalc -> ao -> (ai)
Here's the sequence of events when a CA or database put writes to
mbbo:
1) mbbo writes to mbbo2
2) mbbo2 writes to mbboCalc
3) mbboCalc writes to ao (if mbbo2.VAL is "low" or "high")
4) ao writes to the device and forward links to ai
5) ai reads from the device and writes to mbbiCalc
6) mbbiCalc writes to mbbi
7) mbbi is scan disabled by mbbo.PACT
Here's the sequence of events when a CA or database put writes to
ao:
1) ao writes to the device and forward links to ai
2) ai reads from the device and writes to mbbiCalc
3) mbbiCalc writes to mbbi
4) mbbi writes to mbbo
5) mbbo writes to mbbo2
6) mbbo2 is scan disabled by mbbi.PACT
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.
Emmanuel Mayssat wrote:
I have been struggling with a record loop.
What is the best way to implement the following.
I have a network based Analog output device type.
I want to have the option of using that device as a TTL binary output.
I want the driver to be "smart".
Let's assume I have the following records:
ao, ai, mbbo mbbi (3-state logic high/low/undefined)
If I change the mbbo to high, the ao is set to 3.7v
If I change mbbo to low, ao is set to 1.0v
The ai is readback and mbbi is computed based on the value of ai
Now, I would like the mbbo to reflect the value of the ao
If ao is set to .5, mbbo is reset to low
If ao is set to 2.5, mbbo is undefined
If ao is set to 4.7, mbbo is set to high.
The issue is that if in the latter case mmbo is set to high, ao will be
changed from 4.7 to 3.7v. If mbbo is set to low, ao is switched back to
1v.
Is the sync'ing of ao and mbbo an unreasonable request?
If not, how would you do that?
--
Emmanuel
- References:
- Record loop issue Emmanuel Mayssat
- Navigate by Date:
- Prev:
edm Szalata, Zenon M.
- Next:
EDM Szalata, Zenon M.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Record loop issue Emmanuel Mayssat
- Next:
Re: Record loop issue Luedeke Andreas
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025