Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout on VISA Readon PSP-2010

Hi All,

I am using VISA to communicate (through Serial channel RS-232) with PSP2010 power supply (from Instek). I am doing a simple write and read. I am getting time out on �read� function. Here is a list of things I have done so far.

1- I have tested the LoopBack mechanism and everything seems to be fine.
2- The power supply shows the word �remote� indicating that my write from my computer is valid. My write the commands are (L or U, according to their spec). So PSP2010 gets my command and recognizes it.
3- But I get a time out on the power supply. I have set the time out to 2o seconds.The response for (L) example is 37 characters +. I have entered 37 bytes for my VISA read(FYI). I do get nothing. The erro
r code is:

Error -1073807339 occurred at VISA Read in ReadVLimit.vi->TestReadingVLimit.vi
Possible reasons:
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.



Has anyone created a driver for Power Supply PSP2010 from Instek?

Any help is highly appreciated.

Best regards,
Farshid
0 Kudos
Message 1 of 11
(6,608 Views)
Farshid,

It sounds like you are on the right track with your troubleshooting. My best guess is that there may be more characters than you expect being sent by the device. Try using the VISA Bytes at Port.vi function in Functions Palette > Instrument I/O > Serial. Rather than telling the program to read 37 characters from the serial port, wire the output of the VISA Bytes at Port VI to the bytes count input of the the VISA Read. This will force the program to read however many bytes are at the port, and allow you to better troubleshoot what may be happening.

Regards,
Craig Reynolds
Message 2 of 11
(6,606 Views)
Hi Craig,

Thanks for your suggestion. I tried that I read only ZERO bytes back.

Any command that has some response back from power supply (read) times out. I managed to issue other commands like setting voltage or current (commands with no read data/response) works fine. Basically I get nothing back from power supply.

I tried these commands both via HyperTerminal and also via my LabView VISA code the results were the same.

Could this be caused by some settings on my computer (like buffer size, timing, delay�)? Any recommendation/suggestion is highly appreciated.

Once again thanks for your time and effort.

Take care,
Farshid
0 Kudos
Message 3 of 11
(6,606 Views)
Farshid,

Have you had the program/device working previously where data was being sent back? Occasionally, instruments may have to be configured in their on board menu to communicate via serial and/or 488.2, so check to see if this is the case with your instrument. If both HyperTerminal and VISA communications do not work properly, but a loopback test does, and the Bytes at Port returns 0, then that leads me to believe that the instrument is not sending back the data. This could either be because it is not working properly, has not been configured properly, or because the command was not issued properly. Be sure that you end the command with the proper termination character for your instrument (check the user manual). Since you are able to ge
t information to the device and see that it receives it, you may want to check with the manufacturer to see if they might have information on why it may not be sending data back.

I hope this helps.

Regards,
Craig Reynolds
0 Kudos
Message 4 of 11
(6,606 Views)
Thanks Craig. I will do that and let you know.

Take care,
Farshid
0 Kudos
Message 5 of 11
(6,606 Views)
Hi all,
This is a very old thread, but just in case someone still reads it. I haven't used VISA, but rather Java aand the software at Instek's website. What is described looks very much like what happens when a null modem cable is used instead of a cable wired as indicated in the PSP-2010 manual. One should use this non-standard wiring to get it to work. I suspect that the optoisolator is powered from the RS-232 line, for outgoing signal.

Cheers,

Pedro.
0 Kudos
Message 6 of 11
(6,307 Views)

Hi friend;

I recommed that you must be sure of the serial cable and the two connectors on the rear of you power supply and the PC, be sure that pin 2 on the PC side meet pin 3 on the instrument side, and pin 2 in the instrument side must meet pin 3 on the PC side and leave PIN 5 as it is.... check this and let me know... bye

 

Muhammed Al-Ani

PI- Abu Dhabi

Message Edited by Muhammed_PI on 10-21-2007 03:34 PM

Muhammed Abdulrahman AL-Ani
0 Kudos
Message 7 of 11
(6,298 Views)
Bonjour,
 
