Author Topic: Tenma power supply: using the serial port  (Read 7048 times)

0 Members and 1 Guest are viewing this topic.

Offline Mike1Topic starter

  • Newbie
  • Posts: 3
  • Country: au
Tenma power supply: using the serial port
« on: April 12, 2017, 08:20:31 am »
I have recently bought a Tenma 72-2635 triple-output power supply from Element14.  It works correctly when I use the front-panel knobs, but I cannot get any response to commands that I send into the RS232 port.  The instructions are very sketchy, and I don't know whether there is an actual fault in the supply, or whether I am doing something wrong in sending the commands.  For example, the manual claims that sending "OUT1" (without the quotes) should turn ON the output.  I start up Microsoft's Hyper Terminal (Windows XP),  set the baud, stop bits etc as specified,  then type OUT1, and nothing happens.  If I unplug my serial cable from the power supply and terminate it withy a loop-back plug (pin2 connected to pin 3 on a DB9 plug), then OUT1 is reflected to the screen, as it should be -- so the command is atleast getting to the power supply.  In case my typing is too slow, I tried putting OUT1 in a .txt file, then sending the file.  I was able to send that by selecting Kermit protocol and "send as text file".  But the power supply ignored it.
I have also tried replacing Hyper Terminal with the MTTTY communicartions programme, without success.
Am I doing something wrong, or is it the supply?
 

Offline halexa

  • Regular Contributor
  • *
  • Posts: 156
  • Country: se
Re: Tenma power supply: using the serial port
« Reply #1 on: April 12, 2017, 08:50:17 am »
Hi I have a 1 port Tenma power supply that i got working over serial with Python.
Don't know if the protocol is same but could be worth a try

Code:
ser = serial.Serial('COMxx')             #depending on used serial port
ser.write(b'VSET1:12.00')      # set voltage to 12V
ser.close()
« Last Edit: April 12, 2017, 08:51:51 am by halexa »
 

Offline Mike1Topic starter

  • Newbie
  • Posts: 3
  • Country: au
Re: Tenma power supply: using the serial port
« Reply #2 on: April 13, 2017, 11:22:48 am »
Thanks, Halexa.  I prefer not to use python if I can help it, but I will keep your comments in mind.  The 'VSET1:12.00' is the same protocol as mine. 
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gb
Re: Tenma power supply: using the serial port
« Reply #3 on: April 13, 2017, 11:33:22 am »
Have you tried sending a carriage return and line feed (CRLF) after the command?
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3457
  • Country: de
Re: Tenma power supply: using the serial port
« Reply #4 on: April 13, 2017, 01:51:44 pm »
Am I doing something wrong, or is it the supply?

Your typing speed is too slow so you run into a time out.

I copy the commands with "CTRL-C" and "CTRL-V" from a text file into the terminal program.
(using a KORAD KA3005P which is a unbranded version of the TENMA)

with best regards

Andreas
 

Offline Mike1Topic starter

  • Newbie
  • Posts: 3
  • Country: au
Re: Tenma power supply: using the serial port
« Reply #5 on: January 14, 2022, 12:18:30 am »
Thank you all for your help, and my apologies for this late response.  I eventually sat down, learnt some Python and bought a USB to RS232 dongle.  Initially nothing worked, then I found that inserting a 0.1 second pause  ( time.sleep(0.1) ) between commands solved the problem. Now it works well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf