Pid+visa

salut,
j'au un projet de régulation de niveau d'eau à l'aide de labview ,
mon problème consiste à utiliser le port série ,
en faite , aprés mettre le régulateur , la commande doit aller à l'entré du port série ,(visa write)qui envoie la commande à un pic16f877, et dans le retour le port visa doit lire le niveau de capteur et de le renvoyer au régulateur pour le corriger,
autrement 
l'entré du bloc visa write doit etre la commande U (la sortie du régulateur) ,[ ce port visa sort cette commande et l'envoie a la carte d'interfacage qui contien le pic ,le dac et le adc,le singal de retour sera lu sur le port visa read]
dans mon programme sur labview, je met seulemnt le régulateur et le port visa (initialisation, read, write) , les autre sont sur la carte,
mais j'ai pas pu y arriver.
comment faire ??
mouka
mouka
Attachments:
etudevisa.vi ‏85 KB
visa1.JPG ‏9 KB
projet incomplet1.jpg ‏78 KB

salut,
j'ai un petit problème de conversion , j'aime transformer une sortie chaine de caractère du port série(read visa) en un DBL(double)( pour transferer les données aquis a partir du capteur en tension) mais dans l'exuction il me apparait un message d'erreur , commet faire?
/english
 hi , i have a little probleme with convertion ,( in visa read) ----------> see finale,
how can i resolv it?
mouka
Attachments:
FINALE.vi ‏98 KB

Similar Messages

  • Old PID VIs compared to new ones

    Hello,
    I need to "translate" or "convert" some PID parameters from an old project, written in LabView 6.1 to use it with the new LabView pid toolkit. I have LabView 2012 SP1 with PID toolkit.
    When I open one of the old VIs, I can see a subVI called:
    "NI_PID__autopid compat.lvlib: PID with autotuning.VI"
    I looked inside, as much I as see, here the integral term is a multiplier. In the new PID toolkit manual, it is written that, the integral term is a divider in the PID equation.
    Does it mean that, if I have an integral term in the old VIs like 30 minutes, I have to take its reciprocal, if I want to get the same behaviour for the integral term in my new PID toolkit?
    thanks for help,
    Regards,

    Hi,
    I am not sure but shouldn't you be able to open the old VI's with LabVIEW 2012 as shown in the following link:
    LabVIEW Module and Toolkit Compatibility Information
    http://www.ni.com/support/labview/lvtool.htm#pid
    I also found this link, maybe this is also interesting for you:
    PID VIs Behave Differently in LabVIEW 8.2
    http://digital.ni.com/public.nsf/allkb/70F14BFB5A11FE1F8625732B0061A2A6?OpenDocument
    Regards,
    Michael

  • How to use the pid vis with a two-state output

    Hello
    Could someone tell me how to regulate the temperature of a room with
    a two-state heater (on/off), using the pid vi's.
    Thanks,

    >> Could someone tell me how to regulate the temperature of a room
    >> with a two-state heater (on/off), using the pid vi's.
    In <[email protected]> [email protected] (Helmut Hullen) writes:
    >You don't need the PID. A simple 2-state control does the work.
    ^^^^^^ ^^^^^^^ ^^^^^^^
    Frankly, I tend to agree. However, if you _need_ PID control and _if_
    your two-state heater is solid-state switched, there are other
    options. For example, commerical PID temperature controllers with
    zero-voltage switching (ZVS) operate by generating a slow enabling
    pulse, then achieving proportional control by varying the duty cycle of
    this enabling pulse. For instanance, if your enabling pulse is running
    at 10-Hz, with 50% duty cycle,
    then your heating element will be on for
    50% of the time every 0.1 second.
    You can use a programmable timer (National includes two on their MIO
    cards) to program the 5 or 10 Hz output and its duty cycle. You might
    have LabView execute the PID subVI once every two or three seconds to
    adjust the duty cycle on the programmable timer so as to minimize the
    feedback error=(tempSetPoint-currentTemp).
    Why are you wanting to use LabView for PID temperature control in the
    first place? There are some very good PID temperature controllers
    (programmable through a serial port) with built-in solid-state ZVSs
    and readouts for $900 that you can buy. They'll fit right into
    a control panel, display and all. Sure beats messing with a
    programmable timer card and its outputs, plus you get a digital panel
    readout to boot.
    /\ Mark M Mehl, alias Superticker (Supertickler to some)
    <><> Internet: [email protected]
    \/ Preferred UUCP: uunet!iastate.edu!mehl
    Disclaimer: You got to be kidding; who would w
    ant to claim anything I said?

  • PID v5.0 compatability with LV 8.0

    Hello,
    Where can I read up on the pros-n-cons of upgrading the PID Control Toolset v5.0 to v7.0 working with Labview 8.0? Definitely worth it? Don't bother?
    Is the issue a non-issue?
    Thnx.

    Hi There:
    Thank you for your inquiry. Most of the PID VIs are made up of shift registers and mathematical functions such as add, subtract, multiply, so on. Thus it will definitely work with LabVIEW 8.0. The advantages per say have more to do with the structure of LabVIEW 8.0 rather than the toolkit itself. For example you can now use the Project based structure of LabVIEW 8.0. You will also benefit from the shared variable architecture that is implemented in 8.0.
    To make PID VIs available for LabVIEW 8.0 all you will have to do is uninstall the toolkit and reinstall it. When you do this, the toolkit will search your computer for the latest LabVIEW version and install the libraries in the right directory for that version.
    I hope this helps. Let me know if this does not answer your question.
    Best Regards,
    Jaideep

  • Does PID loop transfer values to new instance

    Greetings Everyone,
    I'm a new forum user, but I've been using Labview for about three years now. 
    I have an application that uses PID VIs in multiple cases of a case structure.  Each case structure passes a different set of setpoints, gain schedules, limits, ect to the new instance of the PIDvi.  What I'm wondering is this:  When I switch cases to the new case structure, does all the integral and derivative information get lost in the shift registers of the old PID instance, or does labview keep them in memory and pass them to the new instance?  If it kept it in memory it would be a great help, becasue there would be less upset in my PID loop.  If not, then I'm going to have to pass a cluster of that information into the new instance...which I'd rather not do to save on system requirements (real time system). 
    Thanks for the input
    Grub
    Hell, there are no rules here...we're trying to accomplish something!!! - Thomas Edison

    Using the shift register will only work if you make the VIs not reentrant. In any other case, you will need some means of global data storage. I think the most memory efficient is LV2 Globals (also known as Functional Globals), but I haven't tested it, and I know of some benchmarks that showed that the fastest is single element queues globals.
    A single element queue global is a queue with the size of 1 where you always remove the element from the queue when doing an operation. This locks any other calls to the queue, because it's empty, and they will have to wait until you place the element back in the queue.
    You can search for the other terms to find some documentation about them.
    Try to take over the world!

  • Getting the labview 8.6 pid toolkit to work with labview 8.5 student edition

    Hi I am working on a project for college,I just bought the labview pid toolkit 8.6 but it wont load as i use labview 8.5 student edition,am i stuffed or can i get a version to work with my edition and send this one back??hat is the best thing to do?
    I am badly stuck please help.I cant afford to pay for an upgrade to 8.6?
    Thanks

    You could try to do a File->Save for Previous Version on the PID VIs that you want to use.  However,
    if one of the PID subVIs was saved without a block diagram then this
    won't work. Also, I'm not sure if the toolkit is backwards compatible
    in this way. Also, when you do this you will effectively be saving the
    VI hierarchy into a new location.
    However, your best bet (and my recommendation) is to contact your local NI sales rep to see if they can get you a CD with the 8.5 version. Since you have a license for the toolkit it's probably not going to be an issue.

  • PID Control Labview 7.1.1

    Hello, I have successfully created a PWM controller for my application
    and built a simple proportional controller into creating my pulse width
    output.  This got rid of the basic "drifting" problem of my device
    output but now a new problem concerning steady state error has arisen
    where the output is offset from my set point.  To combat this
    problem, I have heard that I should also implement integral control
    into my algorithm.  Looking through the daqmx examples, it appears
    to me that all the example PID vi's contain only P controllers when I
    looked at them more closely.  For traditional daq, I found a
    complete P, I, and D controller and was hoping to find something
    similar for daqmx.  Does anybody know of any example vi's online
    or if I am not looking at the packaged examples correctly?  Any
    help would be appreciated.  Also of note is that my setpoint is
    also changing slightly in real time.  I don't know if this has
    significance for more advanced controllers, but I thought I should
    mention it.
    Thanks,
    Nick

    Hello Nick,
    You can pretty much take the simple PID.vi from the traditional DAQ example and plug it in place of the P controller in the DAQmx examples. If you do the PID toolkit for LabVIEW, then it has a set of PID VIs that you could use.
    I am sure you know PID, but I have included a link on PID below.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/D4748F0D59CF436D8625702700809EF4
    Also, please take a look at the 'NI Ready-to-Run Controls Starter Kit' which has executables and VIs for PID applications with our DAQ boards.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/B238B02B04369A0386257028001A7B3A
    Thanks,
    Arun V
    National Instruments

  • Inquiry regarding creating PID

    I already installed labview2009 and when i want to create the PID block diagram, there is no indication at design control and simulation.
    Should i install the PID and fuzzy toolkit separately?
    Please advice.
    TQ

    Yes.  It is a separte toolkit and installs the PID VIs.  It installs the VIs, examples, and documentation in the LabVIEW folder.

  • I have a big delay in my real time pid control

    hi ,
    since i don't have a digital input module i tried to use the serial port RS232 on my Crio to read the data from an absolute encoder in order to perform PID control for  a dc motor, but the problem is that the data took too match time to be read; there is a big delay between the first read position and the next one,and when i change the slide controller the indicator took time to change, although it should be instantinouse, here is
    a snapshot of my vi. 
    please i need help.

    Hi Moho,
    Looking at your code I see a couple of things that might be causing the issue. How long is the delay that you are experiencing? You are trying to transfer 2000 bytes every loop which will cause some delay. You also have a lot of mathematical operations that can take time between loop iterations. Also what is the VI that you have manipulating your waveform? Have you looked into the PID VIs?
    Scott B.
    AE NI

  • RT PID toolkit does not match standard PID toolkit for arrays

    Why is the PID toolkit from the RT installer different than the standard PID toolkit?  Attached is a VI that demonstrates that the RT PID toolkit acts differently for array inputs than scalar inputs.  You must have the RT PID toolkit installed; the PID toolkit from the "Toolkit Software" disk doesn't have this issue.  Run this VI, then click the "Auto" button.  Note that the single output response is correct, but the array output response gets "stuck" on the lower bound of the output.  Try multiplying the P tuning parameter by 10 (change it to -0.04) and note that now both PID loops respond - but they start at different initial values!  Now, add an element to the boolean shift register, and wire the "Auto" input of the PID VIs to the new second element - both PID loops now respond identically.  Install the PID toolkit from the "Toolkit Software" CD and these issues vanish.  What's going on here?  Which version of the PID toolkit should I use in my RT applications?  This is all LV 8.2 from the November 2006 Developer Suite CDs.
    Attachments:
    PID test.vi ‏23 KB

    Hi Luke, and thanks for your help.  I'm doubtful that the two versions are identical, even without the aid of "Compare VIs" - I've attached screenshots of the upper left corners of the two versions.  However I might be missing something buried in the deeper levels.
    This affects my application in that I have a system that can run in several modes; in some of them the controller is turned on, in others it is turned off.  When I switch to a mode in which the controller is turned on, I want to initialize the output to a specific value that corresponds to that mode, and let the controller adjust from there.  This is why I'm using the shift register: to turn on the controller one loop cycle after setting the manual output value.  I'm open to other suggestions but this has worked fine for me for years with previous PID toolkit versions.  Similarly I've never had problems before with clipping at one end of the range, and I don't think it's caused by the difference in value between the setpoint and process variable, since it's affected by the lower bound of the output.
    The Readme for the LabVIEW PID Toolkit 8.2 suggests that many changes were made in the 8.2 PID toolkit, including calling a compiled C library for the array version, although I haven't seen anything that suggests this is the case in either version of the PID toolkit from the 8.2 CDs.
    Message Edited by nathand on 04-05-2007 08:43 AM
    Attachments:
    PID toolkit.GIF ‏16 KB
    PID RT.GIF ‏18 KB

  • PID Temperature Controller with myRIO

    I am interested in implementing the LabVIEW PID VI to create a temperature controller using the myRIO for a sous vide cooking apparatus similiar to this: https://learn.adafruit.com/sous-vide-powered-by-arduino-the-sous-viduino/sous-vide. I will be using a slow-cooker as the heating element; for the temperature measurements, I am using the DS18B20 one-wire temperature sensor; and to alter the temperature I am using a relay connected to the slow cooker.
    I have had success getting temperature measurements from the DS18B20 with the myRIO following the guidance of this thread: https://decibel.ni.com/content/docs/DOC-41626#comment-44403, however, I am having difficulty finding a starting place to learn how to use the PID VIs for the rest of the project. In a new VI file, I used the program I had used for the temperature readings as a subVI, and tried to connect its output containing the live numerical temperature measurements into the PID VI, but the live temperature measurements as well as the PID VI output are not being transmitted after running the program.
    Here are a few more specific questions:
    Are there any preliminary steps for creating a PID program to accept live measurements from a myRIO target (should the program be enclosed in a loop for continuous updating of myRIO measurements)?
    What information is transmitted at the "output" terminal of the PID VI?
    Is autotuning recommended for this type of application?
    How does the "PID Autotuning" VI differ from the "PID Autotuning (Temperature)" VI?
    I have attached the files I am currently working with: ("1-wire interface.lvproj" is the project file, "RT Main.vi" is the temperature reading program, "PID_Test" is the new PID VI file I am experimenting with).
    If the content in this post is not appropriate to what is expected to be asked in the forums (not specific enough, etc.), please let me know and I apologize in advance. Thank you for your time and assistance!

    Hello dpull,
    There shouldn’t be any particular configuration that needs to be done, for the PID vi to start using the PID VIs, and if you desire to continously acquire the data from the myRIO, then this within a loop might be appropriate.
    The output terminal transmits the control signal of the PID controller, so basically the action that would have to take place to take the desired value to the setpoint.
    As far as recommending autotuning, it mostly  depends on your application and the precision you need, it would always be better to determine the parameters yourself, but if you don’t require super high accuracy, then autotunning should be sufficient.
    The PID autotunning (Temperature) VI is used for processes that include a dead time, since it’s incorporated into that model, the other one is better suited for processes that don’t have dead time.
    As far as resources go for learning to use this toolkit, I’d recommend sticking to the examples you can find in LabVIEW and maybe the following manual.
    http://www.ni.com/pdf/manuals/372192d.pdf

  • Halt causes jerk movement

    Using PCI-7344 and MID-7604 and FLEXMOTION.
    3-Axis control, stepper motors, closed loop with optical linear encoders.
    1) When I am stationary and command a Halt, there is a resulting jerk movement, sometimes up to a few 1000 servo steps. Why?
    2) The MAX PID Tune does not work at all. Is there a way to use the LabView PID VIs, including the Auto-Tune VI to tune the PID parameters? Do you have an example or documentation on how to do this?
    3) I am having trouble with getting the move complete to complete. I realize one factor is the PID parameters. I have attempted to tune them manually with the Capture and Read Trajectory data (this is a very cool tool) but so far am not very successful at finding the correct PID parameters. Can I get more documentation on what factors are included in the move complete.
    4) The pull-in moves at the end of the move do not appear to be limited by the commanded velocity and acceleration. Using the high rate data, I am often seeing velocities 4-5X the defined velocities, which then would throw-off the PID controller. Is this a design flaw? Why is this? The pull-in moves are usually completely un-successful at correcting the endpoint.
    5) I am using a 3-D contour move to perform a curve. To define the geometery of the move, I need about 170 points. I would like the speed of this move to be approx 6000 steps/second. Due to the definition of the speed of a contour move to be dependant on the following parameters:
    1) Distance between points
    2) Time delay between points, limited to intervals
    of PID rate which can be btwn 10-45 msec for the
    fastest PID rate, or btwn 10-90 msec for slowest
    This requies me to have a contour defined as 3500 points. This is a big drain on the system due to this restriction.
    1) Why is this restriction here? Is there an work around?
    2) When you change the PID update rate, what does that effect? High speed capture rate? All card processing?
    3) There does not appear to be a way in LabView to change the PID rate? Am I missing it?

    http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/4-AXIS-MOVE-VI/td-p/58560

  • Error 200524 Different number of channels in task and data

    Anyone out there with some information would be greatly appreciated. I  have attached my VI. Essentially I am trying to build a simple PID VI to controll the temperature of a piece of equipment in a system I am building. I have heating wire powered by 120 V source. The circuit is controlled by a simple relay, which is controlled by a digital line on my NI USB 6343 board. I have seen numerous examples throughout the forums and the shipped examples, but I cannot seem to figure out how the PID VIs work. I understand the basics of a PID controller, but cannot make the connections of how to actually get it to work in LV.
    I figured that this VI I wrote is pretty simple and should work, but I keep getting this error.
    Error -200524 occurred at PID_v0.vi:Instance:19:1
    Possible reason(s):
    Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
    When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
    Number of Channels in Task: 1
    Number of Channels in Data&colon; 1000
    Task Name: _unnamedTask<1>"
    Any advice, direction, sample VIs that are not overly complicated, etc would be greatly appreciated.
    Attachments:
    PID_v0.vi ‏97 KB

    Hi andyabs,
    I'm not getting the same error you are when running this VI.  How are you setting up your channels and tasks in the DAQ Assistants?  It seems like this may be the source of your error.
    You should also take a look at Section 4 of the attached White Paper.  Using DAQmx functions rather than the DAQ Assistant will give you a bit more functionality with your program.  Let me know if you have any questions about this example.
    Control Applications with Data Acquisition Hardware: http://www.ni.com/white-paper/9086/en/#toc4
    Myriam
    Applications Engineer
    National Instruments

  • Problems getting NXT toolkit to work with version 8.5

    I recently downloaded the nxt toolkit to use with  labview version 8.5 when i select tools and go to the nxt module it minimises the labview window for a few seconds and then the nxt module opens for around a secondand then disappears, does anyone know whats causing this any help greatly appeciated.

    You could try to do a File->Save for Previous Version on the PID VIs that you want to use.  However,
    if one of the PID subVIs was saved without a block diagram then this
    won't work. Also, I'm not sure if the toolkit is backwards compatible
    in this way. Also, when you do this you will effectively be saving the
    VI hierarchy into a new location.
    However, your best bet (and my recommendation) is to contact your local NI sales rep to see if they can get you a CD with the 8.5 version. Since you have a license for the toolkit it's probably not going to be an issue.

  • Programatically launching reentrant clones

    I have a temperature control process which has an array of process variables for which I wish to implement parallel PID control loops.  The size of this array is set according to a configurable number of temperature control zones, so while it is variable in the application, it is known and constant at the level of the SubVI which will handle the PID processing.  While the PID and Fuzzy Logic toolkit contains PID VIs which accomodate DBL Array instances for parallel processing (and thus would handle whatever size array of process variables is thrown at it), the specific VI that I wish to use (PID Autotuning (Temperature).vi) does not.  What I want to do is: in response to a configuration change which changes the number of heater control zones, preallocate as many clones of the PID Autotuning (Temperature).vi as there are process variables in the array (determined by user configuration), and then within my SubVI, run the array of process variables into a FOR loop in which each iteration uses a different clone, thus duplicating the behaviour of those PID VIs which do accept array inputs for running parallel control loops.
    I am unfortunately unfamiliar with the use of the VIs on the Application Control palette.  Any help would be appreciated.
    Sean

    Okay, I have managed to preallocate the data spaces, and if I pass the resultant reference into a FOR loop (N= minimum # of data spaces) containing a property node outputing the "Is Clone VI" property, all output Booleans are TRUE.  Interestingly, the CloneName property is the same string regardless of iteration, which I gather was done on purpose by NI in a recent revision of LabVIEW to prevent programmatic access to specific clones, but unfortunately, that is precisely what I am trying to do.  The asynchronous start / wait functions, or call by reference node, will operate on the reference passing through the FOR loop, but how can I be sure that the correct instance is being used if I can't address them directly?  I also notice that for minimum space values less than six, the preallocation node coerces the value to six.  I am unsure how this would be handled when it gets to my PID FOR loop - I want to iterate through the clones starting at the first one, but the next time the loop is encountered, it needs to start at the beginning again.  If there are more allocated data spaces than process variables, wouldn't it iterate through all of the available preallocated clones before starting again?

Maybe you are looking for