Je voulais pas créer un post et celui-ci me parrait le plus adapté.
J'ai eu quelques soucis pour piloter un alimentation INSTEK PSP 405 mais j'ai fini par y arriver.
Les commandes ou il faut saisir des valeurs ex: V 12.50 doivent comporter des espaces entre la commande et la valeur.
Pour le mode de communication de la RS232:
- il faut bien envoyer du 12V sur la broche 4 de l'alimentation sinon elle ne repond pas.(on peut quand meme la piloter le cas échéant)
 
Bref ca fonctionne mais je me pose encore deux questions:
 
-comment definir la taille du buffer à lire (j'ai mis 320 octets un peut au pif)?
-peut-on ce servir du port série pour envoyer du 12v, je doit piloter 2 de ces alimentations avec des interrogations, et je me voit mal rajouter une troisième alim sur le banc de test juste pour alimenter les ports série!?
 
Je joint mon bout de prog si ça peut aider quelqu'un.
 
Cheers,
 
 
0 Kudos
Message 8 of 11
(6,172 Views)
Bonjour Lag66,

J'ai regardé le manuel du INSTEK PSP 405 et il faut effectivement mettre 12V sur la broche 4.  Les niveaux de voltage pour RS-232 sont de -12 à 12V.  Donc, 12V est acceptable sur cette ligne.  Par contre, il ne faut pas tirer trop de courrant car les fils sont très mince.  Je crois que ce signal est simplement une référence et donc la demande en courrant sera surement négligible.  Il faudrait parler au manufacturier pour plus de détails.

Je crois qu'il va effectivement falloir une alimentation additionnelle sur le banc de travail car le connecteur de port série d'un ordinateur n'a pas un signal 12V sur la broche 4.  Il vous faudra surement faire un cable spécial pour cette application.  Une suggestion est d'utiliser le bloc d'alimentation de l'ordinateur.  Je crois qu'il y a habituellement un signal 12V sur ces blocs. 

Pour la grosseur du buffer, ça dépend vraiment de l'application.  En général, si vous recevez toujours des messages de 12 octets de votre instruments, un buffer de 12 octets serait acceptable.  Par contre, je suggère de mettre un buffer beaucoup plus gros pour éviter de perdre des donner.  Vous devriez voir des erreurs si il y a quelque chose qui cloche, donc si ça fonctionne bien avec 320, continer à utiliser 320.

__________

Here is the thread in english:

From Lag66:

Hello,

I wanted to create a thread, but this one seemed appropriate.  I've had some problems programming a power supply (INSTEK PSP 405) but I was finally able to do it.
Spaces must be included between the command and the value when using commands to set values (ex: V 12.50).  As for RS-232, you do need to send a 12V signal on pin 4 of the serial connector.  If not, the power supply does not respond.  In any case, it works but I still have two questions:

-How do you choose a buffer size to read (I put 320 bytes randomly)
-Can I use the serial port to send 12V?  I need to program 2 power supplies and I don't really want a third power supply on my test bench just to power the serial port.

I've attached my program if anyone is interested.

Cheers,

From me:

I've taken a look at the manuel for the INSTEK PSP 405 and you do need a 12V signal on pin 4.  The voltage levels for RS-232 are -12 to 12, so that signal is acceptable on that line.  However, you have to make sure it is not pulling to much current, as the wires are quite small.  I think this is a logic signal and so it should not use to much current.  You would have to contact the manufacturer to get more information on that. 

I do think you need an additional power supply for this signal.  The serial port connector on a computer does not provide a 12V signal on pin 4.  You will need to make a custom cable for this application.  You can look at using the power supply inside your computer.  I think those power supplies usually have a 12V signal. 

As for the buffer size, it is entirely dependant on your application.  If you always receive 12 bytes, you could in theory use a 12 bytes buffer.  However, I suggest using a larger buffer to ensure that data is not overwritten.  Also, if it currently works with 320, I suggest not changing it.
______________

Regards,
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 9 of 11
(6,152 Views)

This work in my aplication I hope it serves you!

0 Kudos
Message 10 of 11
(4,952 Views)