Sockets (again !)

markymark31

Member
Join Date
Mar 2004
Location
Corby, Northants
Posts
60
Hi Guys,

Muddling through socket communications with my EWEB as there seems to be very little information out there.

I have successfully connected and can read data sent to me (i'm the client) from the server.

I am, however, struggling to get my head around one particular part and wondered if this is how it is supposed to work or whether I am doing something not quite right ?

I thought that I could trigger a READ MSG and it would sit & wait (until the timeout value) for data to be sent to me but what is happening is that when the data comes in the MSG returns an extended error 0204 "Unconnected message timeout".

Now, using the EWEB "socket diagnositcs" web page I can see when the data comes in because the read buffer increases. With data in the buffer if I then trigger the READ MSG everything works fine and the data comes in.

Is this correct ? Does the data have to be sent before I can READ it ? I was hoping that I could trigger the READ and just sit back and wait for it !

Thanks for your help !

Mark.
 
You should be able to execute read like you wanted without data and it will seat and wait and not get 204 error.
At least I never saw it.

Without testing it will be pure guess:
- you have Write or another Read to the same socket active at the same time.
or
- you have a mix of connected and unconnected messages to the same socket - take a look at "connected" and "cached" boxes

Personally I perefer to do very quick reads (10ms timeout or so) that will allow other messages to be executed without a problem.

I never did buffer check - I think it is absolutely unnecessary.

Again - I am not sure why you are trying to write something that already written and published in the KnowledgeBase?
 
Hey, thanks for the reply !

Sorry, I don't have access to the knowledgebase (no tech connect contract).

And ..... I don't want to blindly copy / use someone elses code. I don't see how I can learn doing it this way. I have managed to set up socket comms from scratch and can now put the data from my scanner in to an array to work with. So I am getting there ... (I think !).

My only problem is, there is so little information out there - nowhere to look other than the EWEB manual. So when I need a more in depth explanation of a part, I cannot find anything - hence my questions on here.

Thanks for your help,

Mark.
 
My only problem is, there is so little information out there - nowhere to look other than the EWEB manual. So when I need a more in depth explanation of a part, I cannot find anything - hence my questions on here.
All information is in KnowledgeBase and yes you have to pay to use it.

For the amount of time you wasted developing something that does not work it would be cheaper to buy a contract and get complete applications.
So don't complain for about "no information".
 

Similar Topics

I wanted to confirm with the Gurus that a 1756-ENBT can not create raw sockets. I'm using Rockwells Process Library's T_Sync to connect to an NTP...
Replies
3
Views
2,014
I crimped a cable with this (attached) connector back a few years, but the company it was going into had the tool. Could someone please advise...
Replies
10
Views
2,971
Hi, all :)), I'm very new to CitectSCADA and Cicode programming, however have good programming experience in most major programming languages...
Replies
7
Views
3,666
Hello Friends I need to communicate a compactlogix with a Domino printer. I have searched in google for info and I found that technote AID 33240...
Replies
16
Views
5,953
Hello All, I have a plc that is missing the power connector, and I/O connectors. I cannot seem to find these connectors to purchase. Can someone...
Replies
8
Views
2,467
Back
Top Bottom