LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Sweep for Large Number of Pulses

I wish to create/give a current pulse sequence of 100 pulses of 0.1 Amp; then a single pulse of 3 Amp;  then again
100 pulses of .1 Amp and then a single pulse of -0.3 Amp  (each pulse has delay time of 0.05 secs. and having lower
value= 0  Amp). This sequence should continue any no. of times I want. I am using the custom sweep program given in
the Model 6220/6221 User's Manual Page 4-10 but entering 500 pulses and their respective delay time (=0.05) is a
very difficult task. Please suggest me an alternative so that I can make 500 pulses ( of 0.1 Amp) , then a single
pulse (of 3 Amp), then again 500 pulses (of 0.1 Amp) and then again a single pulse (of 3 Amp) using labview
Instrument I/O Assistant
0 Kudos
Message 1 of 4
(2,958 Views)
Hi 123harsh123,

Could post a bit more information about the program you are currently using? How are you communicating with the instrument? Are you using native VISA commands, or do you have a custom set of instrument driver VIs? There are a number of ways to automate the production of commands to an instrument, but it depends on how your instrument accepts commands. If you could post more information of how you send these pulse commands to the instrument, that would be very helpful. Any screenshots of the code or even an example of the code itself would be very helpful. Once we have this information, we will be able to help more.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 2 of 4
(2,925 Views)

Dear Captain Kirby :

Thank you very much for your swift reply.

From the code below, I am able to create/generate a current pulse of 1 mA having a delay of .1 sec (i.e. frequency=10 Hz) through Keithley 6221 DC and AC Current Course using Instrument I/O Assistant block by Visa Code Generation

*RST; :SOUR:CURR 1e-4; :SOUR:CURR:COMP 10; :SOUR:SWE:SPAC LIN; :SOUR:CURR:STAR 0; :SOUR:CURR:STOP 1e-3; :SOUR:CURR:STEP 1e-3; :SOUR:DEL .1; :SOUR:SWE:RANG BEST; :SOUR:SWE:COUN 500; :SOUR:SWE:CAB OFF; :SOUR:SWE:ARM; :INIT

After this I wish to generate a single pulse of 3 mA having same delay time of 0.1 sec.  I am trying to generate this pulse by using same above program ( by just changing the current value from 1 mA to 3 mA and no. of counts from 500 to 1) by Flat Sequence Struture. I place the the new Instrument I/O Assistant block in next frame by using " Next Frame After" command.

LIke this I wish to create a sequence of pulses, each pulse having 500 pulses ( 1 mA ) + 1 pulse ( 3mA) + 500 pulses (1 mA) + 1 pulse (-3mA). I now wish to repeat these 1002 (500+1+500+1) pulses any no. of times I wish.

Please let me know if you need any more details.

Thanks and Regards,

Harsh

 

 

 

 

 

 

0 Kudos
Message 3 of 4
(2,911 Views)
Hi Harsh,

It looks like the code you submitted is the actual message commands you are sending to the instrument. Because I don't have the same instrument, these are useless to me. I am more interested in the actual block diagram that you are currently employing (this is your source code.)

But judging from your last post, you have already done the bulk of the work, and have a viable solution for one iteration of the program. A very simple solution to your problem is pictured below.



Just place a for loop around your current program and wire a control to the loop count. You can then change the number of iterations and then run the VI. I have included an indicator on the loop iteration terminal in order to give some feedback to the user in this example.

There are more robust solutions to this problem, but this is a good starting point.


Message Edited by Captain Kirby on 06-03-2008 01:24 PM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 4 of 4
(2,893 Views)