09-24-2016 05:46 AM
Hi everyone, in my studies I have never been involved that much in programming, neither do I enjoy it or understand. But in my current job I have to work with some sensors for an expirement and we use LabVIEW for programming. Sensors are connected to an NI DAQ, which is connected to the test computer.
Now, I actually don't know how to start with anything. I tested the sensor on NI MAX and I got the signal I want. But if I want to write a program on LabVIEW to be able to get the same reading I get on NI MAX.
My problem isn't not knowing how to use the elements (like for loop or case structure), but my problem is that I don't know what to use, and how to go with the problem? like if there is a general procedure to read data from any sensor (defining the pins it's connected to, then reading from the output pin or writing to the input pin) or not.
Most of the time I face the question "Why should I use a for loop? for example and not "How to use a for loop" It's more like I don't understand/didn't learn the logic or theory behind programming. How do programmers I hope anyone can understand my problem. I really want to learn how to do it and not get the solution from someone, so any help, sugestions and literature/books is appreciated.
09-24-2016 06:25 AM
https://decibel.ni.com/content/docs/DOC-40451
Look at the links under "Looking For Free Training"...
If you have a licence, you can also access the Core 1, 2, 3, etc online video courses. Start with Core 1...
09-24-2016 01:35 PM - edited 09-24-2016 01:37 PM
Wow, that's rough. It's like trying to rebuild a car engine and you don't know what a socket wrench is.
Could someone please post links to the tutorials, since NI, in their infinite wisdom, decided to delete the links from the LabVIEW main page?
Thanks.
Edit:
I stand corrected. They ARE on the main LabVIEW forum page.
09-24-2016 02:38 PM - edited 09-24-2016 02:40 PM
@Valdievil wrote:Hi everyone, in my studies I have never been involved that much in programming, neither do I enjoy it or understand.
Well, we need to understand cause and effect here. Is the non-enjoyment caused by the not-understanding or vice versa. If you don't enjoy programming independent of understanding, you are probably in the wrong field and I would strongly suggest to re-think what you want to do with your life.
If there is a possibility that you'll enjoy programming once you understand it, there is hope! So please start with the tutorials as suggested!
@Valdievil wrote:
Most of the time I face the question "Why should I use a for loop? for example and not "How to use a for loop" It's more like I don't understand/didn't learn the logic or theory behind programming.
Well, is the question on why you should use a loop in general or why you should e.g. pick a FOR loop over a WHILE loop for a certain scenario? These are two completely different questions and I am not sure which one you are asking.
Any loop is used to repeat the containing code. For example to generate 1000000 random numbers you would not place 1000000 random number generators on the diagram, but instead would place a singel isntance in a FOR loop set to run 1000000 times. We use a FOR loop because we know exacly how many times it should run before the loop even starts. Sometimes we don't know the number of iterations beforehand but need to terminate if a certain condition is met. For example if we need to generate random numbers until one is >0.999 we need to use a while loop and test at each iteration if we are done yet. the final iteration count could be anywhere between 1 and infinite.
As you can see, it takes very little knowledge to decide what to use. Picking the right tools quickly comes natually and LabVIEW programming becomes enjoyable and intuitive. You would not use a knife to eat the soup or a spoon to cut the steak (unless it is very tender :D). Same difference.