LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

disable automatically close references

Dear Frinds

I am working on a project which cotains a main VI and a sub VI that starts when I press a button "Input/Output Setting" botton on the FP. 

When I run the code for the first time the main Vi Runs correctly but the sub VI does not run correctly and returns Error1556

When I run the code for the Seccond time the main Vi Runs correctly and the sub VI runs correctly this time.

Consider that in these executions I do not make any change in the code but only I "Abort Execution" and run it again.

Please see the attachment.

What is the reason of this Error and how can I solve it?

Thanks in advance 

 

Sincerely

V.S.

0 Kudos
Message 1 of 8
(3,756 Views)
I can't look at you code right now, but I would be looking in the subVI to see what reference it is that is invalid.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(3,723 Views)

Dear Mike

Why can not you see my code? is it a problem with the Labview version?

 

Regards

0 Kudos
Message 3 of 8
(3,676 Views)
No I'm on my phone right now...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 8
(3,660 Views)

It's hard to say why you are getting the error since you don't have your error clusters connected. At this point you can't be sure that you are getting a good modbus reference going into the loop. Also, you need to get rid of the sequence structures, use the error clusters to set the order of execution. You should also learn a bit about state machines, that will help to simplify your code.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 5 of 8
(3,597 Views)
Dear Mikeporter Thanks for the reply. There was good points in it about my clumsy code. As you see in the attachment I changed the code: I got rid of the sequence structures and wired the Error Clusters to set the execution order but still the problem exist! what do you think I should do with the problem? Sincerely V.S.
0 Kudos
Message 6 of 8
(3,581 Views)
First, there was no attachment... Second, if you run your code with execution highlighting turned on, where is the first place you see an error?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 8
(3,559 Views)
Dear Mikeporter Thanks for help. I found the problem by checking the code step by step using highlight. the problem was in a shift register which I forgot to use in a For loop. Regards V.S.
0 Kudos
Message 8 of 8
(3,529 Views)