09-06-2021 04:08 AM
Dear NI community,
I am very new to LabView and SCPI commands. As part pf my work, I want to send SCPI commands in LV in order to communicate with Gaussmeter IGM11 to do the Magnet flux Measurement.
I read the IGM11 manual already to get the basic idea of the scpi commands. Using ethernet (LAN) I have established a connection between Gaussmeter and PC. Through RS-232 I need to send SCPI commands to communicate with the device. Using TCP I would like to communicate with the device. I have connect the labview to gaussmeter but its not showing any data values in the labview program. Even I have little doubt about the code, I dont know whether the code is correct or not. Could you please tell me the way I have implemented the code is right?!
and I need to get continuously data output when I place magnet on the sensor
Thanks
Vijay
Solved! Go to Solution.
09-06-2021 08:23 AM
Hi vijay,
@vijay0507 wrote:
Using ethernet (LAN) I have established a connection between Gaussmeter and PC. Through RS-232 I need to send SCPI commands to communicate with the device. Using TCP I would like to communicate with the device. I have connect the labview to gaussmeter but its not showing any data values in the labview program. Even I have little doubt about the code, I dont know whether the code is correct or not. Could you please tell me the way I have implemented the code is right?!
and I need to get continuously data output when I place magnet on the sensor
09-06-2021 09:07 AM
Where are you connecting up to the instrument? And what are the commands you are sending?
Personally, I prefer using VISA for communicating with instruments. This allows me to switch between Ethernet, RS-232, GPIB, or USB and all that needs changing is the initialization. The API is similar to TCP, but more is handled behind the scenes for you.
09-16-2021 07:54 AM
Hello,
I am new to LabVIEW and my questions would be obvious for some for you. So please help if you know the solution.
I am very new to LabView and SCPI commands. As part pf my work, I want to send SCPI commands in LV in order to communicate with Gaussmeter IGM11 to do the Magnet flux Measurement via RS-232 cable.
The rest of the project was going well except for the LabVIEW part because as I said earlier, I am new to LabVIEW.
I am using the “Basic Serial Write and Read.vi” provided in the NI examples folder. The problem is that I don't know how to modify the vi in order to receive continuously the data coming from the Gaussmeter.
Thus, the first question is:
1.) How to read continuously from the RS-232 port? (I tried to use 'while loop' but with no success, maybe I was doing it the wrong way.) If you know the solution, please help me with your ideas and suggestions.
2.) The commands which I am using are follows:
Please help me whether I am doing the correct way. Please let me know your suggestions
Thanks & Regards
Vijay
09-16-2021 08:00 AM
Hi vijay,
@vijay0507 wrote:
1.) How to read continuously from the RS-232 port? (I tried to use 'while loop' but with no success, maybe I was doing it the wrong way.) If you know the solution, please help me with your ideas and suggestions.
To repeat a certain part of code "continuously" you should use a loop.
When you already tried to use a While loop and had no success, then you made something wrong…
09-16-2021 08:23 AM
Hi GerdW,
Thank you so much for your reply. I couldn't figure out where the mistake is raising in the code. I was trying to read the data from the Gaussmeter IGM11 with RS-232 cable but not getting exact idea of the mistake. Can you please check the code once. Does my code can read continuously data with SCPI command "read". Please let me know your response.
Thanks
Vijay
09-16-2021 08:37 AM
In order to look at your code you need to post it. So far you only posted a screen show of a very small portion of your code That is not enough to work with.
09-16-2021 08:59 AM
09-16-2021 09:02 AM
Hello Mark,
I have posted my code in the previous message. For your reference attaching the code could you please check it. let me know your valuable suggestion.
Thanks
Vijay
09-16-2021 11:20 AM
Please save it for an earlier version of LabVIEW. I do not have LV 2021 installed.