LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure?

Hi /Y

 

Thnak you for the suggestions. I have had a good learning experience with this one. My first serious go at dynamic vi's, and your tips certainly reduced my code significantly

 

The idea of using the modulo functionm is interesting to remove the select, less or equal to and increment functions, but even though I could code it in text-based editors I'm stumped as to how to implement it here.

 

As I said in my OP, the leds are only to debug, so I wasn't concerned about the niceties of the code. They will be removed once the pages go in.

 

I have reattached the code with the rewrites, and would once again value your opinion.

 

Regards

Ray

 

0 Kudos
Message 11 of 13
(532 Views)

Hi Ray,

 

User events is good training, but in this case not necessary at all (depending on if you want to optimize the code or get the training). In the Pane event you fire a user event, you can just skip the user event all together and change your existing PageS-event to Pane:MouseDown. 😉

 

Modulo is Quotient & Remainder in Numeric functions group. It'll give both "(int) x/y" and "x/y - (int) x/y" i.e. "x%y" as outputs.

 

As you're starting to notice LV has many good built in functions, making it easy to reduce code.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 13
(514 Views)

For a moment I got confused as to which Ray was being referred to 😉

0 Kudos
Message 13 of 13
(486 Views)