Excellent! Thanks for the additional information of needing to create the Data directory. I missed that one.
If you look in the original XML file, I had a few CIE tags with "_Temporary" in the name. These were used to pass up simulated data from the CompactRIO FPGA to the Scan Engine using User Variables. These tags were then scaled and written to CVT tags that were used throughout the rest of the program (ie. Output_Temporary CIE tag would be written to the CVT tag Output). Now that we are using real IO, we don't need these place holder tags so as a specific example, I deleted the Output CVT tag, renamed the Output_Temporary CIE tag to Output, changed the data type to be double and changed the Address path to match my real IO (mod5\AI5).
I hope this helps!
The Scan Engine should return IO Variable data in the form you defined in your project. For example, sometimes I use the 9211 thermocouple module. I can set up the IO Variables to be different types of thermocouples and to have units of Kelvin, Celsius, etc. The data returned to me from the Scan Engine reflects these settings.
I was using temporary tags to scale data because I was reading my own simulated (non-IO) data from the FPGA. You aren't doing this (most people won't) and therefore you shouldn't need extra tags.
I can't seem to get the TCE to open the MCA_Localization.xml file. I have attached an image of the error.
I there a Simple Machine Control Example sans the localization code? The localization adds a vast amount of complexity. You could call it "A Simpler Machine Control Example".
That is a good point about the localization adding complexity. If you decide to remove that from the code, please post the result to this thread as I think it would be helpful for other users.
To address your error, this is expected because the TCE only edits tag configuration files. We have a localization editor (http://zone.ni.com/devzone/cda/epd/p/id/6257) that edits localization files.
I hope this helps!
I need to stabilize the analog reading that. How would I implement a routine that is synced with the scan engine and averages three to five analog reading?
How do I go about scaling analog values? I'm using a NI9203 AI module (+-20mA input) and get a reading of zero with 0 mA and a 0.1 when +20mA are applied. My sensor puts out 4-20mA for 0 to 1000 psi.
I've tried to use the scaling in the properties (right-clicking on the channel and selecting scaling) but it doesn't seem to work the way I imagined.
I would put your averaging algorithm directly after the CIE Scan VI. So the CIE Loop code should be Synchronize to Scan Engine VI --> CIE Scan VI --> Averaging Algorithm. I would create new tags for the resulting averaged data.
As for scaling, you should be able to change the scaling in the IO Variable node in the project, deploy the changes, and have everything in terms of the scaling applied. If you forget to deploy, the changes won't occur. I think your end configuration should look something like this:
I hope this helps!
I was doing a couple things wrong.
I set the Raw values set to 4.0 and 20.0. When I should have set them to 0.004 and 0.020.
I was clicking on the chassis icon and doing a plain "Deploy" which does not push the scaling to the crio.
I had to right-clicking on the top level target device icon in the project and selected "Deploy All".
There's always a learning curve...
This is a wonderful reference app, implementing most of the things that we want to do (at least for our current project). However, it should be noted that currently the Reference Architecture is not runnable in Windows CE (e.g. TPC-2012) because CE does not support many of the property nodes and variety of other things. We have modified it to work, but perhaps NI could modify it with Conditional Disable Structures to work out of the box on CE?
Also, to anyone who wants to make nice graphical HMIs on their touch panels, I would seriously advise that you step up to an Windows XPe (embedded) system like the TPC-2512. It will save you significant headache trying to get around the many graphical limitations of a Windows CE machine.
Thanks for the feedback Nate! We love hearing from people who are using our open source tools.
I agree about using Windows XPe touchpanels. Windows CE can work well for very simple UIs but anything of size should be on XPe.