LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputs can not be modified from the Interrupt VI !!

Hi, 

I was trying to use the timer1 interrupt to see how does it works. I activated the timer1 interrupt from interrupt manager screen and enabled the interrupt including the glibal interrupt enable. then i added a new VI to the project to use it as the interrupt service routine. i addeda global variable and i can modify the global variable from my interrupt VI. so far everything works good. but as soon as i add some simple code to modify the output bits of the MCB2300 (LED0 to LED7) it gives me some error. it builds the project, I can download it to the board but after running it stops the processor and gives some error. If I copy and past the same code from my interrupt VI to the main VI it works without any problem.

 

any idea why it reacts like this?

why I can not modify any outputs from my interrupt VI?

 

Besrt regards

0 Kudos
Message 1 of 4
(6,135 Views)
The RTOS does not like it if you allocate anything in an interrupt function.  You can either move this process into the main thread by polling a global that is set in the interrupt, or you can set the interrupt to be "threaded" (this setting allows you to do anything you would in a normal VI).
0 Kudos
Message 2 of 4
(6,130 Views)

Hi,

How can I configure the intrrupt as threaded?

 

Thanks

0 Kudos
Message 3 of 4
(6,119 Views)

You should be able to just check a box named "Use thread" on the interrupt manager page.  Note that this option does add latency.

 

Here is the doc on the interrupt manager page:

 

http://zone.ni.com/reference/en-XX/help/372459C-01/lvembdialog/arm_int_mgr_page_db/

0 Kudos
Message 4 of 4
(6,114 Views)