07-25-2005 11:24 AM
07-25-2005 02:45 PM
I discovered the same thing in LV-RT 6.1.
Even a simple property node to read the strings of an enum are not available.
So,
CONTROL references are NOT supported in RT to the best of my knowledge.
07-26-2005 02:43 AM
Ben, the RT manual says that you can use VI server. In addition, I have seen programs which run on RT targets and use properties (explicitly linked nodes) like Strings[] or IndexVals and work.
Use the VI Server to monitor and control VIs on a remote RT target. Using VI Server technology, a LabVIEW VI can invoke RT target VIs. The LabVIEW VI can pass parameter values to and from the RT target VIs, creating a distributed application. (user manual, 4-12)
I think if you open a control's reference by name it should work.
07-26-2005 03:37 AM
@tst wrote:
I think if you open a control's reference by name it should work.
I'm sorry, I must have been a bit confused and thought that there was a VI that allows you to get a control reference by name.![]()
What you may be able to do is place all the controls inside a tab and use the reference from the tab to get the Controls[] property.
07-26-2005 04:01 AM - edited 07-26-2005 04:01 AM
Message Edited by R6 on 07-26-2005 04:03 AM
Message Edited by R6 on 07-26-2005 04:03 AM
07-26-2005 05:09 AM
I understood the error you receieved was from trying to get a ref to the FP. My suggestion goes around that. If you create an explicit reference to a tab control, I think it should work and you can get the Controls[] property from the tab page, not from the FP.
I don't know of any other way to get the references, not even using scripting, and I don't think there should be. Opening a reference to the FP should work on an RT target just as does on the PC as long as it exists. I suggest you report this as a bug\design problem, by selecting the email option here.
07-26-2005 07:15 AM - edited 07-26-2005 07:15 AM
Hi tst,
Yes, VI server is still available. I will use VI functional globals that are served.
From the Windows side I can do an invoke node call by reference as a simple way to control and monitor the RT application.
RT although very similar to non-RT is a very picky animal. Simple tricks you would get away with under Windows just simply are not allowed.
Examples:
Do you use strings in your application? Bad idea in RT. Because strings can change length the memory allocated for them can change when you can't predict. This leads to consumption of memory that is NEVER given back until you reboot the node.
This includes strings in the error cluster! I had to resort to replacing the source fields of error cluster with empty strings to prevent RT nodes from crashing under error conditions.
Concatenat string? Bad.
Build array? bad.
Control references and property nodes just do not work.
Do you use locals to update GUI's inside the DAQ loop? Bad idea in a TC loop. Touching the user interface blows away determinism.
I managed to work-around using control references and this should not be a "show-stopper". The only challenge I faced was how to determine the strings associated with an enum. I had to push this issue becasue I needed to ensure the multiple developers involved did not get out of sync.
Attached is a VI that NI Support provided that allowed me to get the strings of a enum without using a property node. This VI existed prior to me reporting the "no property node" issue because this was a known issue.
Here is the VI as a LV 7.1 llb.
Ben
Message Edited by Ben on 07-26-2005 07:16 AM
07-26-2005 07:42 AM
@Ben wrote:
I do not think this is a bug.
Well, I'm not sure how I would look at it. I never had the need to dynamically contact a RT target to access controls, so I didn't really think about it, but at first glance I would say that opening a reference to the FP should work if the FP exists, even if destroys determinsm. That should be the user's problem. I can understand why it doesn't work, though.
The other stuff brings up some interesting considerations. Luckily, I didn't run into cases where using strings eats up the memory (I think), but it's good to know these things. This may help explain some "mystery errors" where the module seems to stop responding until rebooted. I assume Deallocate Memory doesn't help? Is this documented somewhere? I found a small section about this in chapter 6 of the manual (can also be seen here), but I also found another reference which makes no mention of this. I suppose it's logical, now that I think about it, but it really seems to me that this wasn't stressed out too well.
Like I said, I'm fairly sure I did see property nodes work on a RT target (I think they were supposed to help with the UI when connecting to the FP).
Also, can you save that LLB for 7.0?
07-26-2005 08:02 AM
07-26-2005 08:06 AM
One more example to demo how extreme RT is.
In a windows app if I am collect data from two sub-VI and I want to combine them into a single array it would be a quick build array.
In RT I allocate an array outside a loop and then replace the two portions.
Ben