05-22-2007 09:35 AM
05-22-2007 10:06 AM
05-22-2007 10:19 AM
05-22-2007 10:31 AM
05-22-2007 10:40 AM
05-22-2007 11:03 AM
05-22-2007 11:09 AM
05-22-2007 11:16 AM
05-22-2007 11:19 AM - edited 05-22-2007 11:19 AM
Your overall program design is higly flawed. This calls for a single state machine with an event structure that handles all FP events. All your locals can be handled by shift regsters. Get rid of that useless stacked sequence!
Frame 0: Initialization belongs to the left of the state machine. CoordinatesArray should initialize a shift register (no locals needed). Use a boolean shift register to set state to either recording or not. Event for "record, value changed" will switch the boolean to be used on the other states.
Frame 1: "Clear" and "stop" need to be inside their own events. Running it parallel to the event structure is a no-no! Do you really want to record mouse movements on the entire FP or only on the picture area?
Frame 2: Why waste an entire frame on this? Here you clear it and in the next frame you prepend the cleared string to your data. Makes no sense.
Frame 3: An autoindexing FOR loop would be the right choice. A single formating operation can handle multiple values.
Frame 4: Writing the "coordinate string" seems useless, since you just cleared it two frame earlier. You are writing an empty string to a file! Right? Why invert the "canceled?" output, just swap the cases instead.
Frame 5: Unecessary! Once the VI runs out of code, the VI will stop automatically. The "stop" function also does not "close the program window" as you seem to indicate with a diagram comment. Check the online help.
Message Edited by altenbach on 05-22-2007 09:23 AM
05-23-2007 11:22 AM
@altenbach wrote:Your overall program design is higly flawed. This calls for a single state machine with an event structure that handles all FP events. All your locals can be handled by shift regsters. Get rid of that useless stacked sequence!
Frame 0: Initialization belongs to the left of the state machine. CoordinatesArray should initialize a shift register (no locals needed). Use a boolean shift register to set state to either recording or not. Event for "record, value changed" will switch the boolean to be used on the other states.
Frame 1: "Clear" and "stop" need to be inside their own events. Running it parallel to the event structure is a no-no! Do you really want to record mouse movements on the entire FP or only on the picture area?
Frame 2: Why waste an entire frame on this? Here you clear it and in the next frame you prepend the cleared string to your data. Makes no sense.
Frame 3: An autoindexing FOR loop would be the right choice. A single formating operation can handle multiple values.
Frame 4: Writing the "coordinate string" seems useless, since you just cleared it two frame earlier. You are writing an empty string to a file! Right? Why invert the "canceled?" output, just swap the cases instead.
Frame 5: Unecessary! Once the VI runs out of code, the VI will stop automatically. The "stop" function also does not "close the program window" as you seem to indicate with a diagram comment. Check the online help.
Message Edited by altenbach on 05-22-2007 09:23 AM