02-19-2010 09:04 AM
After working with the Reference Architecture for a while I still think it's great, but there are some areas that could use improvement. The main qualm I have is that the tag strings are very difficult to keep in sync during a development cycle. In many cases, machine design necessitates changes to the tags and this in turn requires changing the tags file, as well as the code on both the HMI and the Machine Controller sides.
I think an ideal implementation would be to have the tags defined within the project and then in the code the project would provide an enum that updates based on the tags. Essentially the tags would be linked to enum typedefs that we could use the in the code. If you rename the tag, then the enum would update as well. Of course, this wouldn't really be enum, because, again ideally, the code would have intelligence about what the tag type was (e.g. I32, string) and change the read/write functions accordingly. Obviously this would take significant effort for NI to develop, but it would make using the Reference Architecture so much easier.
02-19-2010 10:05 AM
04-04-2011 04:34 PM
Either I am doing something wrong, or perhaps I am the only one to notice this (which is hard to believe)? When trying to view and edit the MCA_Tag Configuration.xml file that comes with the Simple Machine Control Example, I noticed that I was not seeing the <CIETag> entries (the _Temporary ones). After playing with the TCE a bit I noticed that my version of the TCE (the installed EXE version 2.1.0 7/28/10) adds a <ReadTWriteF> field to the <CIETag>s when saving the XML file. Also, the TCE does not load the tags if they do not have the <ReadTWriteF> field (as the included example does not).
This seems to be erroneous since the CIE does not use the Read/Write flag for any purpose that I can find. The <ReadTWriteF> field should only be used for <NetworkTag>s so that the CCC on My Computer can determine which tags to Read and which to Write when running the corresponding update VI.
So unless I am doing something wrong (which is highly likely), this is a serious problem for this code package. Without a functioning TCE, I may as well edit the XML file with Notepad!
I'm not too familiar with LabVIEW object oriented code, so it makes debugging the TCE really difficult (since it's abstracted out the yin-yang). After a couple of hours poring over the TCE code, I still can't seem to figure out exactly where it fails the Load operation for a tag when it does not find the <ReadTWriteF> field. Additionally, I cannot seem to find where it erroneously writes the <ReadTWriteF> field to the XML file. I can't use the dev version to load and save the XML file because I seem to be missing some kind of Unicode conversion VIs...
Any help would be greatly appreciated.
04-05-2011 03:17 PM
04-05-2011 03:43 PM
Thank you for your reply. The attached file does indeed work, and I did this patch myself (adding the ReadWrite lines to the XML) and got it to work.
However, this still does not answer the question of why the CIETags *NEED* to have the ReadWrite property (and why this was added in the last revision). I can't seem to find anywhere in the CIE VIs where the ReadWrite flag is even used. CIE Load Tag List.vi throws away all of the remaining CIETag string after the Address tag... I guess it doesn't really matter since I got it working anyway, but now I'm just curious.
04-06-2011 09:35 AM
You are correct. It does nothing. That element was added because we were still deciding how to connect between the scan engine and the CVT tags to determine directionality. In the end there was a property in the scan engine that duplicated the functionality.