EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Use of waveform records
From: "Mark Rivers" <[email protected]>
To: "Touchard Dominique" <[email protected]>, <[email protected]>
Date: Fri, 5 Oct 2007 11:23:06 -0500
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 Mark Rivers
References:
Use of waveform records Touchard Dominique

Navigate by Date:
Prev: RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Mark Rivers
Next: RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  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 Dave Reid
Next: RE: Use of waveform records Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·