Exemple Vi GPIB

Bonjour, 
Je dois automatiser un flash tester 5300 de chez ESi en tant que petit projet. L'equipement a une trentaine d'année donc il ne reconnait pas les commandes spécifiques Labview tel que *IDN? etc mais j'ai trouvé les commandes propre à l'appareil qu'il faut lui envoyer. Je tourne sous Labview 8 et j'utilise une communication GPIB/USB de chez Agilent. Pour faciliter le travail j'ai ouvert un exemple GPIB mais quand je configure la face avant avec l'adresse de mon équipement et la commande à envoyé, j'obtient l'erreur 0 comme quoi il y a une erreur de connexion mais que le VISA marche parfaitement. J'aimerais savoir pourquoi ? 
PS : J'ai fais quelques tests en ouvrant un assitant d'instrument E/S au quel j'ai mis en place des requetes avec mes lignes de commandes trouvées dans la doc et ça marche.
Cordialement.
Résolu !
Accéder à la solution.

Bonjour, 
Depuis j'ai fais autre chose. Vous verrez ci-joint le programme que j'ai fais.
Sur MAX il n'y a aucun problème, j'ai tout installé, le périphérique est détecté etc.
Mais au lieu d'utiliser l'exemple GPIB étant donné que je suis sur un adaptateur USB/GPIB de chez Agilent j'ai préféré utilisé la communication avec les VISA (voir ci-joint). J'aimerais savoir s'il y a moyen de garder en mémoire mes lignes de codes afin de juste modifier les valeurs numériques ? Car cela m'oblige a rentrer pour chaque configuration la ligne complète ca en devient vite agaçant. 
Je vous remercie d'avance. 
Pièces jointes :
VISA GPIB FASH-TESTER fonctionnel.vi ‏41 KB

