I am currently working with an hp 8757e (https://d3fdwrtpsinh7j.cloudfront.net/Docs/datasheet/hp_8757.pdf ) along with a prologix GPIB-USB bus connector. Someone I work with has written some python to get the GPIB to successfully send messages to the 8757 and get replies. However, when we pull data off of the NA, the first array of data is only the beginning of the signal, when we call the command again, it shows us the rest of the previous signal, and the beginning of the next signal. Repeat 4 times, and then eventually it somehow continuously lines up the data, but we are unsure if it is offset or not. I am sorry if I am not being specific enough, I can give anymore details necessary. I am attaching images of what I mean for the data and plots if anyone has any intuition on why this issue is happening. We know that each channel has a 401 point cap, but we don't know why it only sends 401 points after about 4 calls. The first array is about length 60, then the next three range randomly from 397-407, then all afterwards are 401.
If it is not obvious from the photos, the first is just a short amount of data being pulled, then after it shows the correct screen print but just shifted over due to the overflow of data, over time they start becoming 401 in length and overlapping, and then in the final photo i show the comparisons between the original random ones and the ones that consistently overlap (the brownish line, which again, we aren't sure if the overlapping ones are even correct, or if it just balances out the overflow at that point to some random spot on the x-axis) Also, it seems the photos are in reverse order, so the last of the 6 is the first one. The one with only ~67 points and just a blue squiggly graph
If this is something with the coding, help would be appreciated but is not necessary, what I would like to know is if it is either and issue with the network analyzer, it's settings, or me completely misunderstanding how it parses data.
Thank you for any help or responses, everything is appreciated, apologies in advance for the unstructured post
Hello,
In the past we used to have an 8757D and I have written code for that in HP VEE and other languages without issue. I have not programmed the 8757E though.
First recommendation is to alter the 401 point trace to some other lesser supported value, such as 21 points or 51 points (based on your note regarding 60 some values). The 8757E should support those number of trace points. Then repeat the data query. Is the full data array extracted or are these smaller arrays truncated? My guess you will have success with these smaller arrays. If so look to define a dimension on the data variable which is being filled with the trace data. Not sure if Python has some default length on strings / string arrays as I have never run into that road-block. Are you reading the returned data as an ARRAY of character strings with a comma as the delimiter, or as a long long long list of characters including the commas as a single string variable? The assumption here is that your read is of data type ASCII and not a binary block read. I did not see any of the Python source code so pretty much in the dark on that end.
Another consideration is to practice safe triggering, which is to say, do not query the trace data until the following sequence has been implemented:
A sample program image of an Keysight VEE Pro application for a 401 point transfer.
Also a VEE sample program for an 8757D but as a BINARY data transfer:
The minimized object does invoke the math as the title bar displays, i.e. 'A*asReal32_B+asReal32_C'
If you want to share you Python source code I can look at that next week after the Monday holiday.
Alternatively, for debug purposes, you could download VEE PRO as a 30-day trial license and I can provide the VEE source code files(.vee file extensions) for both the 8757 ASCII and binary data transfers for you to run and evaluate. This may help in debugging, i.e. is it the instrument or the environment.
Once you do have the trace data out successfully I suspect the next issue will be to associate that with some stimulus array. Not sure on your current sweep oscillator but this may help on that front as well.
As I remember it (and did not reconfirm on this request) you will need to query the connected swept source start and stop frequencies and with the number of points use a linear ramp function (in your Python code) to build the stimulus array associated with the data array.
Finally, it could be the ProLogix GPIB interface too. I believe they use NI's VISA libraries, not sure. If the issue becomes insurmountable and you cannot figure it out then you may need to consider a Keysight GPIB card such as the Keysight 82357B USB - GPIB interface and our Keysight I/O libraries (https://www.keysight.com/products/82357B).
Hope this all helps.
Sincerely,
tsilchia