09-08-2015 02:13 AM
Hi guys,
I am finding it challenging to use an event structure to trigger my code for intitialization.
This is because I have a problem with the values displayed in the indicators when I reset my code.
All I want is something that reset my analog output to zero at anytime when a boolean button is pressed.
Is there anything I can use to perform this other than using event structure?
Kind Regards,
Opuk
Solved! Go to Solution.
09-08-2015 06:44 AM
Please stick to your original thread. http://forums.ni.com/t5/LabVIEW/EVENT-STRUCTURE-INDICATORS/td-p/3188540
Also, please unstick your caps lock key while typing your subject line.
09-08-2015 07:46 AM
Hi Ravens Fan,
Thanks for the response and advise. Point noted.
Kind Regards,
Opuk
09-08-2015 02:52 PM
The simple answer is
1. "don't use event structures in FPGA".
2. "always provide initial values for the shift registers." (I think that will fix your problem)
You should be able to take the reset button (probably switch until released), and use a selector. If true, use '0', otherwise, use the input. You may want to use another selector to use the previous value if there was an error from the input block.
I'm not sure how the .vis you posted relate to your question. I didn't see any event structure in the FPGA 10.vi, and HOST 10.vi looks empty.
As a side note, the slew rate you wrote using 'select' blocks can be done nicely with an 'in range and coerce' instead (x=target, limits=prev+/-1). And instead of +1/-1, you can add or subtract the slew rate you want (um/100us, and set tick delay for 100us).
09-08-2015 04:13 PM
ZX81,
1. If you took a close look at the VI's that were attached, there was event structure in the FPGA code. I can't even drop an event structure in an FPGA VI.
2. "Always always provide initial values for the shift registers" is not at all an accurate statement, and has nothing to do with the problem that Opuk describes.
3. It isn't worth replying into this thread. It was already pointed out to stick with the original thread. Replying into this thread just duplicates efforts and just disconnects all conversation from previous conversation.
09-08-2015 07:51 PM
Hi ZX81,
Thank you so much for the response. RavensFan already fixed my problem. You can find it at http://forums.ni.com/t5/LabVIEW/EVENT-STRUCTURE-INDICATORS/m-p/3188782/highlight/false#M923499.
Best Regards,
Opuk