Similar Messages

  • GPIB mon appareil ne répond pas...

    Bonjour,
    Je veux commander un appareil par le port GPIB. La carte GPIB est visible depuis le MAX, j’ai utilisé l’exemple LABVIEW<->GPIB.vi pour envoyer les commandes mais l’appareil ne répond pas. Par contre, la direction est bonne et les commandes aussi (car elles sont les mêmes que j’ai envoyé en utilisant LABWINDOWS/CVI et qui marchaient). Le seul truc est que il y a une histoire de « \n » (LF) qu’il faut ajouter à la fin de la commande. J’ai ajouté ce « \n » dans mon programme avant du module GPI Write et j’ai mis aussi le mode à 0…et voilà ça ne marche pas. Si vous avez des solutions je vous remercie…
    egma

    salut,
    si ton programe en CVI fonctionne, c'est que le problème ne viens pas du drivers.
    concernant la commande envoyé du devrais verifier qu'elle est bien formatée, si tu utiliser de constante de chaine, verifier qu'elles soient dans le bon mode d'affichage ( normal, / , hexa)
    pour verifier ce qui passe sur ton bus GPIB tu peux visualiser les donnée via le GPIB Analiser.
    voici un document qui te donnera les infos utiles.
    cordialement
    MobyJ

  • Gpib esclave

    Bonjour,
    J'utilise Labview pour piloter une machine via differentes cartes IO. Le tout doit pouvoir se piloter à distance via le GPIB, mon vi sera donc un esclave.
    J'avais dans l'idée d'utiliser la foncion "GPIB Read" et tester les données reçues jusqu'à lire une commande connue de mon vi, par exemple "*IDN?", mais lorsque je lance mon vi j'obtiens une erreur d'adressage, que je mette une adresse ou non. J'obtiens egalement des erreurs en voulant utiliser l'exemple "Labview GPIB" et le tutorial pour faire communiquer 2 PC ensembles.
    Merci de votre aide

    Bonjour,
    D'après ce que vous dites vous souhaitez utiliser un équipement (PC avec cartes d'acquisitions, etc) comme un instrument GPIB ?
    Dans ce cas il faut désactiver la propriété "System Controller" de la carte GPIB qui est activé par défaut.
    http://digital.ni.com/public.nsf/websearch/8A66FD984B07024D49256B5700749536?OpenDocument
    Normalement si cette étape est respectée cela doit fonctionner.
    N'hésitez pas à ouvrir l'outils NI Spy et faire une capture lors de votre essai d'écriture / lecture sur le bus GPIB (démarrer » Programmes » National Instruments » NI Spy).
    Si cela ne marche pas envoyez votre capture.
    Cordialement,
    Da Helmut

  • Synchronis​er mesure analogique​, tachymètre et GPIB

    Bonjour,
    J'ai une carte PCI-6289 que je voudrais programmer avec Labview 8.2 / DAQMX.
    Sur cette carte je voudrais faire une acquisition bufferisée de mesures analogiques et d'un signal TTL issu d'un tachymètre (mesure de vitesse) en même temps.
    Est-il possible de réaliser cette fonction avec cette carte et si oui existe des exemples ?
    En plus du mode cité ci-dessus j'ai un autre mode de mesure où il est question de mesurer de façon synchrone :
    - Mesure analogique sur carte PCI-6289,
    - Mesure tachymètre sur carte PCI-6289,
    - Mesure GPIB issu d'un analyseur de puissance.
    Ces mesures doivent se faire à 1 Hz
    Le vendeur de l'analyseur de puissance m'a indiqué que l'appareil disposait d'une entrée Trigger.
    Quel est le meilleur moyen pour synchroniser tous ces équipements ? 
    D'avance, merci pour votre aide.
    CAPRA

    Bonjour,
    Merci pour votre réponse.
    Le Tachymètre génére vraisemblablement une fréquence que je dois convertir en vitesse.
    J'ai vérifié dans max en créant une tache DaqMX s'il m'étais possible de "Triger" la mesure (voir copie d'écran en PJ), et helas je ne trouve rien à ce sujet.
    L'autre inconnue pour moi est de savoir si je dois utiliser une horloge externe à 1 Hz ramener à la carte PCI-6289 puis à l'appareil GPIB, pour synchroniser tout le monde (Analogique/Vitesse/GPIB) ou si je dois utiliser l'horloge interne pour déjà synchroniser Analogique/Vitesse et ensuite sortir cette même horloge si elle disponible sur le SCB68 pour qu'elle soit exploitable par l'appareil GPIB...
    Merci.
    CAPRA
    Pièces jointes :
    DaqMx_Freq_Task.JPG ‏46 KB

  • How to plot data from a GPIB function generator

    I am doing a litle application with Visual C++ and the ComponentWorks++ to
    control a GPIB device. I am tring to Plot a CNiGraph with data coming from
    the GPIB function generator. I use the code below to write/read the device
    and to Plot the graph. It give me some results but for exemple, if I
    request a sin wave it give me something that doesn't look like a sin and if
    I request a square wave it give me about the same wave... So I want to know
    if the problem is in my code or maybe it's because my device is just a
    emulator not a real func generator. But I guest I am doing some kind of
    convertion error.
    CNiInt16Vector vBuffer(100); // Should I try CNiReal64Vector or something
    else ?
    m_Visa->Write(m_strC
    ommande); // Write to the device, this works well
    m_Visa->Read(vBuffer); // Is it the right way to do reading ?
    m_Graph.PlotY(vBuffer); // This Plot some data, but it doesn't seem right
    Could somebody bring the light on this?
    Thanks alot!
    P.S. Sorry for the bad english...

    Ares:
    I have two suggestions about common problems in VISA.
    (1) How is m_Visa defined? There is occasionally some confusion about which VISA class should be used for this purpose. CNiVisaSession is the class designed for this purpose.
    (2) How is the instrument returning data? Usually instruments return some sort of header before the actual data.
    You may want to contact National Instruments Technical Support to continue this discussion. You can reach our telephone support at 1-800-IEEE-488 or email support at http://www.ni.com/ask.
    Good Luck,
    Chris Wood
    Applications Engineer
    National Instruments

  • Un peu d'aide sur le GPIB ?

    Bonjour,
    Je suis novice en dialogue GPIB. Je dois contrôler (commander en vue de récupérer les données retournées par l'appareil) un générateaur Haute Tension HCN du constructeur FUG. Le fabricant propose un petit soft (qui fonctionne très bien) dont j'ai voulu me servir pour écrire et lire sur le port GPIB. Cependant je n'arrive pas à synchroniser les 2 actions et vue mon expérience dans ce domaine,j'ai bien peur de m'attarder un peu trop longtemps sur le sujet. Je n'arrive pas à trouver un exemple simple où l'on peut envoyer et récupérer des données par GPIB, en existe-t-il un ? Autre question: Est-il nécessaire de réinitialiser à chaque fois le port ?
    Cordialement,
    CAZALETS Cédric

    Bonjour,
    La première chose à faire est de cliquer sur "Measurement&Automation Explorer", aller dans "Périphériques et Interfaces", cliquer-droit sur l'interface GPIB0 et sélectionner "Scan For Instruments".
    Si votre instrument est sous tension et que la connexion est correcte, il sera détecté et apparaîtra dans la fenêtre de droite.
    Vous pourrez alors cliquer-droit dessus et faire "Communicate With Instruments" pour lui envoyer les commandes et recevoir ses réponses. Cela nécessite de connaître les chaines de caractères supportées par votre instrument. Elles sont logiquement dans le manuel.
    Une commande standard est "*IDN?" pour demander à l'instrument de décliner son identité.
    Si ceci ne fonctionne pas, ce n'est même pas la peine d'aller plus loin. Vérifiez l'installation, la connectique, triturez la documentation de l'appareil pour voir s'il n'y a pas une manip spéciale à faire pour que l'appareil puisse être piloté en GPIB...
    Après deux possibilités :
    -Vous utilisez le VI "LabVIEW<->GPIB.vi" pour communiquer avec votre instrument via les chaines de caractères que vous utilisiez déjà plus haut.
    -L'instrument possède un driver en LV et, s'il est validé par NI, sera en libre téléchargement sur : www.ni.com/idnet. S'il n'est pas sur ce site, renseignez-vous auprès du constructeur pour savoir si ce driver existe.
    Le contenu du dossier que vous téléchargez doit être intégralement copié dans le répertoire C:\Program Files\...\LabVIEW\instr.lib\ afin que les fonctions apparaissent sous forme d'icônes dans la sous-palette "Drivers d'Instruments" de la palette "E/S d'instruments". Si ce driver est de type IVI, il sera fourni avec des exemples.
    L'avantage du driver est de disposer d'un jeu de fonctions dédiés à l'appareil et d'affranchir le programmeur de la recherche des chaînes de caractère ou de leur conversion au format numérique.
    Le driver est de la responsabilité du constructeur et NI ne le supporte en aucun cas.
    Cordialement
    Frédéric
    National Instruments France

  • Communication GPIB avec un keithley 2000

    Bonjour à tous,
    j'essai d'utiliser mon multimètre keithley 2000 en communication GPIB sur mon labview 8.6. J'ai télécharger un vi (pièce jointe) qui est un exemple. J'arrive à initialiser sans pb... mon pb se situe au niveau de la fonction lecture. Le sous vi atteint le time out de 25s et me renvoie l'erreur suivante :
    L'erreur -1073807339 s'est produite à : VISA Wait On Event dans Wait for RQS.VI:1->_ke2000 Wait for SRQ.vi->ke2000 Data Read Single.vi->Keithley channel test.vi
    Raisons possibles :
    VISA:  (Hex 0xBFFF0015) Le délai d'attente (timeout) a expiré avant que l'opération ne soit achevée.
    Je ne comprends pas du tout ce qui se passe, quelqu'un aurait-il une idée !!! Merci à tous
    Attachments:
    Keithley channel test.vi ‏48 KB

    duplicate post

  • Protocole gpib

    Bonjour,
    je suis actuellement à la recherche du protocole GPIB au complet. En effet je n'arrive à trouver que des brides.
    Voici mon problème:
    Je souhaiterais récupérer les données passant sur un câble GPIB afin de les modifier (transformer un "a" en "b" par exemple). Pour cela j'utilise un microcontrôleur afin de détourner les 8 fils de données. Mais je me suis vite rendu compte que j'aurais besoin de plus (ATN, SRQ, etc ...) que j'avais relier directement sans passer par le micro.
    Le problème reste au niveau de la reconnaissance de l'appareil. Quand avec MAX on lance un scan de reconnaissance le protocole a l'air bien spécifique (NDAC passe à l'état bas, etc ....) et je ne trouve pas beaucoup d'information sur le sujet.
    Ma question est donc : Quelqu'un a t'il un lien vers un endroit ou est expliqué toutes les subtilités du protocole ?

    Bonjour,
    Vous trouverez plus d'informations sur Internet en general, GPIB etant une norme et non un standart uniquement National Instument.
    Je vous conseille d'effectuer des recherches sur Internet avec la référence de la norme "IEEE 488" ou de voir directement sur le site IEEE.
    Cordialement
    Paolo_P
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • GPIB Command

    I just want to know where I can find a list of Command I can use with a GPIB
    device. For exemple commands like "*IDN", "SOUR:FUNC SIN;" "*TST?". I
    specialy want to know command for Function Generator.
    I have search the NI web site but I have not found anything.
    Thanks alot.

    It really depends on the GPIB device. The best bet is to look in the manual for the Function Generator. If you don't have a manual, try the Function Generator's website.

  • Preciso de um conversor de 4 a 20mA para GPIB. Voces fornecem

    Gostaria de saber se vocês fornecem uma solução para medição de sinal de corrente padrão de instrumentação de campo (4 a 20mA) para protocolo IEEE 488 (GPIB). Um cartão de conversão ou algo deste tipo?

    Acho que acidentalmente você colocou a sua pergunta no grupo de TestStand, que é um Software utilizado para automação de testes.
    Basicamente a linha de produtos da National inclui entre outros produtos, instrumentos/placas para serem acoplados ao seu micro, chassis PXI ou fieldpoint bus.
    Para leitura de correntes e tensões, a National Instruments oferece o Digital MultiMeter NI-4060 que é uma placa padrão PCI que quando acoplada ao seu micro pode efetuar leituras de corrente, tensão e resistência.
    Na área de GPIB a National Instruments oferece placas GPIB e conversores de bus tipo GPIB-USB, GPIB-Ethernet, etc.
    O catalogo online pode ser acessado a patir da página www.ni.com
    Além disso, existe um grupo de discussão específico para instrume
    ntos GPIB em exchange.ni.com. Em geral as perguntas são feitas em inglês, para que um maior número de usuários tenha acesso as perguntas e respostas.
    Roberto Piacentini
    Applications Engineer
    National Instruments
    www.ni.com/support

  • GPIB Ethernet/1​00 Performanc​e

    Does anyone have some real world peformance measurements on the transfer speeds of the NI GPIB-Ethernet/100 box. I am very disappointed in the performance of a block read which is approximately 6ms/byte transfer (tested from 20 bytes to 32kbytes block transfers). This is on a 100 Mb Ethernet. I can ping the box with 64 byte round trip transfers at ~0.7ms/packet.
    I almost feel that the GPIB-Ethernet Box is not buffering my GPIB transfers.
    Thanks

    Actually ignore my question. My transfer speeds are ~6 microseconds/byte (not milliseconds!). This is still a little slower than I would like, but not totally unreasonable! Note the vertical axis in the included plot (pdf) is in ms, so the linear coefficient in the fit equation is 13 microseconds/(16 bit word).
    Attachments:
    GPIB_ENET_Plot.pdf ‏25 KB

  • How can i get the count vaule from GPIB?

    I want to get the count waule from GPIB ,but I find that the vaule I get from GPIB now is the trace vaule ,
    so I ask How can i get it.

    The count of what? What kind of instrument are you using?

  • Old visa open, error code 1073807343, using VISA with a GPIB device, and VISA resource names

    Hi everyone,
    I'm trying to get a SRS model SR720 LCR meter (manual on this page) working with LabView, connecting it to my PC with an Agilent 82357A GPIB/USB interface (manual on this page). I'm running MAX version 14.0, and NI-VISA version 14.0. I'm running LabView version 13.0f2, 32 bit.
    I followed the directions on this page, and I'm pretty confident I can communicate with my LCR meter, because I can go to NI MAX->GPIB0::17::INSTR under "devices and interfaces", then go to the VISA test panel, go to the I/O tab, and I can enter a few commands from the SR720 manual, like changing the frequency, and I see the light on the LCR meter change to what I just told it to do. Here is a picture, just to illustrate it:
    Also, if I do the *IDN? command, it returns "
    9: Write Operation (*IDN?)
    Return Count: 5 bytes
    10: Read Operation
    Return Count: 41 bytes
    StanfordResearchSystems,SR720,08087,1.03\n
     So, that's good too. I also made the alias of this device "MyLCRmeter", but that shouldn't matter for now.
    Now I'm trying to get it to work in a more usable way. The SR7xx drivers that LabView found for me came with a couple sample programs, one called "Getting Started.vi". I tried to just simply see if it worked, changing the "instrument descriptor" field to "GPIB0::17::INSTR", since that's the one that seemed to be the right device in MAX. Here is a picture of the front panel of "Getting Started.vi":
    Trying to run it like this gave me this error (code -1073807343):
    Old VISA Open in SR715/720 Initialize.vi->SR715/720 Getting Started.vi
    Doing a bit of searching on these forums, I found these few threads (1 2 3), which seem to tell me that, since this program was written, the way you open VISA has changed. In the 2nd of those links, one guy said:
    You just have to replace the Old VISA Open function with the VISA Open that is on the Instrument I/O>VISA>VISA Advanced palette. When you do that, the wire to the string that was used for the resource name will be broken. Delete the string and make the actual VISA Resource Name visible on the front panel. Wire the VISA Resource Name control to the connector pane where the string control was (upper left connection).
    So, I went into the sub-VI Initialize.vi, and did that. Here is a picture of what the front panel and block diagram of the sub-VI Initialize2.vi (I changed the name in case I screwed things up, but I'm pretty sure the new one is the one being called by Getting Started.vi) looked like before I changed anything (you can see the Old VISA Open):
    and here it is after replacing that with the regular VISA Open, deleting the instrument descriptor string and replacing it with a VISA resource, and connecting that to the VISA Open:
    However, as you can see in the image above, and it seems like someone else had this problem in the 2nd thread linked above, I don't see my device listed in the drop-down menu (even if I refresh), only "LPT1" (I don't even know what that is):
    No, I wasnt able to select the visa resource from the pull down menu. somehow it seems disabled or something.
     If I just enter the VISA resource name from MAX manually, GPIB0::17::INSTR, and save and try running that, I get the error(code -1073807346):
    VISA Open in SR715/720 Initialize2.vi->SR715/720 Getting Started.vi
    So I'm not sure where to go from there, or why it's not in the drop down menu to begin with. I'm sorry if I've missed something but I've searched about as far as I can go. If I had to guess, maybe one thing could be that in MAX, under Tools->NI-VISA->VISA Options->My System->Conflict manager, I have both Agilent VISA and NI VISA enabled; I know sometimes problems arise from conflicts between different software fighting over the same hardware. Is this okay, or do I need to change it?
    Thank you and please let me know if there is any other code/screenshots I could provide that could help!

    Hi, I did indeed enable NiVisaTulip.dll under MAX->Tools->NI-VISA->VISA Options->My system->Passports->List of passports. Sorry, I should have mentioned that explicitly.
    By install as primary, do you just mean as it is here, where it is selected as the "Preferred VISA"?
    Or somewhere else? I installed NI-VISA first I believe, and then the Agilent one, and during the installation of the Agilent one, I'm pretty sure I made it not the primary. Here's what I have in the Agilent (it's called Keysight now) Connection Expert software:
    I also have this under the "Keysight 488 options" tab:
    Should that be checked? I don't actually know the role of VISA vs 488 here...
    What could I try?
    Thank you!

  • Data-acquisition with NI 6036E DAQ card & GPIB using an external trigger

    Hi all,
    I hope somebody could give me some help with the following and answer some questions:
    Simple system description:
    Labview 6.1
    PCI-GPIB card
    6036E DAQ card
    In my system, I am using an external analog trigger signal (A) for continuous data-acquisition. Characteristics of the analog trigger signal (A) are: ~40 Hz, signal height +1.48V, triggered by rising edge (the analog trigger signal (A) could be changed to a TTL signal). Each data-acquisition is done within ~1.0 ms after the rising edge of the trigger pulse. The timing of the data-acquisition and analyzing procedure is controlled by execution in a sequence structure placed in a loop.
    Now, I connected a power meter to the system, to measure the laser power during the data-acquisition. The power meter has two options to provide the laser power data:
    a) via analog signal output (voltage corresponds to laser power in watts)
    b) via GPIB (direct output reading of laser power in watts).
    Problem:
    During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.
    How do I do this in Labview programming for the following two situations?
    a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    b) If I use the GPIB connection of the power meter. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    An other possibility would be to trigger the power meter directly, so it outputs constantly power meter values at ~40 Hz. How could I than acquire 1 power meter value (at a certain time im my sequence structure) via analog input at DAQ card or GPIB?
    Additional questions:
    How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?
    How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?
    It would be very nice if somebody could give me some help.
    Kind regards,
    beam

    Hi beam,
    I just want to verify that I understand your situation correctly:
    An external trigger signal (A) is wired to one of your input channels (e.g. CH0) to trigger data acquisition of a second channel (e.g. CH1). Your power meter is connected to an analog input channel, which you would like to trigger with a certain rising edge at some of your sequence structure.
    Problem:
    During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.
    How do I do this in Labview programming for the following two situations?
    a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    If a task has been configured to acquire signal from one analog channel, it's not possible to run a second analog input task or to add a second channel on the fly. You had mentioned that it's possible to read from the instrument through GPIB. Is it possible to perform a software trigger such that at a certain frame of your structure, when the trigger signal A reaches voltage "x", a GPIB command is written to your power meter to query a measurement reading?
    Additional questions:
    How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?
    You do not need to explicitly configure the PFI0 line as an input. If you want to use it as an input such that it acts as an analog trigger, simply wire the trigger signal to this pin. When configuring the trigger in your software, specify PFI0 as the trigger source.
    How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?
    You can try using the Limit VI to find out when the trigger signal reaches a certain level, and count how many times this level is reached. Similarly, you can use this as the condition to execute GPIB commands.
    Hope this helps,
    Lesley

  • Error when running software on computers w/o GPIB interface card

    I'm writing some simple GPIB I/O software using the VISA libraries and I'm getting an error when I run the program on a computer that doesn't have a GPIB card. The error is "The application failed to initialize properly (0xc0000142). Click on OK..." The program runs and works fine on the machine that is hooked up to GPIB devices, but I would like to be able to use my laptop for development. I've installed version 2.3 of NI-488.2, so all the required dll libraries are there.
    Thanks in advance,
    Jeff

    Unless you're using all IVI drivers, there is no built in simulation mode. As long as you make calls to VISA that expect a GPIB board, you'll get errors. Even if you had a gpib board, if you write your code correctly, you would also get errors when the board doesn't find an instrument to write to or read from. The only solution is for you to write your own simulation code. Encapsultate your write/read functions with case statements that skip the driver calls and return simulated data.

Maybe you are looking for