Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure dentro de una CompactRIO

Hola!!

 

Estoy realizando un proyecto en el que tengo conectada una CompactRIO al ordenador. Los ficheros .vi que estoy creado se encuentran dentro de la CompactRIO, pero en el micro, no en la fpga. En el fichero .vi tengo metido un Event Structure, pero no funciona. He estado leyendo que puede ser porque es un evento estático y que debería ser dinámico. Sin embargo, he probado a modificarlo a uno dinámico y tampoco funciona. He abierto el ejemplo que proporciona LabVIEW de una carta de la bajara que se puede arrastrar cuando se hace clic con el ratón. Si el fichero lo meto en el proyecto, y el fichero lo coloco en mi PC, este sí funciona, pero en cuento coloco el .vi en el apartado de la CompactRIO, este no funciona. Por eso no creo que el problema sea que el evento sea dinámico o estático.

 

Lo que tengo que conseguir es ver si unas variables han cambiado de estado, y cada vez que hayan cambiado de estado realizar una acción. La forma más óptima es con un Event Structure, pero no me funciona, como he mencionado. Tengo que conseguir esto sin tener ningún .vi en el PC.

 

La CompactRIO es una 9039. El LabVIEW que estoy usando es del 2020.

 

Gracias de antemano.

0 Kudos
Message 1 of 5
(208 Views)

@nm001 wrote:

Hello!!

 

I am doing a project in which I have a CompactRIO connected to the computer. The .vi files that I created are located inside the CompactRIO, but on the micro, not on the fpga. In the .vi file I have an Event Structure, but it doesn't work. I've been reading that it may be because it is a static event and that it should be dynamic. However, I have tried modifying it to a dynamic one and it doesn't work either. I have opened the example provided by LabVIEW of a dropdown chart that can be dragged when the mouse is clicked. If I put the file in the project, and I place the file on my PC, it does work, but if I place the .vi in the CompactRIO section, it does not work. That's why I don't think the problem is whether the event is dynamic or static.

 

What I have to achieve is to see if some variables have changed state, and each time they have changed state, perform an action. The most optimal way is with an Event Structure, but it doesn't work for me, as I mentioned. I have to achieve this without having any .vi on the PC.

 

The CompactRIO is a 9039. The LabVIEW I am using is from 2020.

 

Thanks in advance.


See Event Structure Support in LabVIEW Real-Time

We can provide better recommendation if you attach your code.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 5
(174 Views)

Te dejo adjunto el proyecto. Ayer no podía subirlo porque no tenía acceso, pero hoy ya si.

 

Necesito que el Event Structure del fichero Movimiento.vi se ejecute cuando haya un cambio de estado en las variables subir y/o bajar.

 

Muchas gracia de antemano.

0 Kudos
Message 3 of 5
(145 Views)

Event Structures Are Not Working on My CompactRIO in LabVIEW

To work with Event Structures on those, you should first enable their Embedded UI on MAX.

Another possible alternative to using event structures on the cRIO target is to use a polling loop instead. A polling loop is a loop that continuously checks the state of a control or indicator and performs an action based on the state. For example, you can use a while loop with a shift register to store the previous state of a boolean control and compare it with the current state in each iteration. If the state has changed, you can execute the code you normally would in the event case. You can also use a wait function inside the loop to reduce the CPU usage.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 4 of 5
(129 Views)

He probado lo del Embedded UI en NI MAX y sigue sin funcionarme.

 

¿Lo del Shift Register se haría con el bloque Event Structure puesto también o sin él?

0 Kudos
Message 5 of 5
(102 Views)