NI Home > Community > NI Discussion Forums
Reply
Member
Owsley222
Posts: 3
0 Kudos

voltage control

I am creating a voltage control program for a proton accelerator using Labview and a NI USB-6501.  I need the program to count up to certain user specified inputs, place all data into a notepad file and also when the user commands the program to count down, the program should begin to count down till it reaches zero.  The count up and the count down sequences should be also controlled by the user.  For example the output may be one count per second or ten counts per second and so on. Also when the random user specified inputs have been reached, the program should hold at that number and not change until the user either commands it to count to another number or began the count down to zero. The max voltage for this system is 25,000 volts.  Any help would be greatly appreciated.
Knight of NI
RavensFan
Posts: 15,081

Re: voltage control

Here is a bit of advice.  DON'T CONNECT THE USB-6501 DIRECTLY TO THE 25,000 VOLTS!

 

Are you joking about this application or are you serious?

 

If you are serious, what kind of help do you want?

Member
Owsley222
Posts: 3
0 Kudos

Re: voltage control

I am completely serious.  The 6501 is a digital counter in which I am calling the o line and the 1 line.  This leads to two bertan high voltage supplies that are connected and ran parallel to one another.  The voltage supplies are controlled by the 6501 in the fashion of a digital count, meaning the two byte lines use binary to count to a desired limit that is set in the program by the user.  So no I am not connecting it to 25,000V.  So I am creating a voltage control program for a proton accelerator using Labview and a NI USB-6501.  I need the program to count up to certain user specified inputs, place all data into a notepad file and also when the user commands the program to count down, the program should begin to count down till it reaches zero.  The count up and the count down sequences should be also controlled by the user.  For example the output may be one count per second or ten counts per second and so on. Also when the random user specified inputs have been reached, the program should hold at that number and not change until the user either commands it to count to another number or began the count down to zero. The max voltage for this system is 25,000 volts.            I have been working on this for quiet some time and have had little success.  I have been using for loops and counting up but have ran into problems in holding the count process at the user set limit and also when I have completed my sampling I seem to not be able to take my final number and count down from it at a steady pace to zero.

 

Proven Zealot
Jeff·Þ·Bohrer
Posts: 6,957
0 Kudos

Re: voltage control

a proton accelerator using Labview and a NI USB-6501

 

in This thread a LabVIEW newbie was helped by this community to develop a queued state machine that responeded well to user inputs.  I would recommend reading the link for both developing a knowledge base to build on as the problem present was similar, and because the original poster presented this comunity with a great exaple of how to maximize the value of contributors from the forum.

 

I will reiterate Ravens advice- don't connect the 25,000V to the USB DAQ :smileywink:

 

on a more serious note- I would recommend an Event Driven Queued State Machine approach as the best archetecture for this set of requirements.  Although it involves some non-trivial understanding of LabVIEW to implement,your requirements seem non-trivial as well.  (and, paranthetically- it sounds like an interesting experiment to me)

 

There are expert resources out there for consultaion but- this community can offer as much support as you need to aid you in developing the understaning of LabVIEW concepts.

8-Ball Consulting advertising banner

Certified LabVIEW Consultant. The partner you can bank on when you're behind the 8-ball.
Member
metzler
Posts: 124
0 Kudos

Re: voltage control

First, I have to mention there are many people that are far advanced in LV than I am, so consider that when you read this.   

 

I have two different applications that use analog DC output to generate voltage up to 100,000 vDC.  I thought maybe you could use a PID loop to count up and down, let the user control the rate, final voltage, and convert the PID loop output to binary, but I don't think this would work because you need to count up and down at a steady pace (pid loops slow down when they get close to the required set point). 

 

I think your best bet is a state machine.  I have included a simple one, but did not get very far with it.   Go to NI Developer Zone and type state machine in search box, open Application Design Patterns: State Machine. 

 

I need some information regarding how far you have gotten, ie. are you able to write to the digital outputs, if you have kv feedback from the output (the USB-6501 has no analog input for this value), and is there a reason you want to save the data to a notepad file? 




metzler CLAD