Fuzzy control using Labview and arduino

Dear all,
I have been trying to control the output of an LED using a fuzzy logic controller, based on temperature and humidity values that I receive from the DHT22 sensor via arduino in the LABVIEW setup, but the problem is, I am not sure how to set up the PWM pin of arduino for that purpose. I have used an arrangement for the setup but it has not given any LED signal so far. The VI is attached herewith.  PS- I have connected the LED to pin 6 (PWM pin) of the arduino UNO board.
As far as the data acquisition part is concerned, the setup is working fine and I am being able to get the values of temp, humidity and light intensity.
Any help in this regard would be highly appreciated.
Attachments:
temhumlightctrl1.vi ‏48 KB

Just start with a simple VI commanding a PWM, and put a meter or a scope to see if the output changes.  If you can't get any output there is likley a problem with your setup.  If you are driving more than an LED you'll need some kind of buffer circuit or opamp to increase the current capabilities.  These micros can't drive much power so if you intend on using this PWM for controlling temperature and humidity you won't be able to drive it directly.
Also be aware that your loop time is going to be relativly slow, and not deterministic.  Most control systems like PIDs need to have tight timing to ensure that the system stays stable while having a decent response time.  Since temperature and humidity change pretty slowly this will likely work just fine.  But know that the time it takes to send a command to the Arduino, have it go out, take a sample and then send it back over serial won't be consistent.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • Please help me with my electrical engineering homework : temperature control and watering system for greenhouse using labview and arduino

    temperature control and watering system for greenhouse using labview and arduino
    spesification :
    1. max temp : 28 celcius (when temperature is more than 28 celcius, fan ON)
    2. min temp : 20 celcius (when temperature is under 20 celcius, heater ON)
    3. watering system : aquaponic (grow plant and fish in separate tank but connect each other). Plant roots help filter water for fish. Fish poop for plants fertilizer. So I need a pump to distribute water.
    Please help me create VI file simulation.. I'm sorry I'm not fluent in English. May God bless you all
    Attachments:
    YOOOSHH.vi ‏88 KB

    Duplicate thread.   Please keep the discussion in that thread where you already have a response. It is also the more appropriate thread for your question.
    Lynn

  • How to create an exe file using labview and arduino?

    I bought Arduino Mega 2560. I have installed Arduino IDE 1.7.3. I am using Windows 7 64bit version and Labview 2012. I started working after the compilation of LIFA_Base File with Arduino IDE and with labview.
    My application is: I have connected my arduino to my PC via USB for read input/output pins. I have to read all the time an analogue input from arduino and I have to draw the graphical representation of the input. I would like to know if I can create an exe file of this application. I would like to use the created exe file to another PC without labview installation. 
    Please help me to resolve the problem.
    Regards

    Yup you sure can.  With Application Builder, that is bundled with several LabVIEW packages you can make an EXE, and then make an installer that can include the LabVIEW Run-Time engine (free) and you'll also need the VISA run-time for talking to serial devices like your Arduino.
    Then you should be able to run that installer on any normal Windows PC and without the development environment be able to run your program.
    Note that currently Student, and Home versions of LabVIEW do not have the application builder since it is intended for learning, and hobbyist, not for distributions.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • I am trying to use Labview and RP1210 compliant hardware to connect to a truck J1939 bus and receive messages.

    I am trying to use Labview and RP1210 compliant hardware to connect to a truck J1939 bus and receive messages. 
    Specifically I am attempting  to read data frames using the RP1210_READMESSAGE .   am able to configure the hardware and send a message to the J1939 bus. .    I think I have not configured something correctly.  I can use the RP1210_SENDMESSAGE and see the message I have sent on the bus using CANalyzer   When I use the RP1210_READMESSAGE   I get the timestamp from a message and the return from the function sends back the correct number of bytes (the number matches the number of bytes I sent out plus four bytes from the timestamp).  What I am having trouble with is actually receiving the data. I have had the same type of behavior from two different hardware (Vector CANcase XL and Nexiq USB Link), so I don't think the issue is vendor specific.
    Has anyone been able to make the RP1210_RECIEVEMESSAGE function work correctly?
    Thanks for any help

    Thanks
    I have already tried that.  The links are the NI RP1210 wraper. The problem I am having is using labview to interface with the RP1210 layer.  The RecieveMessage char*fpchAPIMessage this is the output which is a pointer to a cahracter array.  In this variable I can receive the timestamp of the message but not the message.  The retun showns the correct amount of bytes are aviaable (18 for a 8 byte message) but I can only get the 4 byte timestamp  I think I have to dereference this pointer to view the data.  I am not sure how to fix this. 

  • How to recognize certain word or voice (like cry) using labview and kinect?

    By using labview and kinect, how to recognize some sample world like 'ok', 'help', and voice like crying and screaming?

    This is not really a LabVIEW question, but a signal processing question. Do you have a set of crying sounds in order to be able to calibrate whatever algorthm you are trying to implement?
    LabVIEW Champion . Do more with less code and in less time .

  • Looking for full time position using Labview and/or PLC's in Long Island NY area

    I have 13 years experience using Labview for user interface/daq applications.  I also have 20 years experience with Programmable Logic Controllers (PLC) programming for industrial machine controls.  My resume follows:
    Adam Wechsler
    111 Holbrook Rd.,Holbrook,NY 11741,(631) 981-1013 [email protected]
    Objective
    Labview programming, virtual instrumentation, industrial machine controls,
    automation, PLC, HMI, GUI, data acquisition
    Education:
    B.S. Mechanical Engineering 5/89
    Polytechnic University, Brooklyn, NY
    A.S. Engineering Science 5/86
    Suffolk Community College, Selden, NY
    (GPA 4.0 Dean's List Spring 1986)
    Experience:
    Controls Engineer 5/1994-3/2009
    Vacuum Instrument Corp., Ronkonkoma, NY
    *Program, troubleshoot, and upgrade automated Vacuum Chamber Industrial Leak Detection systems controlled by Allen Bradley PLCs in an OEM environment.
    *Debug equipment functions and programs prior to shipping, at customer's site, and by phone.
    *Integrate and install various types of peripheral equipment, barcode scanners and printers,
    *Design and develop Labview graphical user interfaces and HMI applications including recipe management and data collection for industrial machinery.
    *Write and review user manuals and installation instructions.
    Production Engineer 10/1989-5/1994
    Izumi Corporation, Yaphank, NY
    *Program, maintain, troubleshoot, and repair PLC controlled hydraulic, pneumatic, and control systems for automation in a hands-on environment.
    *Improve design for manufacturability of new products and prototypes to be urethane/injection molded.
    *Program, maintain, troubleshoot, and repair six axis hydraulic paint spraying robots.
    *Create interface between multiple PLC’s and central computer system.
    *Improved design and productivity of high volume, computer controlled, robotic molding machine by 150%.
    Consulting Projects:
    *Created Labview user interface components, and recipe management system for the testing of motion control servos.
    *Programmed Allen Bradley PLC machine logic for packaging machine for a food service supplier.
    *Created Labview to Allen Bradley PLC setpoint and monitoring interface for electric motor-starter test stand.
    *Programmed Allen Bradley PLC and PanelView operator interface terminal for cosmetic packaging assembly machine.
    *Developed Labview application for Fourier and statistical analysis of myogram biomedical data for researching the efficacy of acupuncture treatment.
    Other:
    *Attended National Instruments Labview training courses, and regularly attend local Labview Users Group meetings as a long standing member.
    *Member IEEE
    *13 years experience with Labview
    *15 years experience with vacuum chamber, mass spectrometer, and related technologies
    *20 years experience with PLC's and automated systems
    *Attended Autocad training course.
    *Willing to travel

    Will also consider contract, part time, or consultant work.

  • EMG based DC motor control using labview

    I have a project where i need to use my EMG data to control DC motor
    using labview.I've already got the EMG signal by using ADinstrument and
    import the signal to labview. The problem is i don't know how to connect
    the signal with DC motor. This motor will start to move when it detect
    the signal exceed certain value and stop when it less that value. I'm
    still new with labview and i'm using labview 8.0. Can someone help
    me?thanx

    Please check out our Biomedical User Group - there are similar project discussions going on there and links to the NI Biomedical Starter Kit - a free download for doing biomedical data acquisition, signal processing, and other tasks.
    Steve
    Visit the NI Biomedical User Group at:
    www.ni.com/biomedusers

  • Plot different data set depending of some conditions using labview and veristand

    Hi Community,
    i have a couple of points saved as XY data points on my desktop.  The files are save as csv.  the idea is to read the file utilizing the Read From Spreadsheet File vi when some conditions are met and then plot the XY data wiht XY Graph Addon of the veristand workspace.
    for instance:
    if case 1 is true read the corresponding file and then plot the first set of data
    if case 2 is true read the corresponding file and then plot the second set of data
    if case n is true read the corresponding file and then plot the n set of data.
    Could you give some advices how to implement it (Labview and Veristand)?
    I'm using LV and NIVS 2012
    Thx
    Mich
    Attachments:
    vide.vi ‏35 KB

    Hi Michel,
    I believe the easiest method will be to use the VeriStand .NET API to call into VeriStand and utilize LabVIEW for creating the decision making cases that you have.  I have attached some examples of using the VeriStand API in LabVIEW.
    Using the NI VeriStand .NET API in LabVIEW to Control a VeriStand System
    https://decibel.ni.com/content/docs/DOC-32268
    Where Can I Find LabVIEW Examples Using the NI VeriStand API?
    http://digital.ni.com/public.nsf/allkb/E1066949FA67B6CE862578A7005988D5?OpenDocument
    Please let me know if this helps.
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Really need help (motor control using labview)

    hi all readers,
    im new beginner. really need help for my project. i've been assigned to monitor/control motor using labview 8.5 (using NI DAQmx). the problem is, the techinician told me that i cant use 3phase motor with this card. things that i need to displayed using labview is :
    torque
    power
    current
    voltage
    speed
    really appreciated if readers can help me with this:
    wut type of motor shud i use that compatible with NI DAQmx
    thanks a lot.

    Hi fauziana,
    NI data acquisition devices are primarily designed to take measurements, so it's a good idea to measure the signals that you have mentioned with a DAQ device.
    You also can use DAQ devices for control tasks, but for reliable and deterministic control behavioryou typically need to use a real-time operating system (not Windows!). If you want to learn more about the pros and cons of using DAQ devices for motion control tasks, please refer to these threads. Still for standard motion control tasks it's much more efficient in terms of development time, to use a dedicated motion control device for the motion control part of your application.
    In general the control part is independant from the motor type, as these devices only generate control signals (+/- 10 V). There are many power drives available, that accept this type of control signal and you should select your motor according to the requirements of your application.
    For a more detailed system consulting, please contact your local NI branch. To select the products that fit best to your application requirements a face to face discussion is much more efficient than a discussion forum thread, because there are a lot of parameters that need to be taken into consideration. If you tell me in which country you are living, I can provide appropriate contact data to you.
    Thanks and kind regards,
    Jochen Klier
    National Instruments

  • Using LabView and Modbus to Communicat​e with AKD Servo Drive

    I’m working on a project to control a Kollmorgen AKD servo application using Modbus directly from LabVIEW.  I’m new to both LabVIEW and servo drives so forgive me if this seems simple.  I have established communications to the drive through Modbus and have been successful at some rudimentary control of the servo.  I know the drive only supports "Write Multiple Registers” and “Read Holding Registers” functions and there are scaling factors that need to be applied.  What I need is some help with taking the Modbus information supplied by Kollmorgen for each command and formatting it for communication to the servo and vice versa.  I need to understand how to take the supplied 8, 16, 32, and 64 bit information for commands, scale it, and format it into the two or four registers required for the drive to read the parameters.  In turn, I also need to understand how to take the same information and read it and scale it from the drive.  I’ve attached a spreadsheet with the particular commands I’m interested in and a sample VI that seems to work for speed control but to be honest, I'm not sure how/why.
    Attachments:
    KM Modbus Cross Reference.xlsx ‏57 KB
    VEL.CMDU.vi ‏10 KB

    OK, I've got the ability to read values from the AKD drive pretty well sorted out.  I'm now having trouble with the ability to write.  I want to use Labview to program Motion Tasks in the AKD drive.  To do this I need to perform three commands: MT.NUM (specify the motion number), MT.P (specify the angular position), and MT.SET to set the parameters for the task.  MT.P requires sending a 64 bit signed float or a 32 bit signed float (requiring four or two registers respectively).  I used ModPoll to see what values the drive held in the MT.P registers after entering the desired angular position using the AKD Workbench software.  For example: using Workbench I entered 234.567 for the angular position and read 208 and -32506 from registers 2060 & 2061 (the 32 bit registers for MT.P).  After scouring the forum I put together the attached VI to try to write to the same registers but I can not seem to get the translation of the input (angular position) to the register values correct (entering 234.567 does not produce 208 and -32506 in registers 2060 & 2061).  Anyone have any ideas?
    Attachments:
    Motion Task Definition Rev H.vi ‏21 KB

  • How to create a strictly typed refnum control using LabVIEW scripting

    I wish to use LabVIEW scripting to create a strictly-typed refnum control that is bound to my custom control (a type-defined cluster), but I'm unfamiliar with scripting and can't see how to do it.
    If I create a New VI Object, using Control Refnum as the Style, how do I provide my custom control to the VI Object Class terminal? When I try using a reference to my custom control.ctl file (using Open VI reference) I get an error: "Error 1057 occurred... Type mismatch: Object cannot be cast to the specified type."
    Or, if I create a new Control Refnum as above, using a standard Cluster as the VI Object Class, how do I then convert this refnum control to a strictly typed refnum that is bound to my custom cluster control type?
    Thanks in advance for any advice,
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Solved!
    Go to Solution.

    Here we go...
    You have to create a new Control VI and then specify the VI Type as Typedef.
    Regards,
    Da Helmut
    Attachments:
    example.vi ‏22 KB

  • Building SCADA software for substation automation control using LabVIEW

    Hi, I would be interested to know if anyone has built or developed a SCADA software for substation automation control using purely LabVIEW and its add-on tools (beside NI LookOut). The SCADA software, somehow similar to WinCC, should fulfill basic SCADA function for substation such as monitoring and interlocking control of CB and DS (single/double point), generate event or alarm list which includes information such as topical/not topical, valid/invalid...., archiving, redundancy, etc.

    Hi Remzi,
    Thank you for your information.
    I understand that the DSC Module is a tool capable of developing monitoring and control system. Using the module would enable me to build a SCADA software (similar to LookOut) according to my requirement. But I think it's quite a difficult task to design and build a SCADA software from the scatch. Unlike a SCADA software, the DSC module is not really a SCADA software where user can directly parameter the I/O points and graphics via GUI. I've actually tried the LookOut software, but found that it's not really suitable for substation automation & control field. Hence, I would be grateful to know if anyone in this field has developed similar SCADA software for substation automation.
    Best Regards,
    Edmund

  • PCI Express interface control using LABVIEW

    I've made my own PCI Express card which is meant for data transmission from external device to PC through PCI Express intergace.
    Everything is being controlled by FPGA chip.
    My qiestion is, how to make Labview be able to recognise the device and send data through PCIe interface?
    Thanks you very in advance for you help.

    Hi
    Meghan,
    Thanks for your reply!
    Basically, this is a signal
    acquisition system. The main part are ADC which is connected to FIFO memory and
    then to PCI Express pins. Cyclone from ALTERA is meant to control all the
    processes.
    Something similar you can find here: 
    http://www.knottsystems.com/cyclone.aspSo, all the system is located on the PCI
    Express card which is supposed to communicate with a PC through PCI Express
    Bus.
    There is a program inside the Cyclone which makes all the necessary
    packages according to PCIe Specification for the data transmission through the
    Bus.
    So the problem is how to get data into the PC using
    Labview.
    Thanks,
    Igors
    Engineer of Electronics

  • Zaber linear actuators control using labview

    Hi
    am new at using Labview-{3 weeks old as of 31st May} and i would like to control three Zaber Linear actuator to operate a X-Y-Z translation/linear stage. 
    Any advice as to where to start
    Regards
    Jeffrey K.
    Solved!
    Go to Solution.

    Hi, I wrote the LabView instrument driver for
    Zaber Technologies that's described on our web site. It comes with
    several example VIs you can experiment with. The Write Commands and Read Responses example is useful for trying out the different commands on the controllers. Once you've played a bit and read through the beginner examples, you might find the Simultaneous requests example useful for your XYZ setup.
    Another option for learning how to use our devices is to download our Zaber Console software for Windows. It lists all the commands and settings along with a description of how they all work. Once you're familiar with the devices and their commands, you can either write a script in Zaber Console, or go back to LabView and use our instrument driver.
    For a general introduction to LabView, I've been pretty happy with the book LabView for Everyone.
    Message Edited by Don Kirkby on 06-14-2010 05:06 PM

  • Sorensen SGI control using labview

    Hi,
    I am attempting to control a sorensen sgi400/63 dc power supply using labview. I have the supply connected via rs232 and using windows hyper terminal i am able to issue a *idn? command and get a response back detailing model name / number etc. - This says to me that the comms link is working.
    My troble comes when trying to use labview to do the control. I  have downloaded the labview driver for this power supply form ni.com - this gave me a .zip folder (called sornsg.zip) containing some .vis. I opened the self test vi. It seems when run in highlight execution mode that all is well writing to the supply, but reading from it throws the error -10738007339. Any ideas?
    I have contacted sorensen but no reply as yet...
    Many thanks.
    Attached is screen shot of the vi not working quite as i'd like.
    Attachments:
    selft test.jpg ‏1615 KB

    I still have the error.
    What error are you getting?
    I'm not sure what you mean by changing the display mode to "\".
    Right click on your "*IDN?" string constant and select the display mode - Normal, \, Hex or Password
    Also in the "Visible Items" select "Display Style" to show the '\" symbol in the string constant.
    Is there anyway to configure a termination character in labview?
    Yes with the same property node that you are using to set the other com port settings.
    But for the writes you do not need to if you include at the end of your *IDN? string. Now as for the read, it is good to set the termination character for the VISA reads and then set the bytes to read to some number larger than anything you expect.
    Omar

Maybe you are looking for

  • How to save blob data (variable length string) in a customized table?

    Dear Friends I have written a very simple program to update table with 2 fields which looks as follows. ======================================================== Table name ZTESTBLOBDATA Field         Key          Init    Data Element   Data Type  Len

  • TDMS4HCM: Struggling at step "confirm definitions"

    Hi all I'm trying to implement TDMS4HCM. All the systems have the same patch level, the recommended sap-notes have been implemented. The selected TDMS template is "ERP Initial Package for HCM Personnel Development (PD & PA)" I'm struggling at the poi

  • XSLT question, Parameters from itab

    Hi Experts, I'm using the following code in my abap program: TYPE-POOLS: abap. TYPES: BEGIN OF line_type,   vartag   TYPE string,   varvalue TYPE string,   END OF line_type. TYPES: itype TYPE TABLE OF line_type. DATA: gt_source_itab TYPE abap_trans_s

  • Can't update iTunes 10.5.3 to 10.6.3: not shown in Software Update

    I want to update my iOS devices to iOS 6.0. When I click a device's Update button in iTunes, I get an alert: A new iPad software version (6.0) is available, but requires iTunes 10.6.3. Would you like to download iTunes 10.6.3 now? with Don't Download

  • Converting videos and ripping Dvds and then converting them?

    I have no clue how to get any videos or dvds that I own onto my iPod and Ive searched for software everywhere and have no been able to locate anything that is helping my problem. I have a Mac iBook G4 and I know people with Windows machines that coul