Hello, everyone. I have developed the acromagAVME9325 driver using I/O Intr
It's working well when one channel is used, no matter what's on other channels
e.g.
record(ai, "$(user):aiAvme9325_Chan0")
{
field(DESC, "Acromag AVME9325 Input")
field(SCAN, "I/O Intr")
field(DTYP, "acromagAVME")
field(INP, "#C0 S0@")
field(LINR, "LINEAR")
field(EGUF, "10")
field(EGUL, "-10")
field(EGU, "Counts")
field(HOPR, "10")
field(LOPR, "-10")
field(HIHI, "8")
field(HIGH, "6")
field(LOW, "4")
field(LOLO, "2")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV, "MAJOR")
}
I tried to modify it with two channels like this:
record(ai, "$(user):aiAvme9325_Chan0")
{
field(DESC, "Acromag AVME9325 Input")
field(SCAN, "I/O Intr")
field(DTYP, "acromagAVME")
field(INP, "#C0 S0@") /* channel 0 selected*/
field(LINR, "LINEAR")
field(EGUF, "10")
field(EGUL, "-10")
field(EGU, "Counts")
field(HOPR, "10")
field(LOPR, "-10")
field(HIHI, "8")
field(HIGH, "6")
field(LOW, "4")
field(LOLO, "2")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV, "MAJOR")
}
record(ai, "$(user):aiAvme9325_Chan1")
{
field(DESC, "Acromag AVME9325 Input")
field(SCAN, "I/O Intr")
field(DTYP, "acromagAVME")
field(INP, "#C0 S1@") /* channel 1 selected*/
field(LINR, "LINEAR")
field(EGUF, "10")
field(EGUL, "-10")
field(EGU, "Counts")
field(HOPR, "10")
field(LOPR, "-10")
field(HIHI, "8")
field(HIGH, "6")
field(LOW, "4")
field(LOLO, "2")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV, "MAJOR")
}
This time I can't get the correct value of both channels, the two channels seems
have the same value. the ai read routine is like this:
long avme9325DI_read(register volatile unsigned short card,register volatile unsigned short chan,long *pval)
{
register volatile avme9325_t **p;
register volatile avme9325_t *pcard;
p=AVME9325.pCardList;
pcard=AVME9325.vmeAddrs;
*p=pcard;
if(!pval) return 1;
if(chan>15) return 1;
pcard->scanProg=0x80|(0x1F&chan); /* channel select*/
pcard->conversionCount=0x01; /* conversion times*/
while(!(pcard->csr&0x80))
{
;
} /*to determine whether the conversion finished*/
*pval=(unsigned long)pcard->data[pcard->pData]>>4; /* read the AD value*/
if(*pval==0xf000) return 1;
else return 0;
}
I think there must be something wrong with the .db file, I have tried some ways such as add the PHAS field , or set the aiAvme9325_Chan1 to Passive scanning, but still doesn't work.
Any suggestion is appreciated. Thank you
Cheng Weixing from SSRF
- Replies:
- RE: Questions about the Multi-channel I/O Interrupt Jeff Hill
- Navigate by Date:
- Prev:
RE: CA assert error on OSF1 version 5.1 Jeff Hill
- Next:
Newbie trying to move steppers in a CA client Chris Jacobsen
- 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: CA assert error on OSF1 version 5.1 Jeff Hill
- Next:
RE: Questions about the Multi-channel I/O Interrupt Jeff Hill
- 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
|