EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  Index 1994  1995  1996  1997  <19981999  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 
<== Date ==> <== Thread ==>

Subject: Re: Serial Configuration on a Greenspring Octal serial IP
From: Kay-Uwe Kasemir <[email protected]>
To: [email protected]
Date: Thu, 20 Aug 1998 08:58:31 +0200
Arne:

>I am presently using a IP Octal Serial card from greenspring
>to accomodate the serial devices.  However the serial lines on
>this card default to 9600 baud, 8 data bits no parity....
>
>I've looked in to the Vxworks tyLib package and can only find 
>function calls to change the baud rate, and another OPT_7_BIT which
>I think will place the port in 7 data bit mode. 

How did you manage to call the IP octal at all with the
standard VxWorks drivers?
As far as I know it is not supported by VxWorks if you
just plug it in.

I've used an IP-octal at DESY where they had bought
a special driver for it from SOFTEC GmbH, 89073 Ulm, Germany.
It comes with a file called ip8s.h that defines
some additional bits for ioctl(): speed, 5,6,7,8 bits, even,odd,no parity etc.
I extended it with the necessary bits from the IP octal manual
so that I could use mark/space "parity":

#define OPT_SPACE       0x08
#define OPT_MARK        0x0C

>What I cannot find is a way to put the port in parity=odd and
>to look for 1 stop bit.  
If your driver will just use whatever is given to ioctl()
and set the mode register, e.g.:

	ioctl (fd, FIOPARITY, OPT_EVEN)

will end up like this in the driver code:
    case FIOPARITY:
	status = ip8sMRSet(pip8sDv, arg, PARITY_MASK ,0,0);

then you can use the actual hardware bits:

#define OPT_NONE	0x10
#define OPT_EVEN	0x00
#define OPT_ODD		0x04

#define OPT_STOP_1_0	0x07
#define OPT_STOP_1_5	0x08
#define OPT_STOP_2_0	0x0f

So with the proper driver it should pose no problem, you can just use:
        ioctl (m->fd, FIOSETOPTIONS, OPT_RAW)
        ioctl (m->fd, FIOBAUDRATE, 1200)
        ioctl (m->fd, FIOCHARSIZE, OPT_7BITS)
        ioctl (m->fd, FIOPARITY, OPT_EVEN)
        ioctl (m->fd, FIOSTOPBITS, OPT_STOP_1_0)
        for example.


Unfortunately I cannot send you the driver code from SOFTEC
without being shot because of copyright violation...
But if you have any questions please feel free to bug me.

-Kay


Navigate by Date:
Prev: et_wish on Solaris 2.6 Garrett D. Rinehart
Next: Thanks to all! Jin Yu
Index: 1994  1995  1996  1997  <19981999  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: FW: Serial Configuration on a Greenspring Octal serial IP Peregrine McGehee
Next: EPICS and Solaris 2.6 Frederick Carter
Index: 1994  1995  1996  1997  <19981999  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 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·