08-17-2005 08:30 AM
08-17-2005 09:28 AM
08-17-2005 10:23 AM
Please, have some charity here. I don't use any globals, just functional globals, the LV recommended way of storing data to be accessible by various code structures. I have taken great care to avoid race conditions. The code works very well in fact. We must work hard to come up with a solution other than, "You must learn to code correctly." The code works very well for what it was intended to do. Why the abrubt halt in editability? That is the question, not, am I handling race conditions and so forth correctly. If we know that adding one more indicator is not allowed, then let's agree to that. Generalized comments about code design do not directly address the question. What are the limits? What limit am I up against?
Jayme
08-17-2005 10:56 AM
Mike,
Let me describe the system to you. Maybe you can recommend a better way to achieve my automation goals. I have 5 dataloggers that communicate over RS232 from 5 different remote sites. I have NI ENET 232/4 devices at the remote sites to handle the RS232 communication. I have other serial sensors at the sites as well. These other sensors may be moved from site to site depending on the desired configuration for the whole system. Potentially 4 RS232 devices can be connected to each ENET box for a total of 16 RS232 devices. Each device has its own protocol. I have four state machines for handling each of the four types of sensors. Since each site may have four sensors, there are 4x5=20 state machines required to handle the RS232 communication. Five of these state machines are exactly the same with the exception of port identification.
If it is indeed true that I have surpassed some memory limit on the block diagram, then I must try to reduce the number of items on the block diagram. In this case, how can I package these state machines such that I can constantly monitor the state of the machines from my main panel without using indicators inside the state machines published on my main GUI? Should I make my state machines into subvis and send indicator references to the subvis to give the state machine access to main GUI indicators?
08-17-2005 11:14 AM
08-17-2005 12:43 PM
08-17-2005 01:53 PM
tbob,
Thanks for taking the time to answer the question. It appears that this is a rather rare failure of LabVIEW, one that is not easily predicted nor diagnosed. I searched for quite a while before posting a new question. I knew that it wasn't a common problem, but I thought it would be worth asking if anyone else had insight into the cause of this failure. My experience with the forum is that it is great for polling mental resources far deeper and broader than my own in pursuit of answers. I have been helped time and again by the forum and its many brilliant members. I suppose I should have mentioned up front that I have a lot of experience in LabVIEW. I know more than one way to skin a cat and I could just set off recoding the project with a different approach. But what if the problem is not really tied to the number of diagrams, indicators, wires, or the like? This nagging uncertainty is the reason I insisted on addressing the source of the problem, not the plethora of possible redesigns that might avoid it.
The new development in this thread is that I loaded the code into LV7.0 and it opened up, it accepted edits, it saved and it ran. It performs at the same blazing speed with all of the robustness that it experienced before, in response to shin kicks and bullet wounds.
I just heard from Mark, the LV engineer servicing this problem. He seems to think that the problem is the total project memory, not the size of a single vi. In that case, it doesn't matter how big the main GUI diagram is. In the solution to my problem, I would be better served trying to make my subvis leaner and meaner, eliminating vestigal data components, functions, or diagrams, since my main vi is more or less optimized, doing no more than I need it to do. Instead, I think I'll opt to give NI another upgrade sale.
On a lighter note, if you've never seen a large color-coded block diagram spread out over an E-sized plot, you should try it. It's quite breathtaking.
Jayme
08-17-2005 02:52 PM - edited 08-17-2005 02:52 PM
Message Edited by Support on 08-17-2005 03:49 PM
08-17-2005 03:49 PM - edited 08-17-2005 03:49 PM
Message Edited by Support on 08-17-2005 04:04 PM
08-18-2005 08:27 AM
Ok, a few more comments:
1) I understood the point you made about the functional globals the first time. The point you need to understand is that while functional globals are better in some ways than the built-in one, they will not protect you from race conditions. You should never have main dataflows being carried in globals.