Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Matsusada DC power supply with IVI

Solved!
Go to solution

I need to be able to control 3 Matsusada REK series DC power supplies using Labview. I don't have the hardware yet so I am using a simulation to test my code. It seems to be working with the simulation, but I would like to know if there are any obvious problems with my code, since this is my first experience with Labview. I would like to be able to turn the output of each supply on and off, set the voltage and current limits, and set the voltage. Let me know if my program is on the right track or completely wrong. Thanks!

0 Kudos
Message 1 of 10
(7,502 Views)
I'm posting by phone and can't look at the VI. Can you attach a Snippet? This is a special image explained in the help.
0 Kudos
Message 2 of 10
(7,473 Views)

Attached is the snippet of the program.

Download All
0 Kudos
Message 3 of 10
(7,461 Views)

For simulating a power supply, I have created the logical name MyPower, selected the niDCPower driver session, and then selected "simulate with specific driver".

0 Kudos
Message 4 of 10
(7,457 Views)
Your while loop is just iterating every 500ms and you don't need to keep repeating the same writes. An initial setup could take place prior to the loop and an event structure used just when a value is changed. If you need to continuously monitor the voltage and current, the reads could go into the timeout event.
Message 5 of 10
(7,451 Views)

Okay, thanks for the advice. I've been trying to get something to work with an event structure. I haven't used these before and I've gotten to a point where I'm kind of stuck. When I run the program with the power supply simulator, the voltage reading comes up as the last value I had set for voltage. So I'm thinking when I set a new voltage it is for some reason setting the previous voltage. How can I fix this to apply the current voltage setting?

Download All
0 Kudos
Message 6 of 10
(7,431 Views)
Solution
Accepted by topic author tom135
You should have the controls and indicators inside the event that is being fired.
Message 7 of 10
(7,423 Views)

Thanks!

0 Kudos
Message 8 of 10
(7,414 Views)
This sort of program is useful when operator intervention is required. A state machine would be useful when you want to perform a specific series of automatic operations so you might want to look into that as well.
0 Kudos
Message 9 of 10
(7,410 Views)

Hi, I'm curious to what your experience was with interfacing with your power supply once you actually recieved the product. Maybe NI forums isn't the correct place to post questions regaring matsusada customer support, but unfortunatley I haven't been able to get the support I need from them and I'm hoping I'd be lucky enough to get some tips from you.

 

My problem is that our DC power supply (REKJ15-54) unit shipped with only an rj11 phone jack to communitcate digitally (serial/rs 232) as opposed to usb, 9pin d-sub, ethernet, etc. I've had reasonable succes in communicating with other equipment via serial, ethernet, etc. in LabView but I'm wondering if you can recall anything strange/unclear about their command structure as in general the documentation seems lacking. At least lacking to someone who is very new to labview, and new to hardware communication in general. The hardest part for me is that the device won't output any response if an invalid command is received so I'm kinda shooting in the dark. Hoping you might have an example you were ultimatley succesful with you could send my ways.

 

Sorry if this is out of left field but I figured its worth a shot. 

0 Kudos
Message 10 of 10
(6,027 Views)