Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Hal Murray
I'm out of practice with C, but shouldn't viScanf(vi, %t, buf); be viScanf(vi, %t, buf); [I'm not a language wizard.] It looks OK to me. Arrays are passed by pointer. buf is the same as buf[0] The compiler should complain if it is wrong. A quick google found examples without the .

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Magnus Danielson
Hal Murray wrote: I'm out of practice with C, but shouldn't viScanf(vi, %t, buf); be viScanf(vi, %t, buf); [I'm not a language wizard.] It looks OK to me. Arrays are passed by pointer. buf is the same as buf[0] The compiler should complain if it is wrong. A quick google found examples

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Chuck Harris
If buf is defined as an array (eg. char buf[100];) its name is a constant that points to the start of the array. You can write it either as buf, or buf. -Chuck Harris Brent Gordon wrote: I'm out of practice with C, but shouldn't viScanf(vi, %t, buf); be viScanf(vi, %t, buf); Brent

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Hal Murray
If buf is defined as an array (eg. char buf[100];) its name is a constant that points to the start of the array. You can write it either as buf, or buf. Not quite. You need buf[0] buf is a pointer to the array. (first element) buf is a pointer to that pointer. buf[0] is a pointer to

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Tom Van Baak
Not quite. You need buf[0] buf is a pointer to the array. (first element) buf is a pointer to that pointer. buf[0] is a pointer to the first element of the array. Hal, try the following with your C compiler... #include stdio.h void main () { char buf[100] = { 3,1,4,1,5 };

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Magnus Danielson
Hal Murray wrote: If buf is defined as an array (eg. char buf[100];) its name is a constant that points to the start of the array. You can write it either as buf, or buf. Not quite. You need buf[0] buf is a pointer to the array. (first element) buf is a pointer to that pointer.

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Mike S
At 04:46 PM 10/24/2009, Tom Van Baak wrote... Not quite. You need buf[0] buf is a pointer to the array. (first element) buf is a pointer to that pointer. buf[0] is a pointer to the first element of the array. Hal, try the following with your C compiler... BASIC is _so_ much easier. :-)

Re: [time-nuts] GPIB on HP5382B counter

2009-10-24 Thread Hal Murray
t...@leapsecond.com said: Hal, try the following with your C compiler... ... mag...@rubidium.dyndns.org said: Not quite. ... Argh/blush. Sigh. Thanks for the correction, and apologies for cluttering up the list with bogus info. I fished out my old copy of Andrew Koenig's C Traps and

[time-nuts] GPIB on HP5382B counter

2009-10-23 Thread Jerome Peters
I'm still trying to get the HP5328B counter to work with GPIB. I don't have any problems talking, however I can't receive data. I think the basic (HP/Agilent) hardware/software are ok, with a similar type of program I am able to send/receive to a 34401 Digital Multimeter. It seems like it

Re: [time-nuts] GPIB on HP5382B counter

2009-10-23 Thread Brent Gordon
I'm out of practice with C, but shouldn't viScanf(vi, %t, buf); be viScanf(vi, %t, buf); Brent Jerome Peters wrote: I'm still trying to get the HP5328B counter to work with GPIB. I don't have any problems talking, however I can't receive data. I think the basic (HP/Agilent)