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