Machine Control

Showing results for 
Search instead for 
Did you mean: 

Simple Machine Control Reference Application

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.


0 Kudos
Message 21 of 28
Thanks for the feedback! I agree about the level of effort required and the level of payoff. As the code is open source, if you get a chance to make the chanage, don't hesitate to post it to this forum. We would gladly roll that into the reference design. Thanks again!
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 22 of 28

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.




"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 23 of 28
Hi rwunderl, I believe the Unicode files that you need can be found in See if that makes it so you can open the Editor source. Not sure how I missed that the CIE weren't loading. What probably happened is when I did the latest bug fix (a few months ago) I tested just by loading the file. Since I saw tags I assumed it was working. This is by I need a regression test (bad engineer...bad). Here is the updated file. I've given it to the guy who made the example to update his zip. Tell me if the attachment works.
Brian K.
0 Kudos
Message 24 of 28

Missing file.

Brian K.
0 Kudos
Message 25 of 28



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 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.



"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 26 of 28

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.

Brian K.
0 Kudos
Message 27 of 28

Hi all,


the link to the content at the first page is broken. I'm not able to find the content anymore.

Does somebody know where to find the content now? I'm especially searching for the localization toolkit which was part of the reference application.




0 Kudos
Message 28 of 28