11-28-2019 09:06 AM
Very good. Highlight Execution can be very helpful, especially for beginners. I'm sure it would have been mentioned in the tutorials for beginners in LabVIEW you took before you started programming .
I attached a modified version where I got rid of the unnecessary shift register, and put back in the boolean crossing function with a case structure so it only executes the digital output when it changes. (Though in reality, for a digital output function like this, you don't need it. There is no harm repeatedly outputting the same value.)
Also, another tip. Your 1000 wired to the wait function had a coercion dot which means you wired in a constant of the wrong type. It would not have hurt. But a good LV tip is that when you want to create a constant, just right click on the function and click Create Constant. It will give you the constant of the same type that the function is expecting. And it is a lot less work than searching the palette for a numeric constant.
11-29-2019 01:09 PM
I had a box of hardware and a computer with LabVIEW on it when I started programming a couple weeks ago. I didn't know about the tutorials until I read about them on the forum. I am not sure who was supposed to tell me about them, but I have since googled them and found them. Searching LabVIEW tutorial on the NI site does not get you there: http://www.ni.com/academic/students/learn-labview/
The reason I was worried about the state change is hardware related. I wasn't sure how the hardware would react to repeated output and didn't want to let the smoke out of the relay or the board. I did some tests where I monitored the voltage being sent to the relay and confirmed what you already knew. Repeatedly outputting the same value resulted in a constant voltage signal to the relay, rather than some oscillating value.
I looked up the coercion dot when I first got it and didn't think it was a big deal. However, it is probably best practice to use the expected constants, which Create Constant will help me do.
Thanks for the help, it has been invaluable. Sorry to bring my noob question to the forum, but I wasn't sure where to go. I will consult the tutorials next time I encounter an obstacle, and will advise anyone else starting out to do the same.
11-30-2019 09:04 AM - edited 11-30-2019 09:05 AM
Hi burak,
Glad you managed to get everything worked out. Please don't feel that you can't ask questions on the forum - we're all happy to help.
Of course, if there is a help page or tutorial that describes the solution to your problem, it will usually be faster to find and read it yourself than wait for someone else to tell you (especially if the response is just a link to the tutorial) but that doesn't mean that you shouldn't ask, especially if you tried searching first.
Many things are easier to find when you've already found them before - because, for example, you know keywords to search for. I want an array of 4 or 8 LEDs, but working out which of several terms describes that is not so simple until after you already have the answer - do I need an LED bank, an LED array, or an LED bar etc.
So don't feel you can't ask (but try to search first if you think it might have been previously written somewhere).