From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-26-2019 10:42 AM
This should be pretty easy, but I can't seem to figure it out.
I need to rename an element inside the existing cluster, for instance 'cnvyr spd' should be labeled 'dstnc btwn' rows The cluster I have has elements that I need to rename. Do I need to remove each element and add an element?
12-26-2019 11:44 AM
Without the cluster being a type def you are going to have to update all instances of that cluster.
Sounds like you want a type def This will create a control that the cluster can reference back to and you can change the control to change all instances of the cluster.
12-26-2019 11:47 AM
No. Just pick the element in the cluster, right click, properties and rename it.
You may want to create a constant of that indicator and temporarily connect it to the uninitialized shift register on the loop so it will automatically update the names on the wires.
12-26-2019 01:54 PM
As a general rule, clusters and enums should be type defs. This allows for them to be defined in a single location and all instances will be updated together.
12-26-2019 02:43 PM
@RavensFan wrote:
You may want to create a constant of that indicator and temporarily connect it to the uninitialized shift register on the loop so it will automatically update the names on the wires.
Exactly. You are apparently interested in changing the names in the bundle/unbundle node.
Your current indicator cluster is a data sink and there is currently no data source on the diagram where the names are defined.
Some possibilities:
But yes, make it a typedef and things will automatically fall in place.
12-26-2019 03:31 PM
Wow, I am getting to be sorry that I included clusters in the VI.
I did end up making the cluster a type def., but still had the problem. The problem was/is associated with the datalog file VIs.
It seemed every time I connected the cluster to the datalog read, my elements reverted back to the original labels.
I am now struggling with the datalog read VI. In the included VI, I would like to save all the parameters for the part numbers in the enum. The operator will then be able to select the part number and the parameters will be displayed and loaded. The cluster shows the parameters were saved, but the read data does not show the parameters, and the datalog read VI doesn't show any errors.
Am I using datalog VIs wrong? Is there some better way to save the parameter data?
Thanks.
12-26-2019 06:13 PM
You should never be sorry to have used clusters, or typedefs. They are the correct thing to use.
If you create a typedef, and connect a constant of that typedef to your datalog Open functions, you should never have any problems. I'm wonder if the fact you connected it to the shift register is what is complicating the updating of the datatype.
You may very well be using the datalog VI's wrong. It is very odd that you are essentially writing and reading from the same file, and never really adding data to it.
12-27-2019 05:19 AM
Some hints that could make your code easier:
1. You can use the Format Into String to convert your enum into a string. The resulting string will be the text for the value of the enum.
2. This exact VI should really be done with an Event Structure so that you only mess with the file when the Write or the Read is selected instead of hammering it every 100ms.
3. I have never used the Datalog VIs. But you may want to consider just using the normal File IO functions, specifically the Write Binary File and the Read Binary File.