LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltcraft PSP 1405

Solved!
Go to solution

Dear all,

I wrote a VI for Voltcraft power souce PSP 1405 under LabView 8.0 SE and still now cann't debug it fully. I guess the problem is in the conversion of digital and string values into HEX to form the right RS232 commands. But I'm wondering how to check the sintax of the sended commands for my "try & error" debug procedure? May be you can give me sugestion based on my code? I hope you can help me in my simple trouble. Please take a look on attachments.

My best regards,

Vitali

0 Kudos
Message 1 of 8
(3,552 Views)

It looks like you are converting your numbers to an ASCII string of hex characters.  So you are sending 4 characters such as "A" "B" "C" and "D" rather than two hex values of AB and CD.  You don't want number to hex string.  You want to use typecase.

 

PS.  "Sended" is not a word.  The word is "sent".

0 Kudos
Message 2 of 8
(3,541 Views)

Yes I do it. In general, my device is waiting for a data command, witch consists of 3 bytes: the function byte and the two data bytes. For example, for the voltage setting „Uo“ I use a string of AAh and two bites HEX conversion of SGL type value of Uo. If Uo=40,0V, my VI  converts it to 4000 and sends the string AA0FA0 to RS232 via VISA write. But I see: it's wrong.

Sorry, I don't understand you exactly. Could you please explain, what do you mean under "typecase"?

0 Kudos
Message 3 of 8
(3,526 Views)
Solution
Accepted by topic author VitEm

I'm sorry.  I mistyped.'

 

I meant typecast.  Search the palettes for it.  It is in the Numeric>>Data manipulation palette.  Actually you want to have your value be of the U16 datatype (unless it can be negative, then you want I16).  Then wire that into the type cast function.

 

 

0 Kudos
Message 4 of 8
(3,521 Views)

Thank you. I would try it tomorrow in the lab.

0 Kudos
Message 5 of 8
(3,517 Views)

Thank you! It works.

 

As my thanks to community I'd like to upload the working version of this simple driver with commentaries for future modifications.

0 Kudos
Message 6 of 8
(3,501 Views)

Dear all,

I have some next troubles with an advanced version of my Voltcraft PSP 14005 vi. I imagine, there is a simple logical mistake in the time measurement due to a voltage ramp driving. Sorry, but till now I have no idea how to fix it!


I wrote a simple vi for the dynamical ramp calculation and combined this with three virtual timers in the main one. The first timer (0: Duration Up) - for the front edge, the second (1: Duration Max) - for the plateau and the third one (2: Duration Down) - for the back edge of the desired voltage ramp.
Under default parameter settings "Duration Up", "Duration Max" and "Duration Down" must be 10s, 15s and 2s, respectively. But while running of PowSuppRampU_001.vi the "Duration Down" counts up to 17s, "Duration Up" - up to 14.5s, and then becomes 35s, but control "Duration Max" is ok.

Please see attachments for the details.


Could you please suggest me a sollution?
P.S. I did all of VIs in LabView 8.0 SE


0 Kudos
Message 7 of 8
(3,438 Views)

Dear Community,


Today I'm glad to present you a new working version of my VI for the programmable voltage source 'Voltcraft PSP 1405.' In the attached files you could find the library 'Voltcraft_PSP1405(20120801).llb' and original device data sheet (user manual). My library comprise three VIs: one is for the manual device control, and another, for the automatic one. This VI consist of main and sub modul.

 

I sincerely thank Andrey Dmitriev for his help and advice.
Enjoy!


Message 8 of 8
(3,419 Views)