LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error message over TCP/IP???

Is it possible to send an error message to any user in a network? The labview application is running on a pc in a network, so I want to use the TCP/IP function to inform a specific member in the network when an error occurs. I have no idea how to realize it. I would be appreciate you can help me.
 
How are the efforts?
0 Kudos
Message 1 of 7
(3,138 Views)

What do you mean by "any user in the network"? Are you refering to another LV application? Just a computer?

And what kind of error data do you want to pass? Do you want to send the error cluster and log it? Send a string and pop up?

You can find some examples and tutorials for how to implement TCP communicators both in the example finder and on this site. It's very simple in LV.

If you just want a popup and you're using windows, you can try using  the windows net send command, which usually gets around most firewalls and doesn't require any LV app on the remote computer. You can run it using the System Exec VI.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,129 Views)

Hi,

I suppose you are referring to LV error message and that the clients are running a LV application. The error cluster contains 3 items: status, error code, error message. You can convert them to 3 strings and concatenated them with a known separator; you can then send this string by Tcp/Ip (see related LV examples). The string can be converted to an error cluster by the clients.

Take a look at the basic vi attached  that shows the principle.

Please tell me if I didn't catch the problem.
Alberto
0 Kudos
Message 3 of 7
(3,128 Views)
Sorry tst, I gave my answer without seeing yours...Smiley Wink
0 Kudos
Message 4 of 7
(3,128 Views)

That's OK, Alberto.

BTW, if both sides have LV, it's usually easier (and less error prone, more flexible and so on) to use flatten to string or type cast to a string and then on the other side unflatten or type cast back to the original data type (in this case an error cluster).


___________________
Try to take over the world!
0 Kudos
Message 5 of 7
(3,123 Views)

Thank you very much for your fast answer. I want to realize that a popup open on windows pc in a network with a message that any error in a labview app occured. For example somebody interrupt the loop of the App by pushing a stop button. So the admin should get a message in form of a pop-up. U write sth about  System Exec.VI,  do you have an example???

 

 

0 Kudos
Message 6 of 7
(3,119 Views)

The System Exec VI (which can be found in the Communications palette) is fairly easy to use (right click it and select Help for some details). You can search google for more details about the "net send" command (which is windows, and not LV).

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,112 Views)