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  <20082009  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  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: a question about mbbiDirect and fanout
From: "Owens, PH \(Peter\)" <[email protected]>
To: <[email protected]>, "tech-talk" <[email protected]>
Date: Wed, 15 Oct 2008 14:47:59 +0100
Three possibilities:

1. use a chain of FLNKs
2. use two fanout records.
3. use a seq record

Why do you need the NOT value?
You could just assign ZNAM to ON rather than OFF in your bi record.
Depending on the serial protocol you might be able to change the stream protocol file.
In an case, I don't think a calc record has B0,B1,... fields, so you would need
a second mbbiDirect record.

eg.:
record(mbbiDirect,"$(PREFIX):DISTATE")
{
        field(DTYP, "stream")
        field(INP, "@power.proto mbbiDirect_distate_raw terminal")
        field(SCAN, "1 second")
        field(PINI, "YES")
        field(FLNK, "$(PREFIX):DIOSTATE")
        field(NOBT,8)
}

record(bi,"$(PREFIX):DI0STATE")
{
        field(DESC, "MAIN RELAY")
        field(INP, "$(PREFIX):DISTATE.B0")
        field(ZSV, "NO_ALARM")
        field(OSV, "MINOR")
        field(ZNAM, "On")
        field(ONAM, "Off")
        field(FLNK, "$(PREFIX):DI1STATE")
} 


>   I want to get a raw value(8 bit) from hardware, after 
> caculating the NOT value of it, 8 bi records will get the 
> each bit value. For example, if I get the raw value "0xFE", 
> caculate it with NOT operator to "0x01", then bi record 1th 
> get the B0 bit, bi record 2th get the B1 bit...etc.
>   If I set SCAN field to period of each bi record, maybe I 
> can refresh the value. While is it possible only setting SCAN 
> field of mbbiDirect record, then arosing all bi records being 
> processed?
> I know if I use a fanout record(maybe dfanout record since 
> fanout only support 6 values), I can do this. Is there any 
> other possible way?
>   ps, is there any other way to caculate the NOT value 
> without using calc record?
> 
> record(mbbiDirect,"$(PREFIX):DISTATE_RAW")
> {
>         field(DTYP, "stream")
>         field(INP, "@power.proto mbbiDirect_distate_raw terminal")
>         field(SCAN, "Passive")
>         field(PINI, "YES")
>         field(FLNK, "$(PREFIX):DISTATE")
>         field(NOBT,8)
> }
> 
> record(calc,"$(PREFIX):DISTATE")
> {
>         field(CALC, "~A")
>         field(INPA, "$(PREFIX):DISTATE_RAW.VAL NPP")
> }
> 
> record(bi,"$(PREFIX):DI0STATE")
> {
>         field(DESC, "MAIN RELAY")
>         field(SCAN, "1 second")
>         field(INP, "$(PREFIX):DISTATE.B0 PP")
>         field(ZSV, "MINOR")
>         field(OSV, "NO_ALARM")
>         field(ZNAM, "OFF")
>         field(ONAM, "ON")
> }
> 
> record(bi,"$(PREFIX):DI1STATE")
> {
>         field(DESC, "CURRENT TRANSDUCER")
>         field(SCAN, "1 second")
>         field(INP, "$(PREFIX):DISTATE.B1 PP")
>         field(OSV, "MAJOR")
>         field(ZSV, "NO_ALARM")
>         field(ONAM,"FAULT")
>         field(ZNAM, "OK")
> }
> .......  
> 
> Thank you very much for your help. 
> 
> 
> Best regards
> Geyang  2008-10-15
> 
> 
> 


Replies:
Re: RE: a question about mbbiDirect and fanout Silver
Re: a question about mbbiDirect and fanout Ralph Lange
References:
a question about mbbiDirect and fanout Silver

Navigate by Date:
Prev: Re: EDM xyGraphClass yLabel displaying backwards John Sinclair
Next: Re: LvEPICS on USB Key pre-release Mohan Ramanathan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: a question about mbbiDirect and fanout Silver
Next: Re: RE: a question about mbbiDirect and fanout Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·