DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

ICom TCP/IP Connection Error TIMEOUT

Hey everybody,

 

Im trying to connect a gas analyser to dasylab with an ICom Modul. The Computer and the measuring device are connected by ethernet connection and the port is 7700. So far im sure that this is right. The commands/strings what im sending there should be the right one too. Still, whenever i want to run the Programm or i try to send a single command by ICom Monitor i get the error, what says: Error in Function WriteUdi. Mistake is TIMEOUT.

 

I don't know what i can to as a next step to solve this problem. I would really appreciate if someone here has any idea what i could do. 

 

Thank you!

 

Daniel.

0 Kudos
Message 1 of 9
(4,890 Views)

Sorry about only replying to this a week later, I just saw the post. The ICom module can read in ethernet data from a variety of custom protocols, but it is really necessary to get it correct, otherwise it will potentially timeout while it waits for the incorrect parameter. We build embedded devices and create our own protocols for exchange over ethernet and serial connections. The image shows the Icom module taking 1000 points at 10000s/s from 8 channels. The sine waves shown were 60Hz applied to 2 channels of the device. If possible it is good to start with a terminal like Putty to verify the strings are correct. Let me know if you still need assistance.Icom.PNG

0 Kudos
Message 2 of 9
(4,835 Views)

Hello robertoweninc,

 

thank you for answering the post.

As long as im only using the ICom-Master to request data, I don't have any Problems with the TIMEOUT-Error. The Problem starts, when I'm sending commands with the ICom-Exit to the machine. Meanwhile I could run the machine with over DASYLab, but from time to time the Error still appears and DASYLab is running really slow, it feels like it stucks from time to time, and the Signal or the Data what im requesting from the machine arrives really late. So realtime monitoring is impossible. Could you think in what can cause that Problems or where to look for it?

 

Thank you.

0 Kudos
Message 3 of 9
(4,803 Views)

Slow response can be where it is not seeing characters arrive in the way expected, the device changes number of characters to something other than expected, unexpected characters are added, expected characters are removed, etc.

 

Another thing that can cause a slow response in large amounts of data per response. It could take 100,000 characters could take 30 sec or so.

 

If it is ASCII data, a really good way to test the string is use a terminal emulator like putty, capture the full data exchange, and look at the number of characters (spaces and all).

0 Kudos
Message 4 of 9
(4,799 Views)

Hello,

 

thank you. Because of my company i cannot easily download new programms. But wouldn't it be enought to count the arriving characters in the ICom-Monitor? 

 

dan195_0-1617016104654.png

 

0 Kudos
Message 5 of 9
(4,789 Views)

Yes. If the data stream is short enough fit in the monitor window. It looks like that is the case with the data stream you added.

 

The thing that could be causing the pause again could be not processing the string correctly or lack of response by the device.

 

I point out lack of response by the device possible problems, even though you will probably confirm some of these may not be the case; connection problem could be caused by power off, switch problem, cable problem (damaged, too long, etc.). Also, it is best to load DASYLab after the device is ready, to be communicated with.

 

In the DASYLab documentation of the ICom String parsing it has a great example of how to handle ASCii:

 

Examples
The following example reads four values from a string in the ASCII format. The first value is four characters long, the second value is six characters long, the third value is four characters long, and the fourth value reads all characters to the end of the row.

Expected string 2o56 123459001 12<LF>
Format string 1. value 4a 2o56
Format string 2. value 6a 12345
Format string 3. value 4a 9001
Format string 4. value a\n 12

The following example reads from a string three values, which comply with a specific identifier in this case the channel name.

Expected string CH21027CH147CH3820<LF>
Format string 1. value "CH2"4a 1027
Format string 2. value "CH1"2a 47
Format string 3. value "CH3"3a\n 820

 

It points out that you can put in parts of the string to look for and then value. If you need to read multiple channels from the same string, you enter the Format string value into each ICom channel. ASCii is shown in the example but a similar method is used for Byte data.

 

If it is working mostly, you are close. It is a good idea to look at what is setup now in parts and see what is missing.

 

A good way to start is to have all the examples of things you want to do and the responses (use Excel to help work it out, have 1 character or Byte per cell, 1 transmit string in 1 row response string in next, etc). Any change in string length can be important (parameter number of response characters/bytes changed by device dropping trailing zeros, etc.). While some of the string exchange info is entered per channel, in the options you may need to have start, stop, and reset depending on your device (I use start and stop for mine, but not reset).

0 Kudos
Message 6 of 9
(4,784 Views)

Hello robertoweninc,

 

thank you for your answers, those are really good ideas. I could now find another solution. Instead of requesting the data over the master i send the commands cyclical through a generator with the ICom-Exit and i put a Timeout with the same frequence as the generator in the master. The programm runs fast and without the error.

 

Thank you for your help.

0 Kudos
Message 7 of 9
(4,779 Views)

Glad to help. Your idea is also interesting. We like DASYLab at Robert Owen Inc. and some of us have been using it for almost 30 years. It is a very fast way to get things done in data acquisition and control without programming. Also the layout graphics are great. Good luck with your application.

0 Kudos
Message 8 of 9
(4,771 Views)

Yes it's an really useful tool, thats true. Thank you a lot. 

0 Kudos
Message 9 of 9
(4,762 Views)