Author Topic: GPIB-USB control between MacBook Air (Macintosh) and TDS540C  (Read 7129 times)

0 Members and 1 Guest are viewing this topic.

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« on: December 19, 2019, 04:52:40 am »
After many trials and problems, I've finally made successful preliminary connection between my Macintosh (MacBook Air with OS 10.12.6), one National Instruments GPIB-USB-HS interface and the NI software suite.

For those who are owners of Macintosh and might be interested, see attached some screenshots where I either use the NI-Terminal mode (not practical) and the VISA Interactive Control (much practical).

So far I've only got the *IND? query to work, later my hope is to learn how to do for example NVRAM dumping and other applications.

I did loose lot of time initially where GPIB0 should be the GPIB-USB-HS declaration via the NI-MAX software but it is important to apply another GPIB number ID inside the TDS540C, in my case I did choose GPIB2 otherwise there will be communication errors.

How could you teach me what are the exact chain of GIPB commands to access the internal flags of different options (1M 2M 2F...) address, values then upload the new flags to enable options like 2M or 2F through VISA Interactive Control software.
« Last Edit: December 19, 2019, 05:05:39 am by Tantratron »
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #1 on: December 19, 2019, 03:44:46 pm »
source-code  and   tekfwtool.exe for using (run only with NI-VISA  and Windows)
https://stackframe.org/tekfwtool/

how using of tekfwtool or tektool   (Link show only tektool, but tekfwtool is newer and use same commando)
https://web.archive.org/web/20131212025232/https://stackframe.org/tektool.shtml
(pleas don't write  0x0100 0000, it can make it to a brick) 
But again,  dont programm and flashing  0x0100 000 adress.   NVSRAm Adress is 0x0400 0000 (archivied link explain you, how use it.)


But you use  MAC, this is a problem. You must make executable file from tekfwtool.c or take a  computer with windows
(It runs with win 7 and win98SE)

Regards
matt
« Last Edit: December 19, 2019, 03:55:54 pm by madao »
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #2 on: December 20, 2019, 08:15:38 am »
For the moment, I'd like to first try a simple task to enable some options (2M, 1F) which are stored on ??? via the Macintosh Visa-GPIB utility.

From viewing different threads, unless I'm wrong it seems based on this step by step process:
  • toggle the safety switch on A11 board
  • send PASSWORD "PITBULL"
  • WORDCONSTANT:ATPUT address,1
  • toggle back the safety switch on A11 board

However do you know a meta-GPIB command to read some address (what is opposite of ATPUT commandand know what are the specific address for TDS540C to switch the bit...

It would help to have a database or thread listing the main option address versus TDS500-700 serie, what option...

« Last Edit: December 23, 2019, 10:34:30 am by Tantratron »
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #3 on: December 20, 2019, 09:24:32 am »
You can checking option. Press  "shift" and then "help(status)" . you see "banner" below at display. Press pleas display-Button to" banner".

Honestly, i don't know read commando. I haven't trying  hacking with pitbull-tricks, but i know, this tricks is not fake.

Tekfwtool is much besser for dumping of NVSRAM.
But i cannot give tip for make of executable tekfwtool for MAC.



BTW: 1F Option is Floppy-Disc,  i think, you mean 2F (advanced mathematics)

 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #4 on: December 20, 2019, 09:48:57 am »
Oups... yes I've meant 2F to do FFT and so

Thanks for confirming the PITBULL trick is real where now let's hope some other EEVblog members have reversed engineer the precise address where these options (2F, 2M) are stored for this TDS540C or best for other TDS series.
« Last Edit: December 23, 2019, 10:35:01 am by Tantratron »
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #5 on: December 21, 2019, 03:30:45 pm »
I confirm that typing "PASSWORD PITBULL",  followed by "WORDCONSTANT:ATPUT 327689,1", up the GPIB connector, with the cal-switch enabled, will enable the 2F maths option on a TDS540C. This was done from my Macintosh computer connected to NI-GPIB-USB with VISA Interactive Control of NI.
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #6 on: December 22, 2019, 11:22:28 am »
On a side note, it seems from VISA interface typing "WORDCONSTANT:ATPUT 327689,1" is the equivalent of "libManagerWordAtPut(0x50009, 1)" to write. It worked fine with my two TDS540C where now I've enabled the 2F option hence using FFT for free.

Does anywone knows what are the VISA or GPIB command equivalent to "libManagerWordAt()" to read a give address, for example reading the value stored at 327689 address ?

As a reference, I did find this partially from https://forum.tek.com/viewtopic.php?t=138100#p279044, in particular this extract
  • you can use libManagerWordAtPut call to "set" values (to be tested!)
  • you can use libManagerWordAt to read the actual value.

Another question, what is stored or what option is stored specifically at "0x5000B" so in decimal at 327691 address ?
« Last Edit: December 23, 2019, 10:48:39 am by Tantratron »
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #7 on: December 23, 2019, 03:40:26 pm »
For those of you using Macintosh, another command *OPT? which will report all the installed options. In this case, it shows indeed my TDS540C has option 13 (RS232-Centronics), Floppy drive (1F), 1M memory option and 2F math option.

Upon inspecting the queried format (look between each comas), there seems to be a total of 12 options on TDS500-700 serie C which I think start from address 0x50000 (decimal from address 327680).
« Last Edit: December 23, 2019, 04:07:46 pm by Tantratron »
 

Online analogRF

  • Frequent Contributor
  • **
  • Posts: 986
  • Country: ca
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #8 on: December 31, 2019, 08:11:47 pm »
does the tekfwtool work with agilent 82357A GPIB-USB on windows 7?

 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #9 on: January 01, 2020, 06:22:53 am »
does the tekfwtool work with agilent 82357A GPIB-USB on windows 7?

If someone leaving near Toulouse (France) owns a agilent 82357A or 82357B interface, I'd be interested to try it with my Macintosh and my TDS540C.

What is certain, the NI GPIB-USB seems to be best technical choice (covering most change) but more expensive so if Agilent works, I'm interested to purchase one if price OK
« Last Edit: January 01, 2020, 06:27:41 am by Tantratron »
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #10 on: January 01, 2020, 06:23:58 am »
I haven't checking, but  few people (inlc. autor of tekfwtool.exe) tell: It works only with NI-VISA.

But of coruse, i am glad, if it works with agilent.  But it must be make from c-sorucefile.
« Last Edit: January 01, 2020, 06:25:31 am by madao »
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #11 on: January 01, 2020, 06:29:11 am »
I'd like to compile the C files of tekfwtool on my Macintosh, for the moment I've only found this archive https://stackframe.org/tekfwtool/ but dates are 2013.

Does anybody has the complete C files, H files and MAKE file of more recent date, where can we find the most recent files of tekfwtool so I'll compile them on my Macintosh ?
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #12 on: January 01, 2020, 06:35:10 am »
file from 2013 is  actual.
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #13 on: January 01, 2020, 06:45:44 am »
file from 2013 is  actual.

It would be nice to have the author of tekfwtool to comment or help... there are different versions if you look https://stackframe.org/tekfwtool/ then https://stackframe.org/tekfwtool/tekfwtool.c whereas this other archive is slightly different https://web.archive.org/web/20131212025232/https://stackframe.org/tektool.shtml then https://web.archive.org/web/20130403195440/http://stackframe.org/tektool.c

On a side, it seems required also the C file https://stackframe.org/tekfwtool/target.c
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #14 on: January 01, 2020, 07:09:49 am »
tekfwtool and tektool is not same.   tektool supports only  28F016SA
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #15 on: January 01, 2020, 07:21:28 am »
tekfwtool and tektool is not same.   tektool supports only  28F016SA

Who wrote tektool ?
 

Offline madao

  • Frequent Contributor
  • **
  • Posts: 341
  • Country: de
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #16 on: January 01, 2020, 08:13:31 am »
same author. (stackframe.org)
 

Online analogRF

  • Frequent Contributor
  • **
  • Posts: 986
  • Country: ca
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #17 on: January 01, 2020, 11:58:45 am »
I haven't checking, but  few people (inlc. autor of tekfwtool.exe) tell: It works only with NI-VISA.

But of coruse, i am glad, if it works with agilent.  But it must be make from c-sorucefile.

my understanding is that if the agilent 82357A can work with NI VISA libraries then tekfwtool will work. Based on both Agilent and NI websites
the 82357A does work with NI VISA (there is an option that must be enabled in NI software?) If that is the case, tekfwtool should have no problem I think. It needs to see the NI VISA libraries
I have never had NI VISA on my computers (Only agilent I/O libraries) but I will install it and see if my 82357A works with it
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #18 on: January 01, 2020, 12:09:07 pm »
I haven't checking, but  few people (inlc. autor of tekfwtool.exe) tell: It works only with NI-VISA.

But of coruse, i am glad, if it works with agilent.  But it must be make from c-sorucefile.

my understanding is that if the agilent 82357A can work with NI VISA libraries then tekfwtool will work. Based on both Agilent and NI websites
the 82357A does work with NI VISA (there is an option that must be enabled in NI software?) If that is the case, tekfwtool should have no problem I think. It needs to see the NI VISA libraries
I have never had NI VISA on my computers (Only agilent I/O libraries) but I will install it and see if my 82357A works with it

When you state NI VISA, do you mean the paid option software suite or the free simplified communicator (attached the one I use on my Mac which should be the same for Windows or linux) ?

From what I've heard, the NI is more versatile hence will work always with tektronix, Agilent,X or Y... no free lunch, pay mor ethen you get more
 
The following users thanked this post: analogRF

Online analogRF

  • Frequent Contributor
  • **
  • Posts: 986
  • Country: ca
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #19 on: January 01, 2020, 12:36:13 pm »
Tentratron

honestly I dont know because I do not have NI VISA. I only quoted from Keysight and NI website. They talk about enabling "Passport for tulip" (or enabling NIVISATulip.dll) in NI VISA settings and also enabling NI 488.2 from withing the Keysight connection expert.
 

Offline ragge

  • Regular Contributor
  • *
  • Posts: 53
  • Country: se
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #20 on: January 01, 2020, 04:23:37 pm »
Hi Tantratron,

I believe it should be no big deal to convert tekfwtool to the VISA API instead of the NI-488.2 API if you want to, see for example:
https://documentation.help/NI-VISA/ComparisonNI-VISAandNI-488APIs.html.

I actually just today published a kit with versions of tekfwtool, tektool and getcaldata with minor modifications to make them run on Linux (and ARM, for Raspberry Pi).

I believe it should be easy to make them usable on MacOS too if you just find a NI-488.2 API, macosx_gpib_lib could work, but I haven't tried it. Maybe the NI VISA kit has NI-488.2 compatibility as well, I have not checked.

You can find them here:
https://github.com/ragges/tektools

Regards,

Ragnar
 
The following users thanked this post: Tantratron

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #21 on: January 01, 2020, 05:06:05 pm »
Hi Tantratron,

I believe it should be no big deal to convert tekfwtool to the VISA API instead of the NI-488.2 API if you want to, see for example:
https://documentation.help/NI-VISA/ComparisonNI-VISAandNI-488APIs.html.

I actually just today published a kit with versions of tekfwtool, tektool and getcaldata with minor modifications to make them run on Linux (and ARM, for Raspberry Pi).

I believe it should be easy to make them usable on MacOS too if you just find a NI-488.2 API, macosx_gpib_lib could work, but I haven't tried it. Maybe the NI VISA kit has NI-488.2 compatibility as well, I have not checked.

You can find them here:
https://github.com/ragges/tektools

Regards,

Ragnar

Many thanks Ragnar, just checked your repository on github which will tremendously help the community.

Many thanks for mentioning macosx_gpib_lib  which I did not know of

then https://www.eevblog.com/forum/testgear/agilentbeiming-82357-usb-gpib-support-for-osx/

Let us see if it can work as well with GPIB-USB-HS of National Instruments.

Quick question first, what is the purpose or idea of using Raspberry Pi or say arduino DUE ?

Happy New Year, Albert
« Last Edit: January 01, 2020, 05:25:49 pm by Tantratron »
 

Offline ragge

  • Regular Contributor
  • *
  • Posts: 53
  • Country: se
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #22 on: January 01, 2020, 06:43:09 pm »
Hi Tantratron,

Quick question first, what is the purpose or idea of using Raspberry Pi or say arduino DUE ?

The Raspberry Pi is a full fledged Linux box for less than about Euro 50-70 (with accessories), and if the programs work there they should work with more or less any Linux machine, as well as any other Unix (as MacOS) with GPIB support, which is a real bonus. I just log in to it (wirelessly) from my laptop (Mac) and do this stuff there, that way I don't have to physically tie my laptop to the instruments. Also, modifications to make the programs work on Linux/Unix where trivial.

The Arduino Due is a microcontroller with no more OS than the Ardino libraries really, that is (normally) programmed with the Arduino IDE and API:s which are not POSIX compliant. It should of course be possible to port tektool/tekfwtool/getcaldata to Arduino too, but it would be much more work, and I don't really see the use case.

Happy new year to you too!

Ragnar
 

Offline TantratronTopic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: fr
  • Radio DSP Plasma
    • Tantratron
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #23 on: January 01, 2020, 06:59:15 pm »
Hi Tantratron,

Quick question first, what is the purpose or idea of using Raspberry Pi or say arduino DUE ?

The Raspberry Pi is a full fledged Linux box for less than about Euro 50-70 (with accessories), and if the programs work there they should work with more or less any Linux machine, as well as any other Unix (as MacOS) with GPIB support, which is a real bonus. I just log in to it (wirelessly) from my laptop (Mac) and do this stuff there, that way I don't have to physically tie my laptop to the instruments. Also, modifications to make the programs work on Linux/Unix where trivial.

OK thanks it is clear now what you've done.

On my side with my MacBookAir and the NI software applications, please find attached screenshots of what i'm using. Could provide suggestions, guidance on would be best approach (staying HMI, use Xcode to code in C, go Terminal or Python) to implement the tektfwtool, in my case interfacing my TDS540C with my Mac via GPIB-USB-HS of NI ?

One thing which is still not clear, the libraries of GPIB  but I'm on my learning curve

Thank you, Albert
 

Offline ragge

  • Regular Contributor
  • *
  • Posts: 53
  • Country: se
Re: GPIB-USB control between MacBook Air (Macintosh) and TDS540C
« Reply #24 on: January 01, 2020, 08:59:31 pm »
For tekfwtool, you don't need anything but the command line.
You need to have Xcode installed to have the compiler and the other development tools (if you don't want to install some other tool chain for some reason).
You seem to have already installed the NI libraries for 488, which is what it will use in this case.

I think this should pretty much work:
Code: [Select]
# get a copy of the kit from github
git clone https://github.com/ragges/tektools.git
# go to the tekfwtool directory
cd tektools/tekfwtool

Then with your favourite editor, in tekfwtool.c, to include the NI headers instead, replace
Code: [Select]
    #include <gpib/ib.h>with
Code: [Select]
    #include <ni4882.h>
Then it SEEMS this is the NI recommended way to compile the program (not very MacOS-/NextSTEP-ish, but...):
Code: [Select]
cc -g -fsigned-char tekfwtool.c /Library/Frameworks/NI4882.framework/Resources/ni4882.o -framework CoreFoundation -I/Library/Frameworks/NI4882.framework/Headers -o tekfwtool

You should now have a working program, check that it runs with e.g.:
Code: [Select]
./tekfwtool --help
I have not tried this myself, I'd prefer not to install all the NI cruft on my machine if I don't really need it, since they have split it into ~20 packages that all will put stuff in a bunch of places and it will be some work to get rid of it again.

For new programs, I would definitely consider PyVISA, depending on what you want to do.

Ragnar
« Last Edit: January 02, 2020, 04:07:53 pm by ragge »
 
The following users thanked this post: Tantratron


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf