LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Crio event structure not working

I am trying to have an event structure that increments a value to work on a real time VI. I had it decreasing the value by polling, but it wasn't decreasing once per click, now it won't decrease at all. The event structure is in the RT.vi on the cRIO and the increment button is on the host PC.

 

0 Kudos
Message 1 of 5
(3,066 Views)

Hi atokad,

 

several fails…

 

- an event structure will NOT fire on programmatic change of indicators

- an event structure will NOT fire on changes of indicators - instead it will react on user interaction in the frontpanel and so only on changes of controls

- the event structure will NOT work at all (atleast for frontpanel elements) on the cRIO as the cRIOs work "headless" without frontpanels…

 

Why don't you just test for value changes of your "increment" shared variable? Maybe by using the PtByPt-BooleanCrossing function?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,061 Views)

Event Structures do not work on indicators and they do not work with writing to controls with local variables.

 

In general, I find Network Published Shared Variables to be truly evil (and I am the one who defended Global Variables at NI Week).  You should use explicit TCP/IP or Network Streams to send data back and forth between your cRIO and PC.  I found this to make things more responsive, use less network bandwidth, and it is more of a command based instead of polling.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(3,054 Views)

@crossrulz wrote:

Event Structures do not work on indicators and they do not work with writing to controls with local variables.

 

In general, I find Network Published Shared Variables to be truly evil (and I am the one who defended Global Variables at NI Week).  You should use explicit TCP/IP or Network Streams to send data back and forth between your cRIO and PC.  I found this to make things more responsive, use less network bandwidth, and it is more of a command based instead of polling.


I am self taught in Labview and shared variables were the easiest for me to understand, could you maybe give me an example of how I would convert this VI from shared variables to TCP/IP because I've tried to do it in the past and have had no luck.

 

Sorry it took me so long to respond I was out of town for the past couple of days attending a football game!

0 Kudos
Message 4 of 5
(3,010 Views)

@atokad wrote:

I am self taught in Labview and shared variables were the easiest for me to understand, could you maybe give me an example of how I would convert this VI from shared variables to TCP/IP because I've tried to do it in the past and have had no luck.


I recommend using the STM library (free in the LabVIEW Tools Network).  It contains a couple of good examples.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,001 Views)