[time-nuts] Prologix GPIB/USB converter help...

John Miles jmiles at pop.net
Sun Apr 15 18:22:04 UTC 2007


Yes, the older boards, at least, are a bit more reliable with a sleep()
after each write.   I use 100 milliseconds after each command... it seems
like a lot of time, but a lot of older instruments take that long to respond
anyway.

It can also be helpful to flush the receive port in various places when you
don't know if the instrument may have been sending data that never got read
by your program.  I do that by issuing repetitive read calls with 100-ms
timeouts, until one of the reads times out or fails, or a total of 2 seconds
is spent in the loop.  Some instruments like the HP 8568A dislike being
switched back to local mode, and respond by flooding the connection with
zeroes until addressed to talk again... so if I find that I can't swallow
all the incoming data in the flush() routine, I send an \r\n pair and retry
the whole flush operation.

-- john, KE5FX


> -----Original Message-----
> From: time-nuts-bounces at febo.com [mailto:time-nuts-bounces at febo.com]On
> Behalf Of John Ackermann N8UR
> Sent: Sunday, April 15, 2007 11:12 AM
> To: Discussion of precise time and frequency measurement
> Subject: Re: [time-nuts] Prologix GPIB/USB converter help...
>
>
> I think I have it licked now.  Getting the right terminations was step
> one, step two was getting a little sleep() between write and read
> commands, and step three was cleaning up my exit code (to stop a weird
> "can't close non-existent object attribute" error at the end.
>
> I still don't have minicom working, but that is almost certainly because
> the "Add Linefeed" option applies only to incoming data, and there's no
> way to tell it that for transmissions.
>
> Thanks all for the hints.
>
> John
> ----
> John Miles said the following on 04/15/2007 02:07 PM:
> > I was going to say, yes, you do need \r\n at the end of each outgoing
> > string.  I'd forgotten about that but was reminded of it just
> last night,
> > working on a configuration app for the new DIP-switchless boards.
> >
> > It should be pretty reliable with \r\n termination.
> >
> > -- john, KE5FX
> >
> >> -----Original Message-----
> >> From: time-nuts-bounces at febo.com [mailto:time-nuts-bounces at febo.com]On
> >> Behalf Of John Ackermann N8UR
> >> Sent: Sunday, April 15, 2007 10:45 AM
> >> To: Christopher Hoover
> >> Cc: time-nuts at febo.com
> >> Subject: Re: [time-nuts] Prologix GPIB/USB converter help...
> >>
> >>
> >> Well, I got my perl code, using Device::SerialPort, to work by *not*
> >> selecting raw mode, but explicitly adding CRLF to the command string by
> >> using chr() to append those characters.  I have no idea why...
> >>
> >> I'm also getting a weird error from the Device::SerialPort
> deconstructor
> >> on close, but that's workable.
> >>
> >> John
> >>
> >
> >
> > _______________________________________________
> > time-nuts mailing list
> > time-nuts at febo.com
> > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> >
> >
>
>
> _______________________________________________
> time-nuts mailing list
> time-nuts at febo.com
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>





More information about the Time-nuts_lists.febo.com mailing list