07-03-2012 10:17 AM
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:
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?
07-03-2012 10:36 AM - edited 07-03-2012 10:37 AM
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".
07-03-2012 01:49 PM
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.
07-04-2012 08:45 AM
07-05-2012 08:46 AM
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.