Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using occurances to trigger events outside a SCTL

I'm using occurances to trigger some events in my FPGA.
The triggers themselves happen in a SCTL, and set 2 occurances.
These occurances are then read in a parallel (non timed, obviously) loop and used to trigger actions in the FPGA.
The triggered events must be timed within a few clock cycles of the actual triggers, so occurances are used.
 
My problem is that I can't understand how the timeout functions.
My previous FPGA version worked OK with a timeout of approx 100-200 ticks, ignoring previous occurances. 
My later version, with slightly more code in the loop containing the occurances does not appear to want to trigger at all, regardless of timeout value (again, ignoring previous occurances).
 
I know that the trigger is happenning inside the SCTL, so I'm left confused about why the occurances are not triggering my events properly.
 
My understanding was that the occurance will ignore previous occurances and wait until either the timeout condition, or a new occurance happens.
 
Is this correct? Can anyone explain the proper way to use occurances?
 
Any help appreciated
 
Dan
 
 
 
0 Kudos
Message 1 of 4
(3,165 Views)

Hi Dan,

Most functions seen in the FPGA palette when you are targeted to the FPGA can be used in a Single-Cycle Timed Loop (SCTL). The following is a list of notable exceptions. These functions will not work inside the SCTL:

  • For Loop
  • While Loop
  • FPGA Math & Analysis VIs except Linear Interpolation
  • Look-Up Table 1D
  • Saturation Arithmetic VIs
  • Interrupt VI
  • Loop Timer VI
  • Quotient & Remainder function
  • Rotate 1D Array function
  • Timed Loop
  • Wait VI
  • Wait on Occurrence function
  • Non-reentrant subVIs if you use multiple instances
  • FPGA I/O Nodes for DIO lines for many DIO devices. For information on whether a specific device supports using the FPGA I/O Node within a SCTL consult the device specific section of the LabVIEW Help.
  • FPGA I/O Method Nodes and Property Nodes. Some devices that support using DIO resources in the SCTL also support some methods and properties in the SCTL. Consult the LabVIEW Help for device specific information.

I believe this is the reason that you are seeing this behaviour,

All the best,

Applications Engineer
0 Kudos
Message 2 of 4
(3,149 Views)

Ah, sorry it was the wait on occurances which were not triggering correctly.

The occurances themselves were being triggered correctly

 

I have found the source of the problem:

The event itself was locking the loop, except under certain rare conditions, which I happened to trigger the first time I ran it each session.

The occurances and wait on occurances were working as they should have according to the manual.

Embarrassing as always

 

Thanks for the help

Dan 

0 Kudos
Message 3 of 4
(3,145 Views)

Hi Dan,

No problems at all, normally with these things it turns out to be something thats obvious yet very good at not being seen, I'm glad your applications up and running now!

Thanks for letting me know,

All the best,

Applications Engineer
0 Kudos
Message 4 of 4
(3,143 Views)