Jump to content

Update string from two locations

Recommended Posts


I need to update the On screen logger in my Vi front panel to be updated from 2 location or rather multiple locations..

Basically i need to log the data that i have sent on to the port (Request) and the data tat is recieved from the port (Reports in response for the request i have made) .

- Madhav.


Share this post

Link to post
Share on other sites

This is where a simple action engine would serve you quite well. You can have two basic actions (add line, read log) and because it's a single VI, it will make sure that things work in the correct order. You can use the read action to get the log and place it in an indicator.

I was bored enough, so here's a simple example. It has no error handling and things like that, but it shows the basic concept of how this can be done with a class. The big advantage with this is that you can easily create a separate VI for each action and that if you want another logger, you just call the New VI again and you get a new logger object.

Log Example.zip

Share this post

Link to post
Share on other sites

I would use 2 queues since command-response are instrinsicly ordered.

Place your command onto a queue. When a response is received, read an element from the command queue and add it, AND the response onto another (log) queue.

Then all you need to do is read the log queue to display the message-response list.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.