LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga

Solved!
Go to solution

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

0 Kudos
Message 1 of 11
(4,227 Views)

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,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 11
(4,186 Views)
 
0 Kudos
Message 3 of 11
(4,162 Views)

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

0 Kudos
Message 4 of 11
(4,157 Views)

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

0 Kudos
Message 5 of 11
(4,131 Views)

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.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 6 of 11
(4,125 Views)

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,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 7 of 11
(4,058 Views)

Hi James,

 

Okay, thanks.

 

Kevin Giles

0 Kudos
Message 8 of 11
(4,051 Views)
Solution
Accepted by topic author kimdino

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,

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 9 of 11
(4,045 Views)

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

0 Kudos
Message 10 of 11
(4,016 Views)