04-10-2015 06:30 AM
Hei,
in the University I have been programing in C and Labview. So, I tried to understand Labview with C.
For example, if I call the function "obtain a que" what does the compiler really do? From my perspective I would say the compiler is getting some memory (allocate memory) for the buffer and create some pointers in order to pass data. Is this right?
Thanks in advantage.
Solved! Go to Solution.
04-10-2015 06:40 AM
Hi D,
probably yes. The compiler needs to allocate memory to store information about the queue…
Why do you need to know that? LabVIEW is a rather high-level programming language, so you don't need to fiddle with memory allocations on your own… (Well, most of the time.)
04-10-2015 08:26 AM
I assume the system has a list of all queues, so obtain queue would be a search list for name and copy a pointer to the queue for you to use as reference.
/Y
04-10-2015 08:46 AM
@D_1 wrote:
For example, if I call the function "obtain a que" what does the compiler really do?
You are getting serious answer so I'm going to be the NI answer. Why does it matter.
There are many things going on in LabVIEW, and at some point a magic hand is waved and things work. Now when they stop working we get upset and want to know why but for the most part the compiler does what it should, data flow works as you would think, and the low level nuisance are taken care of. On other platforms like Real-Time and FPGA there are some more controls, but in Windows so much is done for you, and NI wants it to be that way.
There's still room for computer scientists to write complicated code, and have it be modular scalable reusable, extensible, and there is room for object oriented stuff. But generally there is more control in lower level programming languages. Of course when you're dealing with large scale DAQ systems and rapid proto typeing, you generally have bigger things to worry about than where your memory and queues are coming from.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-11-2015 02:36 AM
04-11-2015 08:45 AM
Hei again,
The reason why I am asking this is to better understand some Labview code which I am examine. Nothing else. As Mark mentioned, in order to understand something that I don't know I try to relate something that I know more and the question was just of curiosity. The problem which I am struggling at the moment is the size of the Labview code. The bigger the code the harder is to debug or examine and create a more efficient approach. The solutuion which we are working right now would be to go to OOP, but this still takes time.
Anyway, thanks for the contribution with this question.
04-13-2015 08:47 AM
@D_1 wrote:
The problem which I am struggling at the moment is the size of the Labview code. The bigger the code the harder is to debug or examine and create a more efficient approach.
This says more about the developer than the language. Many complicated and large LabVIEW projects can be well written so that debugging can still be done effectivly.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord