06-29-2020 10:02 AM
@yamelbio wrote:It is posible to 'force' an event to occur? I mean to make it happend even if the event does not really happend....maybe with a feedback or something.
As in causing an Event Structure to do something? Look into User Events.
06-29-2020 04:21 PM
I mean triggering an existing event case.
06-29-2020 04:28 PM
@yamelbio wrote:
It is posible to 'force' an event to occur? I mean to make it happend even if the event does not really happend....maybe with a feedback or something.
Depending on what is going on in the rest of your code, it is certainly possible to simulate an Event. There are a number of ways to do this, but the question is so vague it is difficult to know where to start in order to answer it.
Here is one approach: Suppose you have an Event based on, say, the User pressing a Front Panel button (say "Go"). You have code in the Event Loop under the "Go, Value Changed" Event. You could create a User Event called "Simulate Go" and put it in a timing loop to "fire" its Event every 20 seconds. You'd wire the "Simulate Go" Event case exactly as you wired the "Go, Value Changed" case -- whatever you did in one, you'd do in the other (unless, of course, it said "Stop the Event Loop!").
Bob Schor
06-29-2020 06:43 PM
That's exactly what I am talking about! Thanks everybody! Thanks Bob.
If I may ask, when I work more and spent hours on my program can I show you? I am surely gonna need help to improve the code...
06-30-2020 11:26 AM
Bob Schor what about event messenger? I tried that and It works! Do you suggest me that?
06-30-2020 12:04 PM
I am always reluctant to venture an opinion without seeing and understanding the problem. I do not know what you really want to do, and I don't have (all of) the code you are using to try to accomplish your goals. So I cannot (and should not) make any comments.
Bob Schor
06-30-2020 12:31 PM
In labview examples, I see they use Event Messenger(EM) as the way to send information from a 1 or more producers to 1 or more event cases.
So, what I want?:
To use EM to trigger user events some time (I dont necessarily need that right now), I am just studying that.
Instead of create-generate events like Labview user events examples, I wonder if I can use EM. Thats it
07-05-2020 12:23 PM
Hi Bob Schor. Please let me ask you something: it is possible to implement a state machine using Channel Message Handler?
I have added a feedback in the while cicle that gets the "Message" to its own input, like the examples that you showed before. That can be considered a state machine? It would work?
07-05-2020 12:36 PM
I am sorry I did saw that you posted right here aun example of Channel State Machine.
My question would be if this is a good way to Do that?
That is the event loop that feeds the handler loop.
That is the handler loop that have a feedback simulating a State Machine.
That is possible?
07-05-2020 10:00 PM
I rarely look at pictures of code. I can't see "the whole picture", I can't edit the code, I can't try to run the code, I can't fix the code.
Attach VIs, please.
Bob Schor