From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulties talking to power supply

Hey guys,

 

My power supply is a Lambda TDK 300V/5A. I have used the Basic Serial Write and Read.vi

 

The power supply requires i enter the address first which i do

 

I enter ADR 6\r which in turn changes to ADR\s6\r and returns in the read string OK\r

 

I enter IDN? and it returns LAMBDA,GEN300-5\r in the read string.

 

I then enter RMT REM\r which in turns changes to RMT\sREM\r

 

To enter a voltage value i enter PV 5.0\r and in changes to PV\s5.0\r nd returns in the read string OK\r and changes my power supply so all is great.

 

My question is how do i implement this in the initialize vi i have below? I have been working on it for a bit and i still cant control my power supply. I have entered RMT\sREM\r with codes display enabled for the remote command, I have entered Lambda for instrument ID with normal display enabled and the ID query i entered IDN?\r with codes display enabled? I think i need to set my address but dont know where to do this? Also if the commands i have entered are entered correctly.....Any help very welcome thanks

 

Damien

 

 

0 Kudos
Message 1 of 12
(3,942 Views)

With serial communication there is no need for you to "set the address". Everything is contained in the characters sent out the serial port.

0 Kudos
Message 2 of 12
(3,941 Views)

The error i get is telling me its an ID fail, firstly i entered LAMBDA and it still failed then i put the entire string LAMBDA,GEN300-5\r into the instrument ID string and i get a fail again, any suggestions?

 

Damien

0 Kudos
Message 3 of 12
(3,935 Views)

This VI just initializes the serial port and does an ID check.  There should be more to the driver library to do everything else you want.

 

First, are your serial port settings correct?

Second, what is the response of the instrument to the *IDN? inside of the Initialize VI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 12
(3,920 Views)

Yes I believe the serial port settings are correct i used the basic serial write and read and it works fine the Id query i receive in the basic serial write and read vi for IDN?\r is LAMBDA,GEN300-5\r. Inside the initialize.vi the ID query IDN?\r gives ok when i highlight the execution? The error cluster gives me an instrument ID error and the read visa after the ID query gives a timeout error?

0 Kudos
Message 5 of 12
(3,916 Views)

What is the instrument's repsonse to the ID querry inside of the Initialize VI (very next read after the write of *IDN?)?  The OK is the error status.  What is sounds like is the instrument is giving a weird identification back.  Which then takes me back to making sure the serial settings are correct for the Initialize VI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 12
(3,897 Views)

It timesout before i get a response at the visa read.vi the input at the match pattern vi says ok? perhaps my remote command is incorrect. Im not sure i input the same command as i did for the serial write and read. maybe the codes display is not correct im not sure....

0 Kudos
Message 7 of 12
(3,893 Views)

Are you saying you are editing a driver you downloaded?  Don't do that.  Use the library.  It was made specifically for talking to this instrument.  Find the functions you need and use them.  Editing them will likely break them.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(3,889 Views)

I have created an instrument driver using a power supply template. The instrument is called Genesys TDK lambda and is not supported by labview any suggestions on how to get it going? I have scanned for my instrument and it doesnt appear. yet i can communicate to it with the basic 2 port serial and read vi?

0 Kudos
Message 9 of 12
(3,868 Views)

I have removed the case where it performs the id query so all i have now is my init.vi configure vi and close vi the code executes correctly now but i still cant control the power supply.

 

It says to initialize my power supply i need to put in an address my address is ADR 6\r but im not sure where to do this in the code?

 

The command for remote mode for my supply is RMT REM and i need to put \r at the end of it. Do i need to configure the string to enable codes display or leave it at normal?

 

For the set voltage the original string is %.;:VOLT %g; and the enable output string is :OUTP %d;

For my instrument the command i use to set it to 10 volts is  PV 10.0\r and to read the output 

it is PV?\r 

 

I am not familiar with strings etc so do i just replace the VOLT with PV or should my string be %.;:PV 10.0\r  %g;

Any suggestions helpful thanks

0 Kudos
Message 10 of 12
(3,865 Views)

Damien129 wrote:

The command for remote mode for my supply is RMT REM and i need to put \r at the end of it. Do i need to configure the string to enable codes display or leave it at normal?


Yes, show the /codes on the constant.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 12
(663 Views)

Hey thanks for the help. I just used the serial read and write and just added in sub routines using the commands to achieve what i want instead of using the power supply template. Cheers

 

Damien

0 Kudos
Message 12 of 12
(661 Views)