LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner: help debugging LabVIEW program for TDK-Lambda power supply

I don't think the problem is that the VI isn't working, the problem is that you're using an equals comparison on a time stamp variable to trigger using it.  Time stamps may look like hours/minutes/seconds and nothing else, but under the surface they're floating point numbers. Comparing floating points for equality in LabVIEW is a bad idea (well, it's a bad idea in all languages...)

 

The easy way to fix your code would be to change it to a "greater than" node instead.  

 

I'd also add a time delay in there too. Since you're only measuring once an hour there's no need to check it millions of times a second.  Add a .1 or 1 second timer in there.

Message 11 of 18
(1,513 Views)

Thank you! Checking the floats for equality was indeed a problem, the code was never entering the "True" case. But I am still not seeing an output from the "Meas Voltage Output VI".

 

On another note, the bottom while loop doesn't execute until I halt the top while loop and I am having trouble understanding why. Is this because of the flat sequence structure in the top loop?

0 Kudos
Message 12 of 18
(1,506 Views)

Yeah, I wasn't looking at that earlier, but the error chain and time stamp inputs won't let the bottom loop run because they both pass through the top loop.

 

You need to either fork the error wire before it enters the loop and move the "Get date/time in seconds" out of the loop, or move the bottom loop so that it's completely inside the top loop.  Not sure which (or both) would accomplish your goal.

0 Kudos
Message 13 of 18
(1,501 Views)

The former fixed it. Took off the error wire from the bottom loop and moved the "get date/time in sec" outside the loop. Thanks so much.

 

Additional question. If I wanted to turn off the power supply after X amount of hours (gradually decrease the voltage down to zero), do you have an idea of what driver I could use to accomplish this?

0 Kudos
Message 14 of 18
(1,490 Views)

Could you please tell me how to turn settings on the power supply. because i can't get. i am communicating with TDK lambda power supply 300-5

0 Kudos
Message 15 of 18
(413 Views)

I have found that in order to talk to these newer TDK supplies remotely, the programmer must first send the following two lines:

  1. ADR 6
  2. RMT REM

The first step is assuming that the supply is set for address 6.  If it is set for address 9, then send ADR 9.

Now all other SCPI-like commands are available like:

  • IDN? {Requests the information about this supply}
  • REV? {Requests the revision of the supply}
  • SN? {Requests the serial number of the supply}
  • OVP 35 {Sets the Overvoltage Protection to 35V}
  • PC 1.5 {Sets the Current Limit to 1.5A}
  • PV 24 {Sets the Voltage to 24V}
  • OUT 1 {Turns on the Output}
  • MV? {Requests the measured Voltage from the supply}
  • MC? {Requests the measured Current from the supply}

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 16 of 18
(400 Views)

i tried this but there is no response from power supply. if i gave command ADR 6 then no response from power supply 

0 Kudos
Message 17 of 18
(387 Views)

Again, the supply will NOT respond without the first two lines.  The supply does not attempt to respond on the bus unless the command ends with a "?".

 

Open NI-Max and enter the following:

WRITE:> ADR 6

WRITE:> RMT REM

QUERY:> IDN?

 

Response should be something like:

LAMBDA, GEN20-76, ...

 

Those first two lines are only required for the first time to establish communication with the supply.  After communication is established, just send the command or query required to the supply.  

 

NOTE: for the ADR 6 command, the DIP switches must be set for that address on the back of the supply.  Also, no other pieces of equipment should be at the same address for this bus.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 18 of 18
(371 Views)