LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clear array or indicator

I have a problem were I capture the load from the serial port and put this into a a little routine wich uses a shift register to capture the peak load value and maintain this value until 1- either I press a button or until 2 - the Main vi start is pressed again .The way I have it set up at the moment is it retains data in the shift register and It dosnt truly zero the indicator of all history , Is there any easy way to do this or what anm I doing wrong , I only have version 6 but any help or example would be greatly appreciated. I have included the example , but dont forget the random number generator is actually a generated data from my load machine .
Thanks

Brett Scott
Western Australian School of Mines
Snr Mining Engineering Technician
Western Australian School of Mines
Curtin University of Technology,
Locked Bag 22, Kalgoorlie Western Australia 6430
Ph: 08 90886159 Fax: 08 9088 6151 Mobile: 0407441251
Web http://research.wasm.curtin.edu.au/
0 Kudos
Message 1 of 8
(3,612 Views)
Hi,

I am trying to understand your problem. Can you be more clear about your objective. For time being, forget what you have done in attached vi, just explain what you want to do.

Regards,
Nirmal Sharma
0 Kudos
Message 2 of 8
(3,612 Views)
This might be the thing you are looking for...
0 Kudos
Message 3 of 8
(3,612 Views)
With your attached VI, the shift register/while loop setup is completely useless as your random/simulated data is generated outside of the while loop. Therefore it wouldn't matter how many times the while loop ran, it would always have the same data value going in on the left. You're not implementing your idea of maintaining the peak value either, as all you're doing is checking for the max value in the whole array post-looping. As such, the "history" of your indicator is no more than one value.

I'm guessing that either you do want to simply find the maximum value at the end of the data collection and want to clear the indicator each time the VI is run/you click on a boolean button, or you want to update the max value indicator in realtime during the data collec
tion and have the ability to reset it while the VI is still running. Both are easy to do, just let us know which method you want.

Best regards,
James.
0 Kudos
Message 4 of 8
(3,612 Views)
Hi thanks for everyones help, I have included the problem , but basically the peak load clear dosnt work correctly, it captures peak load fine,but when I clear it with the switch on the front panel it momentarily clear's then seems to go back to a number that is in the shift register.I am aware that if I stop the whole application it will truly clear ,but I would like to retain this peak load until I press button .
James - You guessed correct , that is pretty much everything I wish to do, I do not want to clear when I press the stop boolean.

There is a little custom blink indicator there that is screwed up also , "I am recieving data (displacment) and wish to represent this as an arrow blinking up or down depending on the number when the displ
acment data is increasing the arrow blinks down and the opposite for negative displacment ,Does anybody know a easy way to do this .

Any more help or thoughts would be great !
Snr Mining Engineering Technician
Western Australian School of Mines
Curtin University of Technology,
Locked Bag 22, Kalgoorlie Western Australia 6430
Ph: 08 90886159 Fax: 08 9088 6151 Mobile: 0407441251
Web http://research.wasm.curtin.edu.au/
Download All
0 Kudos
Message 5 of 8
(3,612 Views)
Thanks for posting your app - seeing how everything is supposed to work in the grand scheme of things definitely helps!

You need the shift register to be on the big while loop that surrounds your whole app. At the moment it's confined to the "false" case triggered by the state of your button, which is why it isn't affected when it goes "true".

This amended VI should do it - I only downloaded your main app so you'll probably have to relink the sub-VIs.

Cheers,
James.
0 Kudos
Message 6 of 8
(3,612 Views)
Thanks , but unfortantly i only have poxy base package version 6 ,I'll see if I can get someone to recompile in V6.The extract packets vi I attached is a neat little vi wich returns an asci Packet.

Thanks for the help

Brett Scott
0 Kudos
Message 7 of 8
(3,612 Views)
James

Thank you for the help i managed to open it and see what you had done , The shift register on the main while loop did the trick. Do you have any suggestions for the blinking indicators?

Anyway Thanks again

Brett Scott
Western Australian School of Mines
0 Kudos
Message 8 of 8
(3,612 Views)