10-03-2012 11:29 AM
Hi
Does the VI attached (RemoteON_OFF.vi) resolve your problem?? Let me know!!!!
10-04-2012 03:07 AM
Hi bronzacuerta, you sure come from Italy I think precisely from Veneto 🙂
I can't open your vi with my Labview 2011
The problem in the vi I am building is that I have an event structure that is feed by a BUTTON (working in latch mode, because the code inside the event have to run only on a true event of the button), this work perfectly,
but the vi have to run even with an automatic sequense: read some istructions from a file and do theese instruction at the time each row of the file say "ok do this".
So in automatic mode, every time the current time stamp is greater than a time stamp of the row (of the file) -----> the vi enter in a case structure and do sometings, after these sometings the BUTTON have to feed the event structure. This is because I am trying to use the value (signl) property.
Hope I was clear.
10-04-2012 03:35 AM - edited 10-04-2012 10:49 AM
@ghrsdr wrote:
Hope I was clear.
No, it is not clear at all.
Where does the "current time stamp" come from? Also from the file?
Maybe you don't need an event structure at all?
Is the file fixed or is it update from elsewhere?
Please be much more specific what should happen and under what conditions.
10-04-2012 04:45 AM
Well, I have a cluster of 8 number controls that set the values of 8 flux meters and a cluster of 8 ON/OFF switches that set 8 electrovalves.
Changing the values of the 8 number controls and "pushing" the "SEND FLUX" button (latch mode) the vi enters in an event structure that, by a for cicle, sends 8 specific commands (each per flux meter) by a serial port. So does another button "SEND EVL" that enters in another event of the event structure that open/or close the 8 electrovalves by sending 8 specific commands by the serial port.
The vi have to work even in an "automatic mode" reading a text file with a number of lines: each line says: "after xxx minutes set the flux1 to 1000, flux2 to 100, ecc...set EVL1 to ON, EVL2 to OFF, ecc ecc"
specifically the lines appear in this way: "100 1000 100 0 200 .... ON ON OFF OFF ON....."
starting the automatic sequence i have a time stamp that sets a variable with the "time stamp + xxx minutes read from each line of the file (one at time)" and this is the time at which each value of settings have to be sent to the two event structures (one for the fluxes, one for the electrovalves)
after the vi has read the line and updated the clusters of controls, at the end of the time count have to "push" the two buttons (one at time) to run the two event cases of the event structure.
The problem is how to simulate the physical action of pushing the buttons and enter the event cases?
Better than this I can't explain the question 🙂
10-04-2012 11:51 AM
Hi....
10-05-2012 03:32 AM
Yes this works 🙂 but unfortunately my ON/OFF button is in "latch when release" mode. Probably I have to put it in "switch when pressed" mode and find a way to enter the event structure only in the case it switch from OFF to ON.
10-05-2012 09:19 AM - edited 10-05-2012 09:20 AM
@ghrsdr wrote:
... and find a way to enter the event structure only in the case it switch from OFF to ON.
Entering the event structure is no problem if you make it contain a case structure that has an empty FALSE case while the TRUE case contains your important code.. 😄 You can wire the case selector to the "Newval" event data node.
10-05-2012 10:07 AM
Yes! Thankyou 🙂 using the "Newval" event data node I solved the problem.
All works good 🙂
By single steps all of you helped me to solve the problem.
Thankyou very much.
10-05-2012 10:17 AM
Typically you would mark the most helpful post as solution, and not your own post. 😮
10-08-2012 03:13 AM
Ooops..it was a mistake. Is it possible to change it?