Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Im having a read VISA error *IDN?

Hi everyone, first at all, Im very noob with english and labview, I had posted others post when I couldnt connect nothing but now I can connect the devices using a rs232 adapter, I can write commands and the device reponse correctly but the error ocurre when I try to read like *IDN?, the device is enable to do it (In manual). I receive 0 bytes of data and I dont know how to continue.salida.pngCaptura2.PNGCaptura.PNG

 

Im trying with the TTI power supply QL355P like this post: 

 

https://forums.ni.com/t5/LabVIEW/Problem-with-VISA-Read/td-p/3812605/page/2?profile.language=es

 

The user said that he make his own driver but I dont know how.

 

I wait you can help me, Im doing my job without that but I know that will be more easily if I get it.

 

 

 

0 Kudos
Message 1 of 11
(2,486 Views)

Try appending the newline character to your VISA Write such that your "*IDN?" becomes "*IDN?\n" in your code.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 11
(2,446 Views)

It has not been solved, in the other post I have been given a C # code that is not implemented in labview and they have told me that it is a time error, but the error is immediate even though I have set the timeout to 20 s.

0 Kudos
Message 3 of 11
(2,402 Views)

In other places I have read about a flush buffer and in others that it may be by using an RS232 adapter, I continue with the error, I do not understand what it can be.

0 Kudos
Message 4 of 11
(2,400 Views)

Open NI-MAX, it will have *IDN?\n as the default.  Does it work there when performing the query?

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 11
(2,392 Views)

Minions, I am surely missing something because I do not understand well, I hope you can tell me the steps well, if I open NI-MAX, the COM ports are shown. I have read that from here you can open a testing tool but it does not appear to me either. And I don't know where you want * IDN? / N to appear in NI-MAX. I hope I am not too boring or ignorant and I really appreciate your help.

0 Kudos
Message 6 of 11
(2,375 Views)

Open NI-Max, under Devices and Interfaces select the port and your screen should look something like this.

Minions_0-1627559395269.png

Assuming that those on your screen are the proper settings for your port, you can now Click Open VISA Test Panel.  Once that opens, select Input/Output and we are now ready.

Minions_1-1627559614306.png

 

Click the Query button to see any response from the instrument.

Spoiler
The direction of the slash \ or / makes a huge difference in the response.

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 7 of 11
(2,367 Views)

Oh, I finally found this tool, I had heard about it many times but had never tried it. I have tried "\, /" without any response, I have changed the timeout and also the termination character. No response.Captura3.PNG

0 Kudos
Message 8 of 11
(2,336 Views)

One guy send me this code, He said it work for him, but I dont know to implement in labview:

private bool PSU_Open(string PSU_Port)
{
	if (serialPort_PSU != null)
	{
		if (serialPort_PSU.IsOpen)
			serialPort_PSU.Close();
	}
	

	serialPort_PSU = new SerialPort(PSU_Port, 19200, Parity.None, 8, StopBits.One);
	serialPort_PSU.Handshake = Handshake.None;
	serialPort_PSU.ReadTimeout = 2000;
	serialPort_PSU.WriteTimeout = 500;

	serialPort_PSU.BaudRate = 19200;

	if (serialPort_PSU.IsOpen)
	{
		serialPort_PSU.Close();
	}

	serialPort_PSU.Open();

	serialPort_PSU.DiscardInBuffer();
	serialPort_PSU.DiscardOutBuffer();

	serialPort_PSU.WriteLine("*RST");

	Thread.Sleep(2500);
	serialPort_PSU.Close();
	Thread.Sleep(100);
	serialPort_PSU.Open();

	serialPort_PSU.DiscardInBuffer();
	serialPort_PSU.DiscardOutBuffer();

	int dev_chk_timer = 0;
	PSU_receiveBuffer = "";

	while (true)
	{
		serialPort_PSU.WriteLine("*IDN?");
		Thread.Sleep(20);
		PSU_receiveBuffer = PSU_receiveBuffer + serialPort_PSU.ReadExisting();

		if (PSU_receiveBuffer.Contains("QL355TP"))
		{
			MessageBox.Show("QL355TP PSU Found!");
			break;
		}

		else if (dev_chk_timer >= 100)
		{
			MessageBox.Show("QL355TP PSU Not Found!");
			break;
		}

		dev_chk_timer = dev_chk_timer + 1;
	}

	return true;
}​
0 Kudos
Message 9 of 11
(2,334 Views)

Open NI-Max, under Devices and Interfaces, what does that screen look like for that connection?  Are the connection settings correct for that instrument?

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 10 of 11
(2,299 Views)