Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I correctly time while loops using SCPI and VISA/Ethernet communication to send DC current Values to a Power supply?

 I'm rather new to using labview and I having an issue with a test Data Aquisition lab I'm trying to setup using a Keithley 6221 AC/DC current source and a basic PCI M-series NI-DAQmx.  First of all, I'm looking to update the  current value on a power supply at a rate of atleast 10Hz and I'm using SCPI commands and VISA communication through ethernet to do so.  Attached below is the VI I have written. 

The issue I'm having is this:
    My VI will loop through the values fine in software, or so it seems.  I am unable to get the Power supply to update sequentially if I don't set my loop delay to anything greater than 130ms.  If I try to run the loop faster it starts skipping values instead of counting 1,2,3,4,5,1,2,...etc.  it goes 1,2,4,5,2,4,1,2 on the display of the power supply and my DAQ unit also skips these values so I know that the number just isn't getting read to the Power supply in time.  I was wondering if this was due to my sloppy programming or if it is a hardware issue, my computer or the method of communication to the power supply?  Is this due to the fact that I'm using ethernet and VISA communication?  Is there a faster way to communicate or is GPIB faster?  Any input at all would be extremely helpful.

On a side note:  Right now I'm using an pre-determined array of values that I can update on the fly but in the future this with be put into a  closed-loop control system.  The value for the power supply output will be determined by the loop and sent that way.
0 Kudos
Message 1 of 2
(6,598 Views)
Duplicate Post
Ebele O.
National Instruments
0 Kudos
Message 2 of 2
(6,582 Views)