One thought on this.
Because you must do 2 Modbus operations to write a 32-bit value with
Modbus, I suspect that the power supply only updates the value when you
write one of the 16-bit words, i.e. either the most-significant or
least-significant 16 bits. You should read the documentation to find
out which one actually updates the power supply and make your database
write that value last. Otherwise you will get a momentary garbage
output if you do it in the wrong order.
Mark
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Mark Rivers
> Sent: Friday, October 05, 2007 11:23 AM
> To: Touchard Dominique; [email protected]
> Subject: RE: Use of waveform records
>
> Hi Dominique,
>
> Sorry for the delay in replying to this, I was on vacation.
>
> I think an easier solution to this problem is to use 2 calc records to
> convert the 32-bit integer to 2 16-bit integers, and write
> those to the
> Modbus driver using function 6. Then you don't have to write any C
> code, just a simple database.
>
> PowerSupply (longout) -> calc1 (16 LSB) -> longout1 -> Modbus
> -> calc2 (16 MSB) -> longout2 -> Modbus
>
> I don't recommend modifying the driver, because a 32-bit
> integer is not
> a standard Modbus data type, and we could end up with all sorts of
> modifications for non-standard data types.
>
> Mark
>
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of
> Touchard Dominique
> > Sent: Wednesday, September 19, 2007 8:44 AM
> > To: [email protected]
> > Subject: Use of waveform records
> >
> > Hi,
> >
> > we are working on/with the Epics modbus tcp driver written by Mark
> > Rivers. We need to write a 32 bits integer value in a power supply
> > command control interface. First we thought to write an asyn32Int
> > record with the number 6 modbus function. Immediatly, we
> saw that the
> > driver uses the number 6 modbus function which works only on
> > a 16 bits word.
> >
> > After reading the Modbus Driver Support documentation, we
> saw that we
> > have to use a two value length waveform record.
> >
> > First question : is this correct ?
> >
> > Second question : do we have to use the gensub record to manipulate
> > values inside a waveform record ? In this case, is there any example
> > that shows how to do this ? Could somebody send us an example
> > on this ?
> >
> > Third question : Is a bad idea to modify the modbus driver
> in the goal
> > to write a asyn32Int 32 bits integer record with the
> number 16 modbus
> > function ?
> >
> > Thanks for your help .
> >
> > Dominique Touchard.
> >
> >
>
>
- Replies:
- Re: Use of waveform records Touchard Dominique
- References:
- RE: Use of waveform records Mark Rivers
- Navigate by Date:
- Prev:
RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Emmanuel Mayssat
- Next:
Re: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Jukka Pietarinen
- 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: Use of waveform records Mark Rivers
- Next:
Re: Use of waveform records Touchard Dominique
- 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
|