LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controll Voltcraft PSP 12010

Hi! I try to controll the Voltcraft PSP 12010 Power Supply via Internet. The Power Supply is connected via COM-Port (RS232) and I build a VI that work. You can see the main part of it in this picture:

Spannung.png

My problem is, I do not understand what LabView is doing there and how the messages look like LabView is writing via COM-Port.

Can anyone explain me, because I try to build a html-webpage with php-script that can controll the power supply too? In the programming of the webpage are commands from PHP Serial Extension: ser_write("") to write a string or the command ser_writebyte() to write byte. But I do not know what to write in there. The documentation of the power supply does not help me. It only says things like (complete documentation attached):

 

Communication Frame

VSP series communicates in a fixed length frame. Each communication frame has three

bytes. The first byte is the command followed by the two data bytes. Frame remains three

bytes even if command does not have any data. Command formats are given below.

Command Format

1.Set Voltage:

(AAh) (V1) (V2)

This sets output voltage to given value

V1 - Higher byte (Only lower 4 bit will be considered)

V2 - Lower byte

Example: To set Voltage to 40.00 it will be (FA0)H and the command will be

AA0FA0H.

 

Thanks for helping!

0 Kudos
Message 1 of 2
(3,260 Views)

The code and documentation indicates that to control the supply you communicate by sending a sequence of bytes. Thus, you'd use ser_writebyte. Since that function only takes one byte you'd need to call it three times to set the voltage. Once for the set voltage command (AA), then again for the voltage high byte (0F) and then again for the voltage low byte (A0).

0 Kudos
Message 2 of 2
(3,247 Views)