<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45"><TITLE>Re: [vrf] serial communication</TITLE></HEAD><BODY><P><FONT SIZE=2>Another advise, before sending a query or command, flush the receive buffer (ie. read all of the data and discard it), so the response you will read after your transmission will be only related to the current communication.</FONT></P><P><FONT SIZE=2>-----Message d'origine-----</FONT><BR><FONT SIZE=2>De: Rufus Warren [<A HREF="mailto:rwarren@amti.net">mailto:rwarren@amti.net</A>]</FONT><BR><FONT SIZE=2>Date: 30 avril 2004 08:15</FONT></P><P><FONT SIZE=2>Try using a continuous read on a separate thread, make sure to catch any</FONT><BR><FONT SIZE=2>error at the serial read i/o box. </FONT></P><P><FONT SIZE=2>Capture all the data read into a string, only clear the string after you</FONT><BR><FONT SIZE=2>have read the data. Take your time to check the string, since you are</FONT><BR><FONT SIZE=2>getting the data from a serial port. The advice below is pretty good, you</FONT><BR><FONT SIZE=2>can use the data available within your continuous read loop to only execute</FONT><BR><FONT SIZE=2>your read i/o when data is available, else just read and throw away the</FONT><BR><FONT SIZE=2>timeout error. Make sure to remember to concate your data, example,</FONT><BR><FONT SIZE=2>"aString + [i/o data out]". When done with the data, take care to clear the</FONT><BR><FONT SIZE=2>string, when not reading, i. e. aString = NULL, I use an empty TEXT box as a</FONT><BR><FONT SIZE=2>NULL.</FONT></P><P><FONT SIZE=2>Note that you will need to put some logic within your continuous read</FONT><BR><FONT SIZE=2>thread, that is, you will be able to set a global record field to inspect</FONT><BR><FONT SIZE=2>when you want to do som'n som'n within the read loop. Typically for</FONT><BR><FONT SIZE=2>timeouts, I use 30 millisecond, 0.030, or so, but take care and watch that</FONT><BR><FONT SIZE=2>you do not drop data depending upon how you clear the string. I clear the</FONT><BR><FONT SIZE=2>string when I know I am not receiving data. Also note that you will need to</FONT><BR><FONT SIZE=2>parse the string to use the data.</FONT></P><P><FONT SIZE=2>You should not need to worry about writing to the same device while reading</FONT><BR><FONT SIZE=2>since there is a transmit and receive line.</FONT></P><BR><P><FONT SIZE=2>-----Original Message-----</FONT><BR><FONT SIZE=2>From: Schlieker, Reiner [<A HREF="mailto:reiner.schlieker@siemens.com">mailto:reiner.schlieker@siemens.com</A>] </FONT><BR><FONT SIZE=2>Sent: Thursday, April 29, 2004 3:56 PM</FONT></P><P><FONT SIZE=2>You could try putting a DAV object (Data available) before the read, so that</FONT><BR><FONT SIZE=2>a read is only attempted if there is data in the buffer. This will avoid</FONT><BR><FONT SIZE=2>the program stopping when the read object errors due to no data in the</FONT><BR><FONT SIZE=2>buffer.</FONT></P><BR><P><FONT SIZE=2>-----Original Message-----</FONT><BR><FONT SIZE=2>From: Zhang, Dale [<A HREF="mailto:zhangd@tycoelectronics.com">mailto:zhangd@tycoelectronics.com</A>]</FONT><BR><FONT SIZE=2>Sent: Thursday, April 29, 2004 2:45 PM</FONT></P><P><FONT SIZE=2>I am attaching an example to show how I am trying to use the serial port to</FONT><BR><FONT SIZE=2>communicate with our device.</FONT></P><P><FONT SIZE=2>This runs well in my office PC for vee and vxe. But on our lab PC, vxe does</FONT><BR><FONT SIZE=2>not show any reading in the logging window, vee shows the readings some</FONT><BR><FONT SIZE=2>time. The bottom line is that write is good but read.</FONT></P><P><FONT SIZE=2>I talked to Agilent support, they thought that the cause is we do not have</FONT><BR><FONT SIZE=2>any handshaking. I agree. Software handshaking has drawback: decimal 17 and</FONT><BR><FONT SIZE=2>19 are now unavailable for data values. We can not use, while Hardware</FONT><BR><FONT SIZE=2>Handshaking needs more work. But is there any simpler solution? </FONT></P><P><FONT SIZE=2>I tried to add a delay between write and read in the driver, which did not</FONT><BR><FONT SIZE=2>solve the problem. When we do not get readings, I/O bus monitor does not</FONT><BR><FONT SIZE=2>show any readings too.</FONT></P>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list, email "vrf@agilent.com". <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>
Jeff Davis
Lead Software Test Engineer
CDI Engineering Solutions Aerospace Technologies
Embedded Systems and Electronics
3137 E Elwood # 160
Phoenix, Arizona 85034
Phone: (602)431-4497 (x226)
Cell: (480)330-1431
Fax: (602)431-4435
> -----Original Message-----
> From: SPANGENBERG,SASCHA (A-Scotland,ex1)
> [mailto:sascha_spangenberg@agilent.com]
> Sent: Wednesday, April 28, 2004 09:11 AM
> To: VRF
> Subject: [vrf] Binding Matlab Figures to Vee Panels
>
>
> Thanks Bill - that's a good idea
>
> I guess one last thing remains though:
> Is it possible to bind a matlab figure into a Vee Panel
> so that they don't come up in separate windows?
>
> S.
>
> > -----Original Message-----
> > From: bill.ossmann@philips.com [mailto:bill.ossmann@philips.com]
> > Sent: 28 April 2004 16:33
> > To: PDL-LISTS,VRF (A-Lists,unix1)
> > Subject: [vrf] RE: Plotting multiple Traces at once?
> >
> >
> >
> >
> >
> >
> > You could use the Matlab plot() function.
> >
> > plot(x,y), where x is a 1-D array of the independent variable
> > and y is your
> > 2-D array, will do what you want as long as one of the
> > dimensions of y is
> > the same length as x. If you do not have an independent
> > variable, plot(y)
> > will plot the columns of y or plot(y') will plot the rows.
> >
> > Since you have something like 100 traces you might also want
> > to investigate
> > Matlab's 3D plotting functions such as mesh(), waterfall(),
> > surf(), and
> > contour(). They are not as complicated as the documentation
> > looks. Most of
> > them work with just a single argument, or just
> one-dimensional x and y
> > arguments and two-dimensional z. Ignore the color arguments
> until you
> > decide you need them, which may be never.
> > --
> > Bill Ossmann
> > Philips Ultrasound
> > e-mail: bill.ossmann@philips.com
> > --------------------------------------------------------------
> > -------------------------
> >
> >
> > Unfortunately I have a variable number of traces coming in
> so I can't
> > just "wire" the traces to the graph.
> > Also this would be very laborious for a large number of
> > traces (say 100
> >
> >
> > Sascha
> > > -----Original Message-----
> > > From: Pickles, Warren [mailto:Warren.Pickles@tycoelectronics.com]
> > > Sent: 28 April 2004 13:54
> > > To: PDL-LISTS,VRF (A-Lists,unix1)
> > > Subject: [vrf] RE: Plotting multiple Traces at once?
> > >
> > >
> > > Sascha,
> > >
> > > You're right the XY trace won't take a 2D array. But you can
> > > add an input
> > > pin(s), and split your 2D array into 1D arrays. Say your 2D
> > > array has each
> > > column containing the data points of one trace. Then
> > > ary[*,0] gives you the
> > > first column, ary[*,1] the second, and so on.
> > >
> > > Warren
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: SPANGENBERG,SASCHA (A-Scotland,ex1)
> > > [mailto:sascha_spangenberg@agilent.com]
> > > Sent: 28 April 2004 13:42
> > > To: VRF
> > > Subject: [vrf] Plotting multiple Traces at once?
> > >
> > >
> > > Hi All
> > >
> > > is it possible to plot multiple traces in one graph at once?
> > >
> > > E.g. I have a 2D Array with each column (or row) containing
> > > the data points of one trace.
> > >
> > > I tried to feed this into a XY Trace but it only takes a
> > Scalar or 1D
> > > Array.
> > >
> > > Running a for loop over all the columns and adding a new
> > trace to the
> > > graph is
> > > very slow (for large traces > 100) so I hope for a faster
> solution.
> > >
> > > Regards,
> > > Sascha.
> > >
> > > ---
> > > You are currently subscribed to vrf as:
> > > Warren.Pickles@tycoelectronics.com
> > > To subscribe send a blank email to
> > "join-vrf@it.lists.it.agilent.com".
> > > To unsubscribe send a blank email to
> > > "leave-vrf@it.lists.it.agilent.com".
> > > To send messages to this mailing list, email "vrf@agilent.com".
> > > If you need help with the mailing list send a message to
> > > "owner-vrf@it.lists.it.agilent.com".
> > >
> > > ---
> > > You are currently subscribed to vrf as:
> > sascha_spangenberg@agilent.com
> > > To subscribe send a blank email to
> > "join-vrf@it.lists.it.agilent.com".
> > > To unsubscribe send a blank email to
> > > "leave-vrf@it.lists.it.agilent.com".
> > > To send messages to this mailing list, email "vrf@agilent.com".
> > > If you need help with the mailing list send a message to
> > > "owner-vrf@it.lists.it.agilent.com".
> > >
> >
> > ---
> > You are currently subscribed to vrf as: bill.ossmann@philips.com
> > To subscribe send a blank email to
> "join-vrf@it.lists.it.agilent.com".
> > To unsubscribe send a blank email to
> > "leave-vrf@it.lists.it.agilent.com".
> > To send messages to this mailing list, email "vrf@agilent.com".
> > If you need help with the mailing list send a message to
> > "owner-vrf@it.lists.it.agilent.com".
> >
> >
> >
> >
> > ---
> > You are currently subscribed to vrf as:
> sascha_spangenberg@agilent.com
> > To subscribe send a blank email to
> "join-vrf@it.lists.it.agilent.com".
> > To unsubscribe send a blank email to
> > "leave-vrf@it.lists.it.agilent.com".
> > To send messages to this mailing list, email "vrf@agilent.com".
> > If you need help with the mailing list send a message to
> > "owner-vrf@it.lists.it.agilent.com".
> >
>
> ---
> You are currently subscribed to vrf as: jeff.davis@cdi-es.com
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list, email "vrf@agilent.com".
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".