04-24-2006 02:21 PM
04-25-2006 07:48 PM
04-26-2006 09:19 AM
What is a VI? I am using CVI and I've seen the references to a VI but have no idea what it is.
I know that there is a limit to how many tasks that can be defined and I'm trying to avoid coming close to the limits as I've been bitten by limit caused bugs before thus the question about how many can be created. If it's over 100 then that should be good enough for me as there's only 48 channels.
The problem with sending the array of bits is this panel is dynamically creatable bit by bit so I figured I just keep track of the bit related information (names, labels, response types, etc.) and deal with it from that. I had noticed the ability on the input side to be able to control which input bit you are reading so I figured that NI would create a symmetrical interface (being able to read and write things in the same style), but I haven't been able to find it. This is the sort of thing they teach in Object Programming 101. It increases the productivity of the programmers as they only would have to spend the time to understand one interface style instead of two, I don't understand the "advantages" of the inability to address the outputs individually by name within a task. I ended up creating a task for each output bit and tracking the task, something I find as wasteful as I'm sure 24 tasks with one channel each takes up more overhead than one task with 24 channels (which is something I can do with the input side).
As for the creating and destroying the interface each time a bit was written, I agree. The programmer that did that stole it from one of the examples and didn't understand the potential time problems that can cause and he was unable to figure out how to address one bit at a time on the output either so he used what worked.
Lloyd
04-26-2006 09:57 AM
VI stands for Virtual Instrument. It is more of a LabView nomenclature.
Loosely interpretted, it is how you can write a generic function in labview to be callable from other programs.
04-27-2006 07:34 PM
04-28-2006 09:32 AM
I am using DAQmx_Read_ChannelsToRead thru "DAQmxSetReadAttribute" to read a single channel, I have not been able to find the equivalent entry on the write side. It took a little find that, I expected to be able to call a function with the name of the channel and get the value back but having to do two function calls (three if you also want to be able to read the whole set at a later time) isn't too bad.
I redesigned it so it creates a task for each output and isn't destroying the tasks other than at the end and it seems to be working fine (at least in simulated mode). It caused me to have two different styles of programming to handle it and I know the person that will be maintaining it later will be in for more exploration than should be necessary but it is what it is.
Using the traditional stuff I would have been able to use a single common style but take the chance of support ending on the next cards we use and having to do this then and have to maintain three different ways of doing it.
What is the maximum quantity of tasks that you know have been created? I understand that my "mileage" may vary but knowing that there are applications with 30 or more tasks running would make me feel more comfortable with running 20 or so in my app.
Thanks,
Lloyd
04-28-2006 10:19 AM
04-28-2006 10:33 AM
That makes me feel much more comfortable with what I'm doing. I figured that this would be the case but then I figured I'd be able to treat the input and output in similar ways.
Thanks,
Lloyd