Madhav Posted December 31, 2010 Report Share Posted December 31, 2010 Hi, 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. Quote Link to comment
Yair Posted December 31, 2010 Report Share Posted December 31, 2010 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 Quote Link to comment
ShaunR Posted December 31, 2010 Report Share Posted December 31, 2010 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.