Discussions au sujet de NI LabVIEW

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

trouble with setting and communicating by GPIB and VISA 488-2

Hello,
I am facing an unexpected trouble while attempting to communicate by GPIB-USB-HS with an Agilent E5263A. Agilent E5263A is an SMU 0-200V. It can be used as a Voltage or Current source, while measuring simultaneously the current or the voltage respectively. 


I will try to describe the problem as much as I can.
The command to set a Voltage is DV channel, value, range.
The command to read the voltage is TTV channel. Something very simple.

 

I used to create a labview program that was working well with this instrument. But now, It does not work and I really cannot understand why. 

 

First, I had 5 GPIB cables connected on the rear side of the instrument (because I am working with 5 instruments). This caused some troubles like IDN?\n answer in binary informations ! Or Agilent technologies E5263A was returned as Agile|t Teghnologie,<F0g>... something like that. 

I read some comment on forums, and I found that I should not connect more than 2 GPIB cables together. I did it, and I recovered the problem. Next step after IDN?\n, I am trying to send command to the instrument. Those commands have been used in several tabview programs that I made before, and it was working. Now, it does not work. 


0- the GPIB-USB-HS cable is directly connected to the GPIB port of the instrument, and the USB is connected to the USB-C port of MacBook Pro (2017). I disconnected all the other instruments. I set GPIB port correctly on the instrument. 
1- NI MAX detect the instrument correctly with the correct GPIB address.
2- IDN?\n command returns the correct name of the instrument i.e Agilent Technologie, E5263A ...
3- the SMU is not broken because I can set manually a voltage and read the value on an oscilloscope.
4- When I send DV command via the interface NI MAX "communicate with instrument", there is no error on NI MAX. However, I get an error on the LCD panel of the instrument.

 

The problem is that I write EXACTLY the command that I found in the programming guide of the instrument. Same for TTV command that I copy-paste from the programming guide. Several weeks ago, it was working.

 

5- To discredit Macbook 2017, I used NI MAX to send commands to another instrument(not an Agilent one), and it works perfectly. I made also a tabview program to control 4 instruments, and it works.
Now, when I make labview program for E5263A, it does not work anymore. Why ?
--> Is there any possibility to destroy the GPIB card inside the instrument because of sending too many instructions in short time ? Like reading data every 1msec, or writing DV command every 1msec ?
I changed the GPIB-USB-HS cable and replace by another one. I have the same problem.
I changed the MAC for a Window7 PC (same Labview 2012) and I have the same problem.
I downloaded and installed the latest version of NI MAX on the MAC. I use NI MAX 2012 on the PC.
The Labview version is the same.
Any idea ? I suppose that the GPIB card of the instrument has been damaged because I created a Tabview program that was writing DV and reading TTV every 1msec for several 10sec. This is maybe too much. 

0 Compliments
Message 1 sur 7
2 653 Visites

You are in the french part of the forum. Please ask your question in french.

 

You will have more answer in english forum, try to post your problem here : https://forums.ni.com/t5/LabVIEW/bd-p/170

 

Do you check that there no GPIB Id in conflict with your 5 instruments.


Do you check communication with supplier software ?

 

 

“En science, la phrase la plus excitante que l'on peut entendre, celle qui annonce des nouvelles découvertes, ce n'est pas "Eureka" mais c'est "drôle"
Isaac ASIMOV
0 Compliments
Message 2 sur 7
2 640 Visites

Merci pour vos commentaires. Poursuivons en français. 

1- Do you check that there no GPIB Id in conflict with your 5 instruments.

La connection est : instrument -- GPIB port -- GPIB-USB-HS -- adapter USB-USB-C -- MacBook Pro 2017.

J'ai bien évidemment au préalable défini l'adresse GPIB sur l'instrument manuellement (port 19), et je le retrouve dans NI MAX après un scan instrument. Aucun autre instrument n'est connecte en parallèle. 

 

2- Do you check communication with supplier software ?

Via NI MAX, je peux communiquer avec l'instrument *IDN?, *CLS, *RST. L'appareil passe en remote. 

 

Lorsque j'envoie des commandes Write/Read pour Set Voltage(DV)  and Read Voltage (TTV), l'instrument affiche une erreur de timeout. Le timeout est défini a 10sec dans NI MAX. Normalement, ces commandes sont exécutées dans un délai de 1msec. Cela marchait il y a quelques semaines. 

 

On pourrait penser que cela vient du Mac + adaptateur USB-USB-C. 

Mais en faisant la meme operation sur un PC Windows 7 avec la meme version de NI MAX et de Labview 2012, je rencontre le meme probleme. 

 

Comment detecter un défaut possible dans une carte GPIB d'un instrument ? 

 

0 Compliments
Message 3 sur 7
2 627 Visites

For analog value, do you check your decimal separator . or , ?

It  could be a way of error if you don't use the good one.


When it works, it was with the same program ? in same context ?

“En science, la phrase la plus excitante que l'on peut entendre, celle qui annonce des nouvelles découvertes, ce n'est pas "Eureka" mais c'est "drôle"
Isaac ASIMOV
0 Compliments
Message 4 sur 7
2 615 Visites

Dear Michael,

I checked the , or . definition : it is correct. Actually, I use " . " as decimal. (Tabview 2012, English version, win 7). 

 

I use the same program with the same command. Up to a few days ago, it was working.

 

I think that the GPIB card inside the instrument, is in trouble. 

 

There are several settings in NI MAX that I don't master so much. 

For instance : 

- use ibln to test device state

- send EOI at end of Write

- Terminate Read on EOS

- Set EOI with EOS on Write

- 8-bit EOS compare

- 0 EOS byte

 

Some command are working using \s (space) \n (linefeed) \r (return), and other like DV to set voltage seem to work only WITHOUT \n means without generating error. 

So I am confused because \n or \s need to be used for some command, and sometimes it is not needed. 

This is unexpected. 

For example, when I got an error, I am next writing *RST, the error is still there. Then I write *RST\n, the error disappeared. Now, writing CN 1,2 does generate error (without \n). 

Next, DV 1,20,1 does not generate error (without \n). Then TTV 1 does not generate error, but I need to read the value. So after Writing TTV 1, I push READ, but this create EABO error (timeout). So I cannot read the value of voltage. 

However, even DV command (set voltage) is sent, the E5263A does not output 1V as expected. I have 0V on my oscilloscope. However, the CN command should set the output to ON state. Therefore, writing CN, then DV should lead to 1V on the oscilloscope. I have nothing. 

This kind of basic command have been used for 7 years without troubles. 

 

Yours

Laurent

 

0 Compliments
Message 5 sur 7
2 608 Visites

I don't have other idea. As you said, the best way to find the error is to try with another GPIB card in your equipment.

 

Concerning GPBI command that send you a reply after request, in MAX you must use the "query" button instead of "write/read".

 

Michael

“En science, la phrase la plus excitante que l'on peut entendre, celle qui annonce des nouvelles découvertes, ce n'est pas "Eureka" mais c'est "drôle"
Isaac ASIMOV
0 Compliments
Message 6 sur 7
2 600 Visites

Thank you Michael 

yes I know the query button, but it works only if the command ends by " ? " like *IDN? query. 

Here, it appears that I have a conflict between using or not \n \s characters. 

 

In the instrument, when you ask for reading a value, the programming guide indicate a write function TTV, then a READ value. This is operated using labview VISA write then visa read. 

 

By the way, thank you for your interest in my problem, I have contacted Keysight Japan, and I will ship the instrument to check GPID card. 

 

I think that the trouble appeared because I made a new tabview program that intends to fastly read data like every 1msec. The program is optimised for that purpose. However, it seems that the instrument could not follow the flow of request (read data every millisec) and got in trouble.

The Labview program is based on event consumer approach which lead to mostly IDLE mode, while reading data as a priority. However, I should have placed a Wait 10msec in the while loop .... I missed it, then started the program, then came some errors that I could not recover yet.

Yours

L. 

0 Compliments
Message 7 sur 7
2 593 Visites