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.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

actor framework message maker with Variant as input

Hi,

I'm having problem making message when the the input of the member is a variant. When I tried to build a message class, the message class cluster is empty and the two methods (send and do) weren't built properly. The send method didn't have the variant as the input and the do method was broken and the wiring was incorrect.

Does anyone have similar problem?

Thanks,

Joseph

0 Kudos
Message 1 of 8
(5,050 Views)

Hi Joseph,

I've seen this behaviour also. But it didn't bother me that much.

I'm not really sure, how effective it is to shoot around variants in messages...

Cheers

Oli

0 Kudos
Message 2 of 8
(3,881 Views)

Bump.  I'm encountering this as well in LV 2016.  Is this a bug or a feature with the AF message maker?  I'm trying to create some very generic handlers and want variant input parameters and the message maker is excluding my variant inputs.

0 Kudos
Message 3 of 8
(3,405 Views)

Sometimes you have to go in and fix the scripted VIs, so this sounds normal enough to me. The message maker is still doing most of the work for you!

 

Often you want to avoid using variants, since they have casting overhead as compared to native data types. (EDIT: The replies below are a good example of some reasons why you would use variants Smiley Happy)

Does it all work after you fix the message's VIs?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 4 of 8
(3,400 Views)

I use variants as look up tables for configuration data. I send these via messages regularly when I start up my application. I'm can't give you the technical reason why, but for variant data types I always have to go into Do.vi and connect the output of the unbundle message object to the method input. It's a very quick fix.

0 Kudos
Message 5 of 8
(3,396 Views)

Yeah, I saw that I had to fix the Do case in one of my messages (an obvious bug in message maker).  But on a different message it's not creating an input at all for my variant or array of variants.  I guess I'll have to make this one by hand as much as that disturbs me because I can't auto rescript.

0 Kudos
Message 6 of 8
(3,394 Views)

The message maker doesn't add the variant to the message inputs? Or doesn't present it in the Do.vi? If the variant is on the connector pane of the method, I've never had message maker not add it to the message and Do.vi.

0 Kudos
Message 7 of 8
(3,388 Views)

Nevermind the not creating an input comment, I figured that out.  Indeed it's just a matter of the Do message coming out mangled when inputs are variants.

0 Kudos
Message 8 of 8
(3,387 Views)