LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update Enum value connected to aquisiton while running

Hello,

 

I'm having a problema with the Enum component. I'm controlling the load of an eletromagnetic brake using the NI USB 6009. The level of resistance is on a list in a Enum component (the liste goes from 0 to 7). This Enum is connected to a case structure that contains the code for each level.

My problem is: I run a test of 12 minutes and I need to increment the load every 2 minutes. I've mounted the following code:

Capturar.PNG

 

where "Carga" is the load (resistance level), "Tempo percorrido do teste" is the time counter, "Incremento" is the increment time (2 minutes) and "Auxiliar" is just an auxiliary variable. The code is inside a RadioButton because the user has the option to choose between the automatic or manual increment. The thing is: it doesn't work (the load value is not being updated) and I don't know why.

Anybody knows what might be?

0 Kudos
Message 1 of 5
(2,713 Views)

Are you sure that the part of the code that does the update to Carga (load) which is a local variable, is activated?   I would suggest adding probes to make sure.

 

It is difficult to see what is going on overall, but using the increment node to read and write would work.

 

Also, it seems that in a generic way, the code could be reading the local variable in another area, and then later on it uses the value, not knowing that it has updated since it was read "in another area".  

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 5
(2,709 Views)

For the manual increment of the load (when the user click on the increment/decrement button of the Enum) it works correctly and the other part of the code where the load appears is the part where it's connected to the case structure that sets each resistance level.

My knowledge of Labview is something between basic and intermediate, so I'm having difficulty with this.

0 Kudos
Message 3 of 5
(2,698 Views)

Olá Sérgio,

 

Você poderia me enviar o seu VI para eu dar uma olhada?

 

Hello Sérgio,

 

Can you send me your VI so I can take a look at it?

 

 

Plínio Costa

Application Engineering

NI Brazil

Plínio Costa
Senior Techinical Support Engineer
National Instruments Brazil



0 Kudos
Message 4 of 5
(2,675 Views)

Hi,

 

WIthout looking at all the VI it is difficult to diagnose.  From the graphic I see that the CARGA is read at some point and passed to the DAQ assistant.  There is no way to tell when the value is read and passed to the DAQ assistant.

 

However, it seems strange that after each loop that the value doesn't update at all.  Is this correct, the CARGA value never seems to update when it is passed  to DAQ assistant?  Not sure where in the code "the load value is not being updated".

 

There is no loop in the picture.   Some more detail would help.

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 5
(2,657 Views)