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.
10-12-2021 11:15 AM
Hi,
I use Variants to communicate between Queue State Machines similar to the Queued Message Handler Template. These Variants have type names which I use to distinguish between different values. I don't know how I can change them programmatically. At the moment I use String constants with static labels. The problem arises if I get the String from a VI, then I can't change the name.
Here a more elaborate example which is more similar to what I am doing.
Solved! Go to Solution.
10-12-2021 12:26 PM
Type cast into the same type but label the constant you feed into the type terminal (also a quick and dirty trick for named probes which is how I found out about it):
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
10-12-2021 10:57 PM
Using Coerce to Type is safer, as you know it's not going to reinterpret the memory.
10-13-2021 07:01 AM
@pauldavey wrote:
Using Coerce to Type is safer, as you know it's not going to reinterpret the memory.
One day I'll get to move on from 2017 😭
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
10-13-2021 11:36 PM
@FireFist-Redhawk wrote:
@pauldavey wrote:
Using Coerce to Type is safer, as you know it's not going to reinterpret the memory.
One day I'll get to move on from 2017 😭
"Coerce to Type" is available in 2017 (and earlier). It's just not visible in the palette: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Officially-Support-quot-Coerce-to-Type-quot/idi-p/121...