From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Power supply via GPIB-RS232 converter

Solved!
Go to solution

Hi,

I'm having trouble controlling my Power supply(GWInstek, PSP-603, RS232 port) via GPIB-RS232 converter(http://www.ni.com/en-us/support/model.gpib-rs232.html) in Labview.

My PC has both GPIB and RS232 port, but I wanted to leave my RS232 port for other instrument, so I bought this converter.

So now I have PSP603----RS232 cable(customized by GWInstek, pin2,3 crossed)--->GPIB-RS232 converter-----GPIB cable---->PC. 

 

I searched for other articles and successfully set up my converter to G mode (using GPIB Serial Converter software) and set the baud rate to 2400 which is proper for my PSP-603 as below.(And also got the same result using 'VISA read' and 'VISA write' in Labview.)GPIB5success.png

 

 

But I'm not able to communicate with my PSP-603 via NI Max.(below picture, L\r\n is the command given by PSP-603 Manual. The command works very well when I connect PSP-603 to my PC RS232 port using RS-232 cable. So the instrument or the command is not the problem.)

 

GPIB6fail.png

 

 

What am I missing now? This is the first time using GPIB-RS232 Converter, so everything is new to me. Anything you suggest would be helpful to me.

 

Thanks,

Jounghoon

 

0 Kudos
Message 1 of 7
(4,276 Views)

Check if the gpib rs232 converter uses the correct pinning fot your device. Some devices need straight connections (1 : 1) others need swapped rx an tx lines an sometimes also more swaps in control lines.

 

Anyway I would have used a cheaper usb-rs232 device instead of a gpib-rs232 device.

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(4,248 Views)

@Albert.Geven  작성:

Check if the gpib rs232 converter uses the correct pinning fot your device. Some devices need straight connections (1 : 1) others need swapped rx an tx lines an sometimes also more swaps in control lines.

 

Anyway I would have used a cheaper usb-rs232 device instead of a gpib-rs232 device.

 


Thank you Albert,

But I tested another instrument(which needs straight RS-232 cable connection) using GPIB-RS232 and tried to communicate using proper command set, and failed again.

I think there’s something I missed.

Thank you for your advice, anyway. I will try usb-rs232 device if this doesn’t work in the end.

 

Best regards,

Jounghoon

0 Kudos
Message 3 of 7
(4,244 Views)

Check the user manual.

 

pin 4 is the key point.

0 Kudos
Message 4 of 7
(4,221 Views)

@yytseng  작성:

Check the user manual.

 

pin 4 is the key point.


Thank you yytseng!

I studied about serial port connection little, and read my PSP-603 manual again.

And found out this,2B75B756-599A-4C91-9016-022DC9DB42DE.png

 

 

saying that

’Because DTR is controlled by software, it needs to be set beforehand. Otherwise, it may cause thst 12V can’t be output to PSP and no readback response’!

 

But now that I know this, what should I do? When I tested PSP-603 by directly connecting it to Serial port of my PC, I didn’t do any beforehand setting except matching baud rate, and it worked well.(successfully communicated using Basic Serial Read and Write.vi)

 

It would be very helpful if you can spare more time and explain more about this.

Thank you for kind help!

 

Regards,

Jounghoon

0 Kudos
Message 5 of 7
(4,210 Views)
Solution
Accepted by topic author Jounghoon7

A simple way, just provide an external power +12V to Pin 4 of PSP, and the GND of this external power have to connect to the Pin5 of PSP.

 

For the configure the NI GPIB-Serial converter to provide 12V on the DTR of RS-232, you have to contact with NI support team. I checked the G Mode of this GPIB-Serial converter. However, I can not find any command for configuring the DTR pin.

 

 

 

0 Kudos
Message 6 of 7
(4,198 Views)

@yytseng  작성:

A simple way, just provide an external power +12V to Pin 4 of PSP, and the GND of this external power have to connect to the Pin5 of PSP.

 

For the configure the NI GPIB-Serial converter to provide 12V on the DTR of RS-232, you have to contact with NI support team. I checked the G Mode of this GPIB-Serial converter. However, I can not find any command for configuring the DTR pin.

 

 

 


Thank you yytseng!

I read article below before, but I didn't doubt that this would be the reason for the problem for me. But now that you help me, now I understand and I think I can try the solution you suggested.

I'll try and if it doesn't work after that, I'll write more here for other people.

I really appreciate your nice help.

 

Regards,

Jounghoon

 

 

https://forums.ni.com/t5/LabVIEW/Serial-communication-with-Instek-PSP-603-power-supply/td-p/937202/p...

0 Kudos
Message 7 of 7
(4,186 Views)