Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure not executing when value is changed

Hi everybody,

I have an event structure that exectutes on a value change, the problem is that I have matlab altering the value of a text file every few hours and labview monitoring the text in a loop (and converting it to a double),  this value i want to use in my event structure, so i set up my event variable as a value indicator and it seems to only want to execute if the event is from a control which is of no use to me. Any help would be greatly appreciated.

Thanks

 

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

You are using the wrong property. to programatically fire an event, you have to write to the Valeu (Signaling) property.

 

You should also work on making your wiring a lot neater ans eliminate all of the separate stop buttons. all you need is one.

 

p.s. for general programming problems, you should also post to the LabVIEW board.

0 Kudos
Message 2 of 5
(3,870 Views)
Thanks for the response, it still isnt working though, the event struc. will not execute even with the value (signal) property node. When i first execute the program i get the proper value for NewVal but then it remains constant thereafter even when "SET TEMPERATURE" changes. I have attached a simplified version of the previous VI with the suggestion, could it be that my loops are wrong?
0 Kudos
Message 3 of 5
(3,851 Views)
I don't have a file read, the instrument, and there is a missing VI. When I removed all the code that made it impossible to run, the event does fire. In fact, it fires constantly which makes sense since you do a write to the value (signaling) property in a while loop that spins constantly. I have no idea why you would not get the event firing with your hardware setup. Maybe it actually is and you don't realize it? Do you really want to call the event constantly? It would seem that it might be better to only fire if the text file changes.
0 Kudos
Message 4 of 5
(3,841 Views)

Thanks for all your help, I definately knew that the event was not firing because i had alternate means of displaying the value, the problem (apparently) was in the loops, when i placed the property node (value signaling) in the same loop as the event structure it began to work fine, don't really know why but problem solved thanks again for your help

cheers,  

0 Kudos
Message 5 of 5
(3,836 Views)