Search found 137 matches

by AMitchneck
Tue Jun 12, 2018 7:45 am
Forum: Ethernet and Serial Communications
Topic: Asynchronous TCP IP Client socket C#
Replies: 8
Views: 15123

Re: Asynchronous TCP IP Client socket C#

Hi Phong,

To answer your question, I used async method for send to enable a send timeout ability. As for receive, I used sync method because I already know the receive method will not block as I check for available data (via poll) before I attempt to read.
by AMitchneck
Tue Jun 12, 2018 6:45 am
Forum: Ethernet and Serial Communications
Topic: Asynchronous TCP IP Client socket C#
Replies: 8
Views: 15123

Re: Asynchronous TCP IP Client socket C#

Hi Phong, The timeout in the send function is based on the ability of the underlying Socket, not so much what it is being used for so this should not matter. The receive however does. In this case, what I've done in the past is to peek if there is data available before I use the ReceiveAll function....
by AMitchneck
Mon Jun 11, 2018 7:09 am
Forum: Ethernet and Serial Communications
Topic: Asynchronous TCP IP Client socket C#
Replies: 8
Views: 15123

Re: Asynchronous TCP IP Client socket C#

Hi Phong, The answer to this question was actually buried in the Modbus Client class I sent you ( http://ixtalk.beijerelectronics.com/viewtopic.php?f=5&t=2289&sid=bad94095cd38d095f0f2a072c489fe97 ). When a TCP connection is half-dropped the underlying Socket.Connected property still returns true as ...
by AMitchneck
Wed Jun 06, 2018 12:33 pm
Forum: Controller Communication
Topic: TCP IP Communication between Beijer HMI and other Devices
Replies: 12
Views: 18677

Re: TCP IP Communication between Beijer HMI and other Device

Hi ajack, I've pulled the core part of this out of one of my script modules (Comms). This uses the Created event to start the thread and timer. Sadly, iX does not have a Destroyed event so what I've done is use the class destructor to clean up the threading. //---------------------------------------...
by AMitchneck
Wed Jun 06, 2018 8:33 am
Forum: Controller Communication
Topic: TCP IP Communication between Beijer HMI and other Devices
Replies: 12
Views: 18677

Re: TCP IP Communication between Beijer HMI and other Device

Hi ajack, 1. Given the option, I typically use Asynchronous socket connections (as was in my sample script). 2. How acquainted are you with multi threading? What I typically use to drive a cyclic process is a System.Threading.Timer. Script modules have a "Created" event that fires during startup whe...
by AMitchneck
Tue Jun 05, 2018 10:06 am
Forum: Controller Communication
Topic: TCP IP Communication between Beijer HMI and other Devices
Replies: 12
Views: 18677

Re: TCP IP Communication between Beijer HMI and other Device

I don't work for Beijer so you'd have to contact customer support to get exact answer, but as far as I know there is no raw communication driver. What I could send you as a scripting module would only be a direct copy of what I attached in my prior response. The code was more for example of how you ...
by AMitchneck
Tue Jun 05, 2018 9:18 am
Forum: Controller Communication
Topic: TCP IP Communication between Beijer HMI and other Devices
Replies: 12
Views: 18677

Re: TCP IP Communication between Beijer HMI and other Device

Hi ajack, You can do that by creating a custom script module and using a Socket. For example, below I have included the source code for a ModbusTCP client I created to read holding registers. you will need to add the following using's to the head of your script module: using System.Net; using System...
by AMitchneck
Tue Jun 05, 2018 6:56 am
Forum: Controller Communication
Topic: TCP IP Communication between Beijer HMI and other Devices
Replies: 12
Views: 18677

Re: TCP IP Communication between Beijer HMI and other Device

Hi ajack,

TCP IP just indicates the connection is over Ethernet. What is the underlying communication protocol? Based on your mention of hyperterminal I'm assuming it's ascii-based like telnet.
by AMitchneck
Fri Apr 13, 2018 7:26 am
Forum: Scripting
Topic: How to Create Customized User Dialog Window/Popup
Replies: 3
Views: 6886

Re: How to Create Customized User Dialog Window/Popup

Mishra, What customization are you trying to do with this dialog? In my last response I indicated how to create custom dialogs in general. You can access user information through the Globals.Security object. For example, the following code checks if logged in user is in a specific group: public bool...
by AMitchneck
Mon Apr 09, 2018 8:36 am
Forum: Scripting
Topic: Text IDs feature
Replies: 3
Views: 11033

Re: Text IDs feature

There is a way to set an object's text to a text ID via script. To do this you need 3 things: the ID of the text you want, its default value, and the following code. public string GetTextID(uint textId, string defaultValue) { Neo.ApplicationFramework.Tools.MultiLanguage.MultiLanguageResourceManager ...