06-17-2018 11:31 PM
Hello everyone,
I would be happy to get help with sending SCPI commands to my "E8251A" signal generator.
The device is configured in NIMAX.
I connected via TELNET to my device and sent SCPI commands to check the communication and the responses of the controlled device and everything works fine.
I would be happy if you could help me how to create a simple code to send one command to the signal generator with an answer or no answer.
I attached a photo with a code that I saw on youtube but it doesn't work ....
Thanks,
Matan
Solved! Go to Solution.
06-17-2018 11:48 PM
Why do you try to make your own driver, when there is already one?
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=1310
06-18-2018 12:28 AM
trying to make a simple app for me in order to practice and get better, secondly, I cant download it I don't know why.
06-18-2018 01:00 AM - edited 06-18-2018 01:01 AM
@Matanlaza wrote:
trying to make a simple app for me in order to practice and get better, secondly, I cant download it I don't know why.
You cannot download and you do not know why? 🙂 I mean, do you see any error msg or something? Does your browser malfunction? Anyway, I attached the zip file with LV2015 version driver in it. Unzip the file, and place/copy the folder "Agilent PSG MXG Series" under "c:\Program Files (x86)\National Instruments\LabVIEW 2017\instr.lib\ ". Restart LV, and then you can see the driver VIs under the "instr. IO / Instr. Drivers" subpalette. The other way to install drivers for LabVIEW which does not require a restart of LV is to do it via the "Help" menu --> "Find Instrument Drivers". Actually this does not work for me today, maybe some NI webserver is recently down...
Beside the official driver, I understand you would like to practice and learn how to program SCPI commands in LV. Based on the driver, here is an example snippet which queries the IDN of your unit. You have to figure out the IP address of your device, refer to the device menu or a manual!
06-18-2018 01:13 AM
Ok, I found the programming guide in pdf, attached. Regarding to the manual, first you need to configure the IP address of the device, see Chapter 1, 2.: "Setting Up the LAN Interface".
The manual explains at doc page 19. (page 33 in pdf file):
Before you can use sockets LAN, you must select the signal generator’s sockets port number to use: • Standard mode. Available on port 7777. Use this port for simple programming. • TELNET mode. Available on port 7778.
So select the standard mode, then use the following VISA resource name with port number 7777 (replace the IP address part with your actual used one, configurable in the device) in the example VI:
06-18-2018 02:03 AM
Thank you very much for your help.
In fact, I'm a beginner programmer and start trying to learn through problems related to my work and in this case to create a simple program that speaks with the generator signal.
I hope I understood you well, on the attached picture is that what you meant after I downloaded the file and zipped on the folder you said,
06-18-2018 02:47 AM
No, I would not use the IVI version, I would play with this palette (instrument I/O --> Instrument Drivers --> :
06-18-2018 02:59 AM
In case I did not mention earlier,
I connected the device via TELNET and sent basic commands such as frequency change, transmission, power change and saw that it works.
I tried to write the code on LabView as you suggested in the picture but there is something that is not clear to me and I marked it in a circle, unable to create it as in the picture.
06-18-2018 03:11 AM
Because you even do not know how to create a constant for an input, I would just put the Agilent device aside, and practice general LabVIEW programming. Here you can find lots of learning options, under section "Looking For Free Training":
https://forums.ni.com/t5/Community-Documents/Unofficial-Forum-Rules-and-Guidelines/ta-p/3536495
06-18-2018 04:07 AM
Hey again,
I know how to generate a constant, look over the picture and you can see a red dot and it is what I saw in the picture you sent..
I chose what you said but still do not have a proper response.
There is only one indication that I see in my signal generator that it enters a remote state which is great, however, no command I send to him through the software in the picture does not work.
The TELNET was just for testing that I understand how to talk to the generator signal, send commands and understand what it does.