how to connect igor to power supply

Hi everyone,
i am really new to use igor software. i am trying to creat interface between a power supply and Igor pro. is it possible to connect power supply directly to igor or i have to use a DAQ (already i have NI 6341).?
if it is necessary to have a NI DAQ in between, i should use a RS 232 cable for connecting power supply to NI DAQ and then using a usb cable for DAQ to PC, right?
i did some works and now i can see NIDAQ tools max in the data tools of igor pro and i can connectto NIDAQ as a simulated device.
i wonder if you could help me by your great directions.

Best,
diana
I am afraid, before people can help you effectively, you need to provide a bit more information about your problem.
- First, what do you want to do? Controlling this device, reading data, just powering Igor ;) etc. ...
- What is that for a power supply or device? What for ways of communications are supported and how did you handle the device before?
- What exactly did to do to arrive at the current state of your problem? Can you get some output, communication or any kind of response?
- What does not work for you and what do you expect?
Just as a general statement, Igor supports communication with external devices via several ports, including RS232, NI GPIB, TCP-IP and more.
chozo wrote:
I am afraid, before people can help you effectively, you need to provide a bit more information about your problem.
- First, what do you want to do? Controlling this device, reading data, just powering Igor ;) etc. ...
- What is that for a power supply or device? What for ways of communications are supported and how did you handle the device before?
- What exactly did to do to arrive at the current state of your problem? Can you get some output, communication or any kind of response?
- What does not work for you and what do you expect?
Just as a general statement, Igor supports communication with external devices via several ports, including RS232, NI GPIB, TCP-IP and more.


Hi
thanks for you reply. i want to conncet a power supply to PC by igor pro in order to control it. for example: make a signal and expect that i could give this signal from output of power supply.
the RS232 shoul be connected directly to PC? or i need a NIDAQ in between?
if my information isnot enough plese let me know
best
Chozo is right--you're not providing key pieces of information, such as the make/model of the device you are trying to connect to, and what interface it uses.

Here are some commands you can execute on Igor's command line to get some information on what options Igor provides for you:
DisplayHelpTopic "Data Acquisition"
DisplayHelpTopic "VDT2 - Serial Port Support"
DisplayHelpTopic "NIGPIB2 XOP"


If you're new to Igor, I also strongly suggest that you go through the Guided tour. You can get there from the Help->Getting Started menu item. Or, if you prefer videos, take a look at http://www.wavemetrics.com/products/igorpro/videotutorials.htm. If nothing else, watching the 12 min Introduction video (https://youtu.be/vy2GzZmVbh8?list=PLLe6A3jhXW3EFx5mIshYzTLJSDx0d3yo7) will give you a broad overview of what Igor can do and a lot of the terminology we use.
If your power supply can be controlled via an RS232 port, and your PC has an RS232 port then you can use Igor to control the PS using the built in VDT2 commands. Look over the reference AC suggested...

DisplayHelpTopic "VDT2 - Serial Port Support"
aclight wrote:
Chozo is right--you're not providing key pieces of information, such as the make/model of the device you are trying to connect to, and what interface it uses.

Here are some commands you can execute on Igor's command line to get some information on what options Igor provides for you:
DisplayHelpTopic "Data Acquisition"
DisplayHelpTopic "VDT2 - Serial Port Support"
DisplayHelpTopic "NIGPIB2 XOP"


If you're new to Igor, I also strongly suggest that you go through the Guided tour. You can get there from the Help->Getting Started menu item. Or, if you prefer videos, take a look at http://www.wavemetrics.com/products/igorpro/videotutorials.htm. If nothing else, watching the 12 min Introduction video (https://youtu.be/vy2GzZmVbh8?list=PLLe6A3jhXW3EFx5mIshYzTLJSDx0d3yo7) will give you a broad overview of what Igor can do and a lot of the terminology we use.



i am trying to connect a regatron high voltage powr supply which has a RS-232 output. i took a look some videos that you mentioned. but i dont know how i can connect this device to PC! should i use just a RS_232 cable directly to connect to PC or i should use a NI DAQ in between?
i am really confused :-(
Igor can communicate directly via RS232 without any stuff in-between (i.e., just plug in the cable into your PC and start sending commands) if the device supports it. Take a look at jtigor's comment. You are not giving us much information of your power supply to work with, so the only option is to guess what you want. Please first look up what is supported and how communcation works and the write this info here in the forum, and we might be able to help you with concrete tips on Igor.
chozo wrote:
Igor can communicate directly via RS232 without any stuff in-between (i.e., just plug in the cable into your PC and start sending commands) if the device supports it. Take a look at jtigor's comment. You are not giving us much information of your power supply to work with, so the only option is to guess what you want. Please first look up what is supported and how communcation works and the write this info here in the forum, and we might be able to help you with concrete tips on Igor.


Tanks a lot. my power supply is regatron topcon DC power supply (16kw) which has a Rs-232 port on it. so, i used a cable to connect this power supply directly to PC. for having access to power supply what should i do in IGor ?
if you think more information is necessary to know, let me know.

Thank you so much
Install VDT or VDT2 XOP which will let you communicate via RS-232. The XOPs are found in your Igor Pro folder:More Extensions:Data Acquisition. You should first read the corresponding help files that are found in the same locations.

A.G.
WaveMetrics, Inc.
In addition to the VDT2 XOP, you need a serial port on your PC. Many modern PCs don't include a serial port, but you can add one using a USB to RS232 adapter. We have had success with the adapters from Keyspan.

I think you may have a long road ahead. You will be learning Igor, programming, serial ports, hardware communication and the basic hardware operation. Adding hardware to the software problem more than doubles your troubles. But others have conquered similar problems so it is not impossible!

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Quote:
We have had success with the adapters from Keyspan.

I believe Keyspan is ancient history. They were bought out and the new company has bigger fish to fry.

People have reported success with the following which use the FTDI USB-to-serial chipset:

http://www.gearmo.com/product-category/usb-to-serial-adapters/
http://www.serialgear.com/usb-to-serial-adapter.html
http://www.usconverters.com/

There were reports of problems with the Sabrent adapter. However recently I had success with a Sabrent adapter that uses the Prolific "PL-2303 TA" chip. I used version 1.51 of the Prolific driver for Macintosh and the Prolific driver for Windows. Operation was reliable up to 460800 baud, unreliable at 921600 baud.
Thank you

since i am new , i studied some documents based on your comments. now i have a RS-232 cable and a regatron power supply which has a RS232 port at output. i am trying to establish a connection between these two.
what should i do now?! i studied VDT2 and the help files. but its a bit vage :-( for establishing a connection i should write a code? i couldn't find any thing that helps me using regular steps for establishing a connection between igor and a device :-(
please help me by your great directions and suggestions.
thank you in adavnce
Igor wrote:
Install VDT or VDT2 XOP which will let you communicate via RS-232. The XOPs are found in your Igor Pro folder:More Extensions:Data Acquisition. You should first read the corresponding help files that are found in the same locations.

A.G.
WaveMetrics, Inc.


Hi
I did it but now i have a problem to communicate with regatron power supply to control it. i am using VDT2 window to write codes but i couldn't have any feedback from the power supply :-(. how can i create an interface?

Now the next step would be to look into your power-supply manual to find out the commands which let you control the device. First, look up a command which gives you a kind of simple response from the rack to see if your communication works. Before you can achieve this from the VDT command window it is useless to think about any automation. Also, it would not hurt to start reading (or refresh your memory if you already have read it) the manual about programming. It is not too easy to jump into programming an interface even if you get the communication to work. There is a new manual file about VDT commands installed with the extension, which might be useful to read for later.
Hi
I am trying to write a Macro and using a VDT for sending data to regatron power supply but i couldn't receive any response ! what is my problem? what is the solution? here i provided my simple code for creating the communication:


#pragma rtGlobals=1 // Use modern global access method.
macro read()
VDTWriteBinaryWave2/TYPE=(0x04) send
VDTReadBinaryWave2/O=1/TYPE=(0x04) rec
endmacro


which send is a wave like :
A5
04
E5
01
10
01
7E
00
10
02
7E
00
10
03
7E
00
10
05
7E
00
10
06
7E
00

i just get time out because i wrote 0=1, without any response from Power supply. how can i solve this ?

thanks
Hello Diana,

Before you start trying complicated command sequences you need to make sure that you are using the correct communications settings for the device. Specifically, port, baud, stopbits, databits, parity, etc. Then try to send any command to the device and look for a response. Only after you can be sure that you received the correct response to a simple command should you proceed to issue a long/complex sequence of commands.

A.G.

#pragma rtGlobals=1 // Use modern global access method.
macro read()
VDTWriteBinaryWave2/TYPE=(0x04) send
VDTReadBinaryWave2/O=1/TYPE=(0x04) rec
endmacro

I also suggest using the latest default #pragma rtGlobals = 3 unless you are using a really old version of Igor. Similarly,
"VDT2 sprang from VDT, an earlier XOP. The main difference is that the operations added by VDT2 can be used from user functions. For new programs, you should use VDT2".
Unless you need some other macro property, you should take advantage of this and use functions instead of macros with VDT2:
function read()
...
end
Igor wrote:
Hello Diana,

Before you start trying complicated command sequences you need to make sure that you are using the correct communications settings for the device. Specifically, port, baud, stopbits, databits, parity, etc. Then try to send any command to the device and look for a response. Only after you can be sure that you received the correct response to a simple command should you proceed to issue a long/complex sequence of commands.

A.G.


Hi
Thank you very much. I checked the setting and i think now it is right. but i am a bit confused, you mean firstly, should i send something in the VDT2 window then i should expect to receive something else from device?
and if i couldn't receive any response, it means that the communication is not done, right? could you please give me an example what i should write and send in the VDT2 window and wait for response?

Thank you again

Best,
diana wrote:
you mean firstly, should i send something in the VDT2 window then i should expect to receive something else from device?
and if i couldn't receive any response, it means that the communication is not done, right? could you please give me an example what i should write and send in the VDT2 window and wait for response?
Best,


Check the documentation for the device communications protocol. Typically you would send from the computer to the device some instruction say "abc" and the device would acknowledge with the string say "efg". Pick up one of the initialization instructions type it in the VDT window and just verify that you are getting the correct response. Once you are able to establish communications via manual entry of commands you should move on to executing commands from procedures.

A.G.
Hi Diana,

I plan to connect a power supply to a PC in order to control it.

In order to save time, could you post the macros you are using?

Many thanks in advance.

Yves.