LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print via boolean button

Hello,

 

I am trying to print the front panel via a boolean button.

Currently, I am using the menu bar drop down to print the front panel but I would like to do this via a boolean button (using the default printer).

 

I have tried to wire the current vi path to an easy print VI to no success.

If someone could take a look at the attached file and/or guide me in the right direction, your help will be much appreciated.

 

Thanks!

Dan

0 Kudos
Message 1 of 3
(2,573 Views)

Have you tried the Invoke node?

Example_VI.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 3
(2,568 Views)

Yes, use the "print panel" method.

 

You have not shown us how you are using the report generation tools, so we cannot say what you are doing wrong.

 

Some general comments on your code.

 

(I won't comment on the upper loop, because it seems incomplete)

Lower while loop:

  • your feedback node makes no sense since it is not initialized. Your array will never contain more than zero or one elements. (It starts out with zero elements, then you delete it, reverting to zero elements, then you insert one element. In the next iteration you delete it and insert another one in its place. Seems absolutely pointless. You could get the same functionality with a plain scalar boolean initialized shift register and no feedback node at all.)
  • Your  small FOR loop is pure rube goldberg code, just use "OR array elements", for example (since the array contains never more than one element. Changing the array to a scalar as described above would also eliminate all this.
  • In your case structure you write to the same local variable and to the same property node in both cases. SInce the operation occurs in both cases, these things belong outside the case structure. Simply write them to the iverted boolean. Only one instance each needed. also eliminate the local and place the terminal in its place. Only the subVI call belongs inside the case structure.
  • Breaking a long wait into chunks using a conditional FOR loop seem clumsy. Why not use a state machine?
0 Kudos
Message 3 of 3
(2,542 Views)