LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA_ARDUNO_CHANNEL WIRES

Solved!
Go to solution

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 27
(1,577 Views)

I mean triggering an existing event case.

0 Kudos
Message 12 of 27
(1,567 Views)

@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

Message 13 of 27
(1,565 Views)

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...

0 Kudos
Message 14 of 27
(1,558 Views)

Bob Schor what about event messenger? I tried that and It works! Do you suggest me that?

0 Kudos
Message 15 of 27
(1,532 Views)

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

Message 16 of 27
(1,525 Views)

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

 

 

0 Kudos
Message 17 of 27
(1,521 Views)

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?

0 Kudos
Message 18 of 27
(1,479 Views)

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?

 

1.JPG

That is the event loop that feeds the handler loop.

2.JPG

That is the handler loop that have a feedback simulating a State Machine.

 

That is possible?

0 Kudos
Message 19 of 27
(1,474 Views)

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

0 Kudos
Message 20 of 27
(1,456 Views)