LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Asyn Call function

 

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.

Vasilich2004_0-1582235395362.png

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?

Download All
0 Kudos
Message 1 of 40
(2,375 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 40
(2,369 Views)

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.

0 Kudos
Message 3 of 40
(2,353 Views)

Take the task example and drag it onto the connector pane. Wires are no longer broken.

See below.

 

Snap22.png

I did not test the VI.

 

mcduff

0 Kudos
Message 4 of 40
(2,347 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 40
(2,344 Views)

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?

Vasilich2004_0-1582243463069.png

 

 

0 Kudos
Message 6 of 40
(2,338 Views)

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. 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 40
(2,331 Views)

@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

Message 8 of 40
(2,327 Views)

@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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 40
(2,317 Views)

According LabVIEW help 

Vasilich2004_0-1582246096913.png

 

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 😉

0 Kudos
Message 10 of 40
(2,310 Views)