03-09-2010 07:19 AM
The outputs do not get updated until the entire sequence finishes
I saw that it was noted that a flat sequence structure works like this (outputs doesn't get updated until the entire sequence is finished) but i didn't see an explicit statement that the sequence structure i use works the same way therefore i assumed that the outputs were available. But studying what happens I realize you're right. Maybe i didn't look close enough.
Your use of the merge and sequence structure show a lack of understanding of data flow and how LabVIEW works.
Its a visual programming language. It is meant to be easy! You're right, I got bored by the tutorials and jumped right in. I'll see if there's a tutorial that dont go into programming basics but only labview specifics. Ill try out the solution you suggested in parallell. Thanks!
03-09-2010 11:01 PM
I just gave you an option on how this could have been achieved. Please do not consider anyone to give you a readymade answer within a specifed time leaving their work behind....
If you would have browsed the examples that came along with LV probably you would have figured out a solution for the same instead of posting it on the forum.
Guru
03-10-2010 12:45 AM
No Guru, you didnt provide me with an answer to the question and of course i looked at examples and tried to find a solution on my own before i posted it here. I didnt expect a ready made answer - i hoped that someone could point me in the right direction.
Ive downloaded the DAQmx base package on suggestion by Dennis and maybe ill be able to resolve the question in a couple of days.
I do appriciate that you tried to help me though!
Rgds
03-10-2010 01:46 AM
03-10-2010 09:36 AM
ustsv75 wrote:Your use of the merge and sequence structure show a lack of understanding of data flow and how LabVIEW works.
Its a visual programming language. It is meant to be easy! You're right, I got bored by the tutorials and jumped right in. I'll see if there's a tutorial that dont go into programming basics but only labview specifics. Ill try out the solution you suggested in parallell. Thanks!
While the graphical nature of LabVIEW does make it easier for novice programmers and nonprogrammers to implement basic tasks it does not negate the fact that programming in general is a nontrivial task. Designing a good and robust system takes skill and experience regardless of the language. The graphical nature of LabVIEW makes it easier for people to understand programming concepts but you still need to learn them in order to write good code. Because LabVIEW is a programming language you can't avoid learning programming basics as well.
03-10-2010 02:29 PM
Still don't think it beats text based programming languages but maybe Ill see the light soon...
Figured out that if I dig down into how square wave generation works I could learn a lot. Since it seems as if time is shifted from one iteration to the next (probe window) I need to save the start time somehow if I want to generate a time delimited pulse. I could then set the output value to the selected value as long as the set time hasn't elapsed and to zero after.
Or, in a text based language I'd simply do something like this:
outputValue := 2;
Wait(2);
outputValue :=0;
That didn't take much skill 🙂
03-10-2010 03:00 PM
03-11-2010 09:52 AM
This is the solution I came up with. It's not so pretty but its working. It seems to be eating a lot of CPU power so its not so effective either.
It generates a positive signal for two seconds when switched and then it sends a refresh pulse for as long as the button is switched on. When switched off again it generates another pulse for two seconds.
I haven't understood how you would do the same with DAQmx write but im interrested to learn. Luckily I found this tutor that might guide me (http://zone.ni.com/devzone/cda/tut/p/id/2991). It helps to know what you're looking for. Thanks Dennis!