02-20-2020 04:06 PM
Hi All,
Program from attached 3 files works fine. I want to change CallExample.vi to keep all variables together but get broken lines, like this picture.
The error explanation is
========
Only VIs owned by a LabVIEW class may use dynamic terminals in the connector pane
Dynamic dispatch terminals are allowed only on the connector pane of VIs that are members of LabVIEW classes.
To correct this error, add this VI to a class or edit its connector pane to change the dynamic input terminal to a simple required terminal.
==========
Any suggestion without usage of classes?
02-20-2020 04:27 PM
You need to select the type specifier that you wired into the Open VI Reference and browse to your TaskExample.vi again. You modified the the VI or the cluster typedef and the type specifier was no longer reflecting the correct connector pane.
Now, you should eliminate the framed sequence structure as it is not needed. Rely on data flow to control the sequence of operations. Also, get rid of the local variables and replace them with shift registers.
02-20-2020 05:34 PM
Update of the type specifier doesn't help After upgrading the type specifier Example.ctl needs to be upgraded and then another line will become broken.
I added the framed sequence structure for visibility. I used local variables to see that loops work. The program doesn't have any meaning except shows the question.
02-20-2020 05:42 PM
Take the task example and drag it onto the connector pane. Wires are no longer broken.
See below.
I did not test the VI.
mcduff
02-20-2020 05:45 PM
You do not need to update the Cluster typedef. It is the VI Type Specifier input to the Open VI Reference. Also, when the reference wires break for the VI references, I find it helpful to delete them all and re-wire when the type specifier changes. I got everything to work after right clicking on the type specifier and selecting browse. Then I selected TaskExample.vi again and that resoled the broken wires.
Instead of the local variables, use shift registers in your local. The only time I use local variables is in code specifically for handling the UI. Generally there is no need to use them in your regular code. If you are using them quite a bit then you need to look at your code structure. Use the wires for your data.
02-20-2020 06:07 PM
It looks you try to help with differ issue. I attached vi which doesn't work.
I also don't like local variables but wire picture could be more painful. How do you like next picture?
02-20-2020 06:16 PM
You need to update the VI reference in the typedef cluster. Everything has to match. Update the typedef cluster in the same manner that you did the VI Reference above. You may need to update the VI reference again.
With respect to the picture you posted, it looks like poorly designed code. I hate to be brutally honest, but that is what it looks likes to me. I work on some VERY large and very complex projects and our code never looks like that.
02-20-2020 06:20 PM
@Mark_Yedinak wrote:
You need to update the VI reference in the typedef cluster. Everything has to match.
You end up with some weird cyclic operation where as soon as you change that, then the type specifier is not correct.
Instead use the VI reference INSTEAD of the type specifier. And as Mark suggested think about refactoring your code.
mcduff
02-20-2020 06:32 PM
@mcduff wrote:
@Mark_Yedinak wrote:
You need to update the VI reference in the typedef cluster. Everything has to match.
You end up with some weird cyclic operation where as soon as you change that, then the type specifier is not correct.
Instead use the VI reference INSTEAD of the type specifier. And as Mark suggested think about refactoring your code.
mcduff
Yes, it makes much more sense to pass the VI reference. I'm not sure why he would want to pass the VI type specifier around. It didn't make sense to me. Ultimately, that is the root of his issues though.
02-20-2020 06:54 PM
According LabVIEW help
vi reference is output and I do pass this vi reference into cluster and "Start Asyn Call vi"
How to pass vi reference as type specifier I don't know. When I drop my TaskExample.vi on Block diagram and drag into type specifier LabVIEW pushes vi back.
Can you explain what to do more clearly 😉