hi, Owens:
Thank you very much~~~ your answer solved my much confusion. But about "Depending on the serial protocol you might be able to change the stream protocol file", can you give me more explaination? I use "%1r" toe match the 8bit value such as 0xfe, you means can do some calculation by some string operator like C++?
ps, I checked the record manual, seems I can use both dfanout and seq record to implement your answer 3, am I right?
======= At 2008-10-15, 21:48:10 you wrote: =======
>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
>>
>>
>>
>
= = = = = = = = = = = = = = = = = = = =
Best regards
Geyang 2008-10-15
- References:
- RE: a question about mbbiDirect and fanout Owens, PH (Peter)
- Navigate by Date:
- Prev:
Re: LvEPICS on USB Key pre-release Mohan Ramanathan
- Next:
Re: a question about mbbiDirect and fanout Ralph Lange
- 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
- Navigate by Thread:
- Prev:
RE: a question about mbbiDirect and fanout Owens, PH (Peter)
- Next:
Re: a question about mbbiDirect and fanout Ralph Lange
- 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
|