12-17-2014 06:58 AM
The CCC API (CVT Client Comms) was built just for the purpose you are stating. I have used it without trouble for a few years now. There are a few good examples that should get you started. I am assuming the TPC is running windows and LV, havent tried using the CCC with other OSs.
I agree with you, shared variables are not the best choice for a CRIO application unless you have a really light application with only a few tags.
Let us know how it works out.
Eric
12-17-2014 08:35 AM
^^ what he said. CCC is our solution to that problem. Basically all the lookup is determined during initialization and when the client connects. Assuming you have the same tags on both systems, the background thread will handle the data transfer. Thats what the original Tag Configuration Editor was designed to do -- make sure tags existed on both sides.
Thanks,
Daniel
12-17-2014 09:01 AM
Yay! My first Kudos. 🙂
Here is my really simple tag editor to replace the old unsupported one. Its not really great programming, but since it worked I never changed it. You can use as an example to show how I set up the linking of tags. I also throw scaling information in the Metadata. In the RT init I pull it out and it automatically creates new tags with units. Let me know if you are interested and I can package it up a bit and share.
Eric
12-17-2014 10:22 AM
Looks nice. One suggestion that might help with save and load would be to use the robust CSV library on lava: http://lavag.org/topic/18027-cr-robust-csv/
Its not a huge improvement but its...well...robust.
Past that, would you mind posting that here (https://decibel.ni.com/content/projects/cvt-based-reference-designs-for-machine-control) if and when you feel comfortable. The tag configuration editor is something we're kind of working on replacing, but its still going to be a while and the lack of an editor is something people have pointed out as an issue in the past. It'd be nice to have something simple and easy up on that page.
Thanks,
Daniel
12-17-2014 10:47 AM - edited 12-17-2014 10:49 AM
Sure Thing, I would like to build a package for this anyways. Ill post it sometime this week with the RT and HMI VIs.
And Also, you are right a proper load of the file on init would be smart. I will check out the reference design, I am looking into rebuilding my localization stuff using csv files anyways.
ET
12-17-2014 10:47 AM
That seems perfekt. Can I use the same CVT-Table for both systems or do I need one table for every system?
And I have seen that the Tag-List for the CCC-Init has another format as the CVT-Tag-List. Is there a way to synchronize both?
Lots of thanks,
Christian
12-17-2014 07:32 PM
So there are two "tables". One is the runtime table, which is what the CVT API is accessing. There is one CVT per system. CCC is used to copy data from the CVT on system A into the CVT on system B. This is similar to the end result of using shared variables, but it tries to accomplish the task in what is arguably a more efficient way.
There is also a configuration "table" which is used to initialize the CVT API. This can be manipulated in any way that makes sense. Typically for two systems you'd see 3 sets of tags: HMI-only, RT-only, and shared. Shared tags are the ones you would be transferring using the CCC. However, the way the CCC works means that only the client (HMI) has to know that the tags are being shared.
Finally, you would ideally separate the view of the configuration from the storage of the configuration, which would allow you to initialize both APIs however they need to be initialized while still displaying to your user the data in a way that makes sense. But its typically easier to use excel or CSV files or a labview multi-column listbox to show all the information you need to show and so thats what people end up doing. One way to handle this on the runtime side (ie when you load up the CVT API), parsing one giant table and using empty spaces to indicate that a feature is not used:
Here, if Bound Address is empty, we assume it is not a CCC tag and so we don't add it to the array (conditional indexing).
12-18-2014 01:03 AM
Perfect, a short and clear description.
Thank you very much
Christian
12-18-2014 01:04 AM
Only one question more: I want to store the table on the crio, how can I address the path to the crio from the TPC-2012
Thanks,
Christian
12-18-2014 10:31 AM
If I am understanding you correctly (I'm not totally sure I am so let me know if this doesn't make sense) but on start up you would want your touchpanel to use either FTP or WebDav to retrieve the current file from the cRIO. Once you retrieve the file you can load it up and use the local copy to initialize your system. Once initialized you can delete the local copy of the file (or just FTP the file to a temp directory).
WebDav vs FTP depends on which cRIO youre using, which version of LabVIEW, and personal preference. If you are using LV2012 or earlier you only have access to FTP.
An OK example of this can be found here: https://decibel.ni.com/content/docs/DOC-4089
In the case of the example, the RT Ini file is being pulled.