LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"this message does not target an actor's method. it cannot be rescripted" how to add input to interface messages if forgotten?

I forgot to add my inputs to messages created through interfaces in Actor Framework.  Normally there is an option to rescript the message, however in this case it says "this message does not target an actor's method. It cannot be rescripted"

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 1 of 6
(1,781 Views)

I think I might have misunderstood the purpose of interface.  If I'm not mistaken, the interface messages are not important to update, as they are just an abstraction that won't actually receive an input.  So I just rescripted the messages at the inheritors level

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 2 of 6
(1,752 Views)

I believe the way you're supposed to have this set up is to have an Interface with its (probably Dynamic Dispatch) VIs, and then have your Actor override and implement those VIs.

 

Then, you script the message for the Interface (not the Actor). It sounds like this was your first solution.

 

If you instead script for the Actor, then the "Do.vi" will contain the Actor specifically (rather than the Interface) at the To More Specific node.

This will prevent you effectively using the Interface (because you'd like to be able to send the same message to a bunch of unrelated Actors, which all implement the Interface).

 

I tried doing the rescripting on the Interface you described, and get the message "Target method not found. Verify the message name matches a method of the target actor."

Is that what you got?

I'm looking into the scripting VIs now.


GCentral
0 Kudos
Message 3 of 6
(1,737 Views)

So I fiddled around a bunch and didn't see anything that would lead to the problem I observed if things run correctly, and when I inserted some debugging probes etc in the scripting tools it worked for me...

Now I removed the tools and I was still able to rescript the message that was created for the Interface VI.

 

The error you saw ("this message does not target an actor's method. It cannot be rescripted") corresponds to a case in which the class that the Do.vi contained method targets can't be found.

This class is determined by the block diagram class constant object - there must be exactly 1 constant for the scripting to work. If there are more than 1 constant, then you get an error 6011, and if there are 0 you get the message you saw.

 

So I guess, on your "Do.vi" in the message class, did you delete the block diagram class constant for the Interface/class?

cbutcher_0-1616647131815.png

Do.vi - manually arranged for easier reading. Here the purple BD constant is my Interface.

 


GCentral
Message 4 of 6
(1,726 Views)

Yeah thanks for pointing that out, my second comment in this post defeats the purpose of interfaces and is not the solution.  The message should be created in interface as you said, not in the actor.  I'll try to see if I can get past the error message now provide the results later

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 5 of 6
(1,701 Views)

I did some further searching for "interface scripting issue" I discovered that this has been patched in the latest version of LabVIEW 2020!  

https://forums.ni.com/t5/Actor-Framework-Discussions/Message-Rescripting-Broken-in-Interfaces/td-p/4...

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 6 of 6
(1,699 Views)