07-14-2008 01:43 PM

07-14-2008 01:46 PM - edited 07-14-2008 01:53 PM
When using typedefs you can get a coercion dot because LabVIEW is technically doing a coercion from a non-typedefed structure to a typedef structure. ie, if I have a typedef that is a cluster of two booleans, and I pass it a cluster of two booleans, the coercion dot will appear. I don't believe that this causes any code slowdown, but am not sure.
One way to check for this, is use the help window with the wireing tool, and see if one side has a typedef declaration as part of the wire structure. Something like this
Side A :
Cluster (cluster of 2 elements)
Boolean 1 (Boolean (TRUE or FALSE) )
Boolean 2 (Boolean (TRUE or FALSE) )
Side B:
Cluster 2 ( typedef 'Control 1.ctl'[non-strict])
Cluster 2( cluster of 2 elements)
Boolean 1 (Boolean (TRUE or FALSE ) )
Boolean 2 (Boolean (TRUE or FALSE ) )
If it looks like that, its a typedef coercion is all.
07-14-2008 02:18 PM
cebailey wrote:
The project is proprietary and I can't post it, and I don't know how to reproduce this in an example. But FWIW I have included part of a screenshot, without labels.
07-14-2008 02:43 PM
>When using typedefs you can get a coercion dot because...
I get the messages attached in help_on_wires.gif. Maybe that's it, though it's not exactly as you describe. "strict" appears in both cases. The difference I see looks like everything is nested another layer deep in the righthand, after-the-subvi version. Though, coercion couldn't repair a difference in how many layers deep something is nested, could it? Am I seeing a typedef coercion or something else?
The context help with wiring tool is nice, I didn't know about it. Thanks!
>You just inserted an image that is linked to a file on your c:\ ...
Oops. Sorry. I wondered if the reference to "link" meant that, but did a Preview Post and guessed wrong that seeing it work there meant others would too. I attached the screenshot too.
Thanks!
07-14-2008 02:46 PM
07-14-2008 03:44 PM
Thanks, Mike, connecting the typedef to bundle nails the dot. I usually bundle by name and may change this to do so.
So, for future reference, IS there any way to ask LV why it shows the coercion dot? LV must have known some reason to do so, right?
07-14-2008 11:26 PM