Search the Community

Showing results for tags 'ping'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • DAQFactory
    • Alarming
    • Channels, Conversions and general data acquisition
    • Graphing
    • Logging
    • Modbus
    • Networking: web, email, FTP etc.
    • PID
    • Screen Components and User Interface
    • Sequences and scripting
    • Serial Communications
    • General DAQFactory
    • DAQFactory and the LabJack
    • DAQFactory Express
    • DAQConnect
    • DAQFactory New Feature Requests
    • The DAQFactory Guru's Articles
    • DAQFactory Newletters

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Sometimes it can be hard to tell if a failure to communicate with a device is caused by a networking issue (cut cable, no power to remote device) or something else (protocol error, etc.) In these cases, the first thing we tend to do is ping the device. A successful ping at least tells us that the device is powered up and the IP is accessible from this computer. It doesn't tell us if the device will allow us to connect to it, a firewall is blocking the desired ports (say 502 for Modbus), or other issues, but it does eliminate some possible problems. There are many times when we wish to do this automatically. So, here is a simple script we'd like to share that you can use to ping a device from script: function checkPing(string ip, string path) system.ShellExecute("cmd","","/C ping " + ip + " > " + path, "", "hide") delay(5) private h = file.Open(path,1,0,0,0) private string data = file.Read(h, file.GetLength(h)) file.Close(h) return(find(data,"TTL=",0) != -1) It does this by triggering the command line ping, just like you would type it, and then piping the result to a file. Then it opens the file and looks for "TTL=" which really only appears if a ping is successful. The delay(5) is to give the ping command time to execute as there is no way us to know. ShellExecute() is a non-blocking function, meaning it will trigger the command but then immediately return. Because we are using command line piping we have to have shellExecute() run "CMD" not "Ping" directly. We pass the /C flag to CMD to tell it to run the Ping command then quit. The design of this function is to allow you to, in script, check the network status on many devices. Simply call this function with the ip and a path to the file you'd like ping to create with the result. You'll want to make sure if you are calling this function from multiple threads for multiple IPs that you pass a different path. Note also that this function will take at least 5 seconds to run, so don't call it from the command line or a button press. Make sure and call it from a sequence running in a background thread.
  2. Hi, What is the best way to test connectivity of RS485 and TCP devices ? I want to test devices and if connection fails (like wire broken, radio connection lost etc ) device will be on alarm list..? I guess that result can be added to virtual channel like 0 or 1 for each device ??