Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Current Value Table (CVT)

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

Message 101 of 164
(4,824 Views)

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

 

0 Kudos
Message 102 of 164
(4,813 Views)

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

Message 103 of 164
(4,809 Views)

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

0 Kudos
Message 104 of 164
(4,809 Views)

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

0 Kudos
Message 105 of 164
(4,803 Views)

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

 

 

0 Kudos
Message 106 of 164
(4,804 Views)

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:

ccc.png

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

Message 107 of 164
(4,787 Views)

Perfect, a short and clear description.

 

Thank you very much

 

Christian

 

 

0 Kudos
Message 108 of 164
(4,779 Views)

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

 

 

0 Kudos
Message 109 of 164
(4,780 Views)

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.

0 Kudos
Message 110 of 164
(4,768 Views)