03-27-2009 11:41 AM
Hi folks,
I am using the code shown to calculate the speed of a rotary encoder. The code is run on a 9014 FPGA and is reading a 9411 module. If I set the 'Timeout's to -1 (i.e. no timeout) the code behaves. However, when I wire a value to the timeout terminal the code appears to timeout immediately.
I hqave tried feeding various values in as the timeout period in case of overflow but this made no difference.
Any thoughts?
Kevin Giles
Solved! Go to Solution.
03-31-2009 06:20 AM
Hi Kevin,
Is this happening in emulation mode or in deployed mode? This occurs in emulation mode due to the timing being different, you should set a much higher timeout in emulation mode that the equivalent deployed code.
I have tested this deployed and it worked successfully. If you are seeing issues in deployed code what version of LabVIEW are you using? Could you send your actual code so I could test it here? Does it behave any differently if you have a new Vi with just the wait in?
Let me know which mode you are using and any additional information/
Regards,
04-02-2009 12:12 PM
04-02-2009 12:24 PM
Hi James,
I have only been running it in deployed mode. I am using LV 8.6.1 with the NI Rio 3.1 patch (i.e NIRIO31.zip).
I will try it with just a wait in when I get a chance. I am using 'Wait on Rising Edge's elsewhere in the code with no problem. However, this is the only case where the timeout is used.
Many thanks,
Kevin Giles
04-03-2009 10:04 AM
What mechanism underlies the 'Wait on Rising Edge' method? We have been thinking of various scenarios that would be affected in different ways by different mechanisms.
I assumed it would be done by callbacks in which case parallel processes using the 'Wait's on an i/p would not interfere with each other. Is this assumption correct?
Cheers, Kevin Giles
04-03-2009 10:33 AM
Hi Kevin,
I am just trying out your code now and will let you know if I can draw any conclusions from it.
Because its is on an FPGA it will not use traditional software mechanisms such as callbacks and again because of this not they should not interfere with each other although I do not know what the exact underlying mechanism is.
04-08-2009 05:48 AM
Hi Kevin,
Apologies for the dalay, I have managed to run your code and believe I am seeing the same issue but I need to do a little more testing to see if there is anything we can do about it.
Regards,
04-08-2009 07:44 AM
Hi James,
Okay, thanks.
Kevin Giles
04-08-2009 09:08 AM
Hi Kevin,
Apologies I can't believe I didn't notice it before! One of your case structures is the wrong way around. The one containing your 3rd invoke note should wait for the rising edge if your low level doesnt timeout, not if it does! I believe this is correct please let me know if not. I have just tested it the other way around and it appears fine now.
Regards,
04-09-2009 06:25 AM
Hi James,
You can't believe it? How about me? Duhhhh! I spent ages staring at this & missing the obvious :(.
Anyway, many thanks for your help.
Cheers,
Kevin Giles