LabVIEW Basics #1 - Blinking an LED and setting up LINX (2019) on an Arduino UNO

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 62

  • @SINConsulting
    @SINConsulting  5 років тому +6

    Hey everyone! If you have any feedback or questions please leave them below and i'll try to get back to you ASAP!

  • @PootaurStuff
    @PootaurStuff 4 роки тому +4

    This is my first tutorial to watch after finally getting all to work due to your video. Thank you very much, I give you a thumbs up!

  • @BaqerAlkuraysi
    @BaqerAlkuraysi 24 дні тому

    the best video on the topic so far, Thanks

  • @mumbles1justin
    @mumbles1justin 4 роки тому +2

    Great Video. It was informative. The speed at which you explain things is great and easy to fallow. Thank you!

  • @subscribes6434
    @subscribes6434 4 роки тому +7

    Hey man great video! I recently started labview in the summer. When I was first learning labview here was my issue/also here is some feedback.
    Your Video says labview basics #1 (and yes its a basic but effective way to teach someone the basics), However! Beginners will have no idea what blocks you are using whether its in your LabVIEW UI or function panel, Please show step by step you creating the function panel and the UI panel (panel where you have Arduino pic on labview) IT would help immensely! cheers and keep up the good work!

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      Thanks for the feedback! I will take it into consideration for the new videos I make :)
      Until then if you have any questions at all feel free to ask ! Hopefully you had a chance to find my github in the description and play around with the VI. That would help quite a bit in learning what each function does.

  • @edvinasn.9746
    @edvinasn.9746 4 роки тому +2

    I don't get it why so many dislikes. Just replicated it and everything works it was my first time controlling arduino with labview.

  • @s.r.19
    @s.r.19 Рік тому

    Thank you for the informative videos you're producing. I started working with LabView last Summer during my studies and it was something very new to me because i only worked with Siemens until that time but thanks to your step by step tutorials i kinda get used to it! :)

  • @kurtauerbach83
    @kurtauerbach83 3 роки тому +1

    Thank you so much. i kept getting hung up trying upupload firmware from the ni folder using a diff method ..but this really helped me out. For reference im using the 2020 community version of labview.

    • @SINConsulting
      @SINConsulting  3 роки тому

      Glad it helped mate :) Just FYI I also briefly go over how to upload the firmware in LV2021 in my latest vid.

    • @kurtauerbach83
      @kurtauerbach83 3 роки тому

      @@SINConsulting thank you i may need it. im currently trying /debugging the am2302 tem_humidty in lv w/ardu. keeps timing out.

  • @supriyakhanijou6233
    @supriyakhanijou6233 5 років тому +1

    Great video. Clear and easy to follow. Thanks!

  • @lokifloki3421
    @lokifloki3421 3 роки тому +1

    Great chanel. I miss only building arduino Vi step by step to see how it is going from scratch.

    • @SINConsulting
      @SINConsulting  3 роки тому +1

      Thanks! The newer videos show how to make VIs :)

  • @mastiah
    @mastiah 2 роки тому +1

    Just to make it clear,
    Are we programming the arduino, here?
    I mean, can we compile/built and download our LabVIEW code to the Arduino and let the Arduino run in stand alone mode?
    Or,
    We can only write code in LabVIEW to communicate with the Arduino?

  • @marwenmaghrebi682
    @marwenmaghrebi682 4 роки тому +1

    nice work dude

  • @bramSDASCL1759
    @bramSDASCL1759 2 роки тому +1

    Finally get it running, use dip uno with m16u usb controller, dont use smd uno that uses ch340g

  • @gpmscosta
    @gpmscosta 4 роки тому +1

    Well, if no else has any doubts, I'll ask you another question, if you don't mind :D
    I have downloaded your program and changed the "1000" value into "0.01". When the frequency slider is "10", the result is "1/1000", if I'm not mistaken (1 microsecond). And when I run the program, the LED blinks extremely fast (much faster than 1 millisecond), which is what I wanted to test.
    But now I have a problem: when I tried to replicate your whole program on another VI document (I copied exactly what I saw, I have no idea if there are any kinds of definitions that I need to change), I can't get the LED to blink as fast as if used your program. It won't blink any faster than 1 millisecond even when I copied the same changes I have applied to the program. Do you have any idea about what could possibly be missing?
    Thanks in advance!

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      Hey Gabriel, sorry for the delay!
      It's hard to say without seeing your VI.
      What you can try is probing your data line from the frequency slider to make sure it is actually outputting the value you want.
      So run the VI, then go to the block diagram and probe the data line of the frequency control. Then you can confirm if its the correct frequency.
      Let me know if that helped.

  • @illuxa10
    @illuxa10 2 роки тому +1

    In writting to the digital channel you have selected Channel 13. But Arduino Uno and Nano have a possiblity to write to channels D14-D19 which could also be A0-A6. But when I tried your code with input value higher than 14 I get an error. Any suggestion how to write to D14 [which is also A0].
    BTW great video.

  • @monkfoobar
    @monkfoobar 2 роки тому +1

    The Digilent add-on requires $$$ to active?

  • @xuanduongngo7338
    @xuanduongngo7338 2 роки тому

    I want to ask, can LINX read the motor-encoder and display it to LCD? Thanks!

  • @zaidrashid5818
    @zaidrashid5818 4 роки тому +1

    nice work, can you tell me if the code host is arduino (like simulink external mode) microcontroller or PC.

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      LabVIEW on PC -> LINX interprets -> commands run on Arduino

    • @zaidrashid5818
      @zaidrashid5818 4 роки тому +1

      @@SINConsulting in that, the arduino board like data equcision and I can impelement a complex algorithms in Labveiw and only send / recieve signal to hardware. thanx for your answers.

  • @MiMejorAmigoTablon
    @MiMejorAmigoTablon 2 роки тому +1

    my program is ok and theres no error 5003 but my leds wont turn on in my protoboard u,u

    • @SINConsulting
      @SINConsulting  2 роки тому

      Did you check your circuit to make sure it is correct ?

  • @gpmscosta
    @gpmscosta 4 роки тому +1

    Hello again, mister SIN! I'm back again, but now with a question related to your code. I added the operator AND and a button called "Start" into the code. The signal from "start" and the signal from the "true/false case box" enter the AND operator, and then they exit the operator and enter the "output value" of the digital write box. This way, I can choose when to blink the LED or not, without exiting the while loop. I've switched the frequency control as well, so that the LED blinks every 1 ms (always - it's a constant value now).
    My question is the following: After pressing the "Start" button, the LED starts blinking 1 ms later, and it keeps blinking every 1 ms until I press the "Start" button again. However, I want the blinking process to start only 5 seconds after I hit the "start" button (but I want the LED to keep blinking every 1 ms). Simplifying things, this is what I mean:
    Start Button > Wait for 5 seconds > Blinks the LED every 1 ms
    Is it possible to do this? Do I keep the Wait (ms) command receiving a value of 1 ms, and do I add the "Elapsed Time Command" to the "Start" button? What is your suggestion?
    Thank you for taking your time to read this!

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      You definitely can, rather than using Boolean operators to control the timing loops.
      Read up on a state machine, there is an example template in LabVIEW for it.
      You could achieve these pretty easily using a state machine.
      Just have the start button route to the "start state " wait 5s in this state if the Boolean is true, then move onto the next state etc.
      Hope that helps you ! It's a bit more complicated but try the LabVIEW core 1+2 course on NIs website which is currently free online. It will cover state machine.

    • @gpmscosta
      @gpmscosta 4 роки тому +1

      @@SINConsulting Oh, thank you very much for your help, now I know where to look for it!

  • @aleksstajdohar9275
    @aleksstajdohar9275 3 роки тому

    Hi I'm trying to install Linx packages but VIPM can not find my version of LabVIEW (the menu is completely bare). Any suggestions on how to fix this ?

    • @SINConsulting
      @SINConsulting  3 роки тому +1

      Update to the latest version of LabVIEW using your serial key. Or download LV2021 Community Edition which is free.

    • @aleksstajdohar9275
      @aleksstajdohar9275 3 роки тому +1

      @@SINConsulting Many thanks !

  • @gpmscosta
    @gpmscosta 4 роки тому

    I did everything as you said, but I keep getting error 5003. The Arduino UNO is detected by the IDE and by NI MAX, but I can't detect it after the breakpoint and the probing. It appears nowhere! Do you have any idea what might be happening? The TX and RX lights blink once I run the program, and after 2 or 3 seconds they blink again and error 5003 pops up. I have looked everywhere on the internet, but I have no idea how to solve this.

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      Hi Gabriel, I believe the LabVIEW error 5003 is a time-out error between the Arduino and LabVIEW. So when you run your code LabVIEW is not getting a response back.
      A couple debug steps you might want to try are;
      *try a different USB port or USB cable
      *re-upload the LINX firmware and make sure you select the Arduino UNO firmware
      *see if you can upload a sketch via the arduino IDE
      *make sure the arduino IDE is closed when running the LabVIEW code
      *make sure nothing else is accessing the COM port when running the LabVIEW code
      *try a different arduino UNO board
      See if that helps out.

    • @gpmscosta
      @gpmscosta 4 роки тому +1

      @@SINConsulting Thank you for your response! I've tried different USB ports and a different Arduino, but I still got the same error. I've made sure there's no other device accessing the same port that is used by the Arduino. I can upload sketches through the IDE, and the IDE was turned off as well. I have rebooted the whole computer and I will try repeating everything again in the morning, it's already late here. I will inform you in the morning if your second option works! By the way, when installing the LINX firmware in Tools > MakerHub > LINX, during the setup there's an option where I can choose the Arduino directory and then press Generate. If I do it, a message saying Done pops up, but then an error pops up immediately after it. If I proceed as in your video, the only error I get is the error 5003. I have tried even downgrading the IDE's version, as some users pointed out on the internet. In a couple of hours I'll come back for more questions, or just for a plain thank you.

    • @SINConsulting
      @SINConsulting  4 роки тому +2

      Generating the firmware libraries will just dump the LINX firmware into folder of your choice so you can manually upload them via the Arduino IDE.
      You want to run the firmware wizard then once it's done check the log file to make sure the avrdude programmer was successful.
      Let me know how you go!

    • @gpmscosta
      @gpmscosta 4 роки тому +1

      @@SINConsulting I'm going to check it right now, I'll post the results here soon

    • @gpmscosta
      @gpmscosta 4 роки тому +1

      ​@@SINConsulting Problem solved!!! I have no idea where the main error was, but I'll leave the comment here just in case someone has the same problem. Rebooting the computer might be a solution, along with the steps you provided. Anyways, thank you very much for your help, your video saved my project!
      -------------------------------------------------------------------------------------------------------------------------
      I rebooted my computer completely and did what follows next:
      1. I installed the Arduino IDE v1.0.6 (I saw someone recommending it because of the timeout error)
      2. I installed NI LabVIEW 2020 (the VIP Manager came along with it)
      3. I installed NI-VISA drivers v20.0 (the latest version)
      4. The Arduino drivers configured themselves as I linked the Arduino to the computer (I can see "Arduino Uno (COM3)" on Ports if I open the Device Manager). I right clicked on the Arduino Uno and updated the drivers, but I already have the most recent drivers
      5. I created a program on Arduino with empty setup and void commands, uploaded it to the Arduino, and shutdown the Arduino IDE. I have picked another Arduino for this, as you have suggested, and I'm using a different USB cable and a different USB port (earlier on I had port COM4, but now it's COM3)
      6. I used the VIPM Browser to look for Digilent LINX, but first I had to download and install lvh_toolbox (MakerHub Toolbox), otherwise the VIP Manager would always give me an installation error for Digilent LINX. After installing the MakerHub Toolbox, I could install Digilent LINX successfully (2020 64-bits). There were no errors, and both the MakerHub Toolbox and Digilent LINX have green ticks on their left on the VIP Manager
      7. I opened NI MAX (Measurement & Automation Explorer), and I do have the latest NI-VISA drivers, as I stated in step 3
      8. Still in NI MAX, I went to Devices and Interfaces, and I only have ASRL3::INSTR "COM3" available. I clicked on it, and did everything as in your video. No errors whatsoever. I opened the Arduino IDE again just to check if everything was fine, and port COM3 is selected, so I turned off the Arduino IDE again
      9. I opened LabVIEW and went to Tools > MakerHub > LINX > LINX Firmware Wizard. I did everything as in your video and I haven't clicked on the Generate button this time. Everything seems to be okay until now, without any errors.
      10. I have pressed the "View log" option as you've asked before, and the last line says "avrdude_ard.exe done. Thank you".
      11. I ran LINX's example, and after pressing run, I had to wait for the TX and RX lights to turn on, and then I could finally use the program!
      12. I have downloaded your program as well, and it's working as well.

  • @nidhirani1568
    @nidhirani1568 4 роки тому +1

    how did you make the front panel

    • @SINConsulting
      @SINConsulting  4 роки тому

      Hi Nidhi, it is simply just indicators and controls, with 'flat box' decorations to give the clean UI. The circuit schematic is a picture which is imported on to the front panel.
      Please see the description of the video for a link to my github, so you can download the VI and play around with it :)

  • @Zxu98
    @Zxu98 3 роки тому

    Hi, I just got started with Labview and your video has been a great help. I was wondering if I can individually control multiple LEDs through a shift register (74HC595) using LINX and how would I go about doing so. Many thanks and regards

    • @SINConsulting
      @SINConsulting  3 роки тому

      I'm sure you could, you just need to understand how the shift register works and how to send the relevant latch, clock and data inputs from the Arduino to the shift register. LINX is capable of all the above.
      Review the link below and interpret it into LabVIEW :)
      learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register

    • @Zxu98
      @Zxu98 3 роки тому

      @@SINConsulting Thank you very much. I have, or I think I have a decent understanding of how the register work, and I have working code for what I want in the Arduino IDE, I'm just having issues implementing them into LabView...

    • @SINConsulting
      @SINConsulting  3 роки тому

      Hi Zihao, I definitely understand! What I would suggest you do if you want to get this running quickly is, watch my latest video LabVIEW Basics #11.2 where I demonstrate how to write a VI for an Arduino in LabVIEW step by step including how to upload the firmware to the Arduino. With this knowledge, you should be able to either use my examples on GitHub or write your own code to get things started with an understanding of the basics.
      Then once you have your base VI, which can talk to your Arduino (my example VI with everything in the while loop deleted except the stop button pretty much).
      It's just a matter of bringing your Arduino example into LabVIEW (which I show how to do in LabVIEW basics #10 for a DC motor example). The key here is having a deep understanding of how the shift register actually works, the Arduino examples online are very poor at this, because they utilise the ShiftOut function which doesn't actually explain how the shift register is working.
      In this case, we would most likely only need to utilise the Digital Write Function in the LINX library pallet to get everything working, so you need to find an example that shows how to control the 74HC595 without using the Arduinos in-built shift register library, such as www.eprojectszone.com/arduino-and-shift-registers/.
      You should then be able to replicate this example using the Digital Write Function. I hope this helps as a starting point :) I can't help any further other than writing the code for you, which would rob you of learning ;)
      Otherwise, I am happy to help with basic LabVIEW questions :)

    • @Zxu98
      @Zxu98 3 роки тому +1

      @@SINConsulting thanks so much for the help, with some trial and error, I got what I wanted with the SPI functions haha xD I'm embarrassed how little I actually needed to do to accomplish what I wanted

    • @SINConsulting
      @SINConsulting  3 роки тому

      Awesome

  • @obquest
    @obquest Рік тому

    It’s a good video. Straight to the subject and waists no time. It’s let down by sound quality and lack of eloquence. Talk a little slower and perhaps a couple of visits to the speech therapist would help.

  • @hastrinam.salleh5072
    @hastrinam.salleh5072 4 роки тому +1

    how to do the dbl?

    • @SINConsulting
      @SINConsulting  4 роки тому +2

      Right click and change the data type.

    • @hastrinam.salleh5072
      @hastrinam.salleh5072 4 роки тому +1

      Thank you problem solved.

    • @hastrinam.salleh5072
      @hastrinam.salleh5072 4 роки тому +1

      @@SINConsulting anyway, do you have a tutorial how to control the voltage for the dc motor and to measure rpm?

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      No, but I will make one eventually on how to control dc motors.

    • @hastrinam.salleh5072
      @hastrinam.salleh5072 4 роки тому +1

      @@SINConsulting yeah I'm waiting for the tutorial. Thank you for the respond. Totally appreciate it!

  • @magalhaes753951
    @magalhaes753951 4 роки тому +1

    This is not basic (at least for me), I have little experience in LabView and I am lost. Basic would be you showing everything step by step and explaning why... I got there with our video, but you could have done a more detail explanation

    • @SINConsulting
      @SINConsulting  4 роки тому +1

      Thanks for the feedback Joao, in my newer videos I tend to show the entire process, albeit sped up. But you can always slow it down and follow line by line :)

    • @magalhaes753951
      @magalhaes753951 4 роки тому +1

      @@SINConsulting I was able to get there with this video, but I was kinda lost at the beginning... I already subscribe to the channel, thank you for the help!