05-30-2013 06:30 AM
Hope you can assist to push me in the correct direction, learning exercise only for me, non commercial.
I have an old R&S SMFP2, with GPIB control described as IEC 625-1 (IEEE 4888) on the spec sheet. I also have a not quite as old NI GPIB-ENET (not the 100 or 1000). This is configured with a static IP 10.0.0.200.
The NI drivers are all loaded on my laptop version 2.2 and the card has been updated with the latest A.5 firmware and the NI 4888.2 getting started wizard says everything is OK when I verify the hardware and software installation.
When all connected up to the SMFP2, I have run the Measurement and Automation explorer and under the Devices and interface tree can see GPIB0 (GPIB-ENET) and from that can see Instrument0.
Primary address is 30
Secondary address 0
Identification The device did not respond to a *IDN? query
GPIB interface number 0.
At this stage all is looking good so I am now trying to communicate with the Instrument using the communicator. And this is were I fail to get reliable responses from the instrument. I have copied sections from the manual here, sorry it is long winded.
Each instruction to change a setting consists of at least an initial charater (header) and final character (deliminater). When data on a setting is to be transferred, eneter the data bewtween these two limiting characters. All characters are transmitted in ISO 7-bit ASCII code.
After a measurement has been completed, the result be called up before a new m,easirement is made, since otherwise the data would be overwritten.
The deliminater for the output is defined in the tester as CR. If a fauolty string is entered, a service request (SRQ) is sent via the IEC bus.
The control instructions are listed:
Function Code
Recieve AR
AM AA
FM AB
CCITT DC
etc
#
Input functions Code
SIG Gen AG123.4567 where 123.4567 is frequency in MHz
etc
So I have been tring what I thought may be the correct things to type in the communicator send string window such as:
30 AR
AR
these do not work but I get better results with 30,AR or ,AR but have to send twice before I get an action
Similar if I want to set the frequency 30,AG222.4444 sets the frequency after two sends only, I can not query the instrument or read it so believe I have not got the correct format.
Can anyone help, if you recognise the old instrument etc.
Please provide a pointer. trying to remember how to program in C will come much later.
If I need to provide anymore information please just ask and I will try my best.
Cheers
Adrian
Solved! Go to Solution.
06-03-2013 03:38 AM
Hi Adian
Thanks for posting.
It sounds like the instrument doesn't want to talk over GPIB!
Could you try using the software found here: http://www.30dbm.com/SMFP2/SMFP2_Remote.aspx
Do you have any other GPIB interfaces with which you could test the instrument?
Kind Regards
06-03-2013 12:00 PM
Hi Chris;
Thanks for responding. I have contacted the site owner and I am in email correspondence with him.
The latest version that is available on his web page does not work with the old GPIB-ENET box I have, I mentioned I have version 2.2 of NI software installed and the software for the remote control software was updated for:
"Support for latest National Instruments GPIB Driver (NI 488.2 Version 3.02), Windows 7 support, Excel Globalization improved" and when I tried to use wit
With my older equipment I got a particular error message of:
"The type initializer for 'NationalInstruments.NI4882.Internal.GpibDLL' threw an exception."
Now I have obtained the previous version and it seems to be communicating, but still need to sort out a registration code to fully use the software, which I am trying to do. So Iit would seems as though I should be able to command the device as it does use the NI software .net framework?
I am wondering if I could check what the software sends using NI spy, will give that a try or use something like wireshark to monitor TCP-IP packets if I am clever enough. I did see a lot of malformed packets last night when doing an initial test.
Anyway thanks for the response and watchout I may pester!
Last quick question will there be any updates for the uld GPIB unit or is it stuck at 2.2. I have to rely on the surplus market for equipment as not commercial so no funding at this enbd.
Cheers
Adrian
06-03-2013 01:52 PM
Just a quick update whislt I paste a few lines from NI spy
1. RegisterGpibGlobalsForThread(0x03A67D6C, 0x03A67D74, 0x03A67D68, 0x03A67D68)
Process ID: 0x00000FBC Thread ID: 0x000004D4
Start Time: 19:08:39.281 Call Duration: 00:00:00.015
ibsta: 0x0 iberr: 0 ibcntl: 0(0x0)
2. ibdev(0, 30, 0 (0x0), T3s (12), 1, 0x000D)
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.312 Call Duration: 00:00:00.266
ibsta: 0x100 iberr: 0 ibcntl: 0(0x0)
3. ThreadIbsta()
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.578 Call Duration: 00:00:00.000
ibsta: 0x100 iberr: 0 ibcntl: 0(0x0)
4. ThreadIbsta()
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.593 Call Duration: 00:00:00.000
ibsta: 0x100 iberr: 0 ibcntl: 0(0x0)
5. Send(0, 0x001E, "BO99", 4 (0x4), NLend (0x01))
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.640 Call Duration: 00:00:00.047
ibsta: 0x128 iberr: 0 ibcntl: 5(0x5)
6. ibfind(GPIB0)
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.640 Call Duration: 00:00:00.016
ibsta: 0x130 iberr: 0 ibcntl: 0(0x0)
7. ThreadIbsta()
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.687 Call Duration: 00:00:00.000
ibsta: 0x128 iberr: 0 ibcntl: 5(0x5)
8. ThreadIbsta()
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.687 Call Duration: 00:00:00.000
ibsta: 0x128 iberr: 0 ibcntl: 5(0x5)
9. ThreadIbsta()
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:41.734 Call Duration: 00:00:00.000
ibsta: 0x128 iberr: 0 ibcntl: 5(0x5)
10. Send(0, 0x001E, "AB,EM", 5 (0x5), NLend (0x01))
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:41.734 Call Duration: 00:00:00.234
ibsta: 0x128 iberr: 0 ibcntl: 6(0x6)
Now have to figure out what it means and if I can manually enter commands.
Adrian
06-06-2013 08:47 AM
Hi Adrian
Thanks for the updates.
You're correct in that if the device uses SCPI then you should be able to establism communication over GPIB without using specialist software.
I asked 'Do you have any other GPIB interfaces with which you could test the instrument?' since I wasn't sure if the instrument itself could just be failing to respond.
If you could find the manual for the SMFP2 (not the manual for that software on the link I first provided) then it should list the commands which need to be sent to operate the device.
Kind Regards
06-06-2013 12:10 PM
Sorry Chris I do not think I made my last post very clear at all.
The copied text from NI spy is from the remote control software from 30dBm.com, I was sent an earlier version and the NI spy is a copy of the software talking to the R&S instrument and that software does not report any problems and the instrument works.
The entries above is the control software sending commands such as
5. Send(0, 0x001E, "BO99", 4 (0x4), NLend (0x01))
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:39.640 Call Duration: 00:00:00.047
ibsta: 0x128 iberr: 0 ibcntl: 5(0x5)
10. Send(0, 0x001E, "AB,EM", 5 (0x5), NLend (0x01))
Process ID: 0x00000FBC Thread ID: 0x00000EE8
Start Time: 19:08:41.734 Call Duration: 00:00:00.234
ibsta: 0x128 iberr: 0 ibcntl: 6(0x6)
The command BO99 is initialise
The AB, EM
Commands AB says it should be Frequency mod
EM means siwtch internal mod off.
I can also recognise the 0x001E is Hex for 30
What i can not seem to do is send these from the NI communicator to get the machine to work, not sure if I am meant to be able to?
In fact, from communicator I can not get close to the Send(0, 0x001E, "BO99", 4 (0x4), NLend (0x01))
Cheers
Adrian
06-06-2013 03:36 PM
I do not seem to be able to edit my own posts, so have to reply to my own posts?
I have found Legacy: Introduction to the Interactive Control (IBIC) http://www.ni.com/support/gpib/max/ibic.htm
That seems to allow me to talk to the instrument and also read from the instrument using ibwrt and ibrd, looks as though this old legacy tool could be of the correct vintage for my old instrument.
So looks as though I need to searchg for more on the command structure of this, and if I can try and run a basic language program that can use IBIC for input and output.
My search continues.
Adrian
06-06-2013 05:37 PM
06-06-2013 07:15 PM
Hi Dennis
I accept I am not making sense to many. So please bear with me.
Old machine, looks like it is not 488.2 as it was listed as IEC 625/ieee488 and dates from the early 80's
The manual says the deliminater for the output string is defined in the tester as Carriage Return.
A typical command is AR
or AG123.4567
or BO99
I have been going through some of the docs and used MAX, from there it could find my instrument attached to the GPIB/ENET and there is a function to communicate with the instrument "NI-488.2 Communicator" where it looks as though I can just enter a string and hit the write button, or enter a string and hit the query button if I wish to read data from the instrument.
I could not get that to work.
AR should switch on the signal generator, but not by entering AR as the string and hitting the write button. For some reason I started trying combinations as I thought I may have to enter the instrument address 30, so I tried 30 AR or 30,AR and strangely if I hit the write button twice, it worked?
So that is why I initially asked the question. I have since proved the instrument is fully functional, I have now external software that talks and is fully functional with the instrument. But I would still like to send commands to it myself as a self learning exercise.
Whilst going through the search facilities on the NI site I came across IBIC the legacy interactive control and I am having more success with that.
What it has just told me in the documentation, is that even if I have set the EOS as 0x000D, I still have to enter it using \r. So guess what I have just tried back in the NI-4882 Communicator, string entered AG123.4567\r hit the write button and the unit responds first time every time.
So I guess I am happy with my first steps.
When I wrote, from communicator I can not get close to the Send(0, 0x001E, "BO99", 4 (0x4), NLend (0x01)) I was using NI spy to monitor the external software and then entering my strings and seeing if I managed to get close to my captured file.
Anyway happy now all for the want of a \r now giving up for the night.
Adrian