chandrapal

Mitsubishi Connection issue

6 posts in this topic

 

 Hi all, I am using Q series PLC, connected to PC with MxComponent software.It is connecting successfully when we open the application and after 50 to 60 minutes and it does not reconnect again...

To connect again we need to close the application and reopen. Please help on this,i  am also giving the code here to connect.Please help on this. Thanks in advance.

Code Here

private bool PGetIntValue(int lptxt_SourceOfIntValue, out int iGottenIntValue)
        {
            iGottenIntValue = 0;
            //Get the value as 32bit integer from a TextBox
            try
            {
                iGottenIntValue = Convert.ToInt32(lptxt_SourceOfIntValue);
            }

            //When the value is nothing or out of the range, the exception is processed.
            catch (Exception exExcepion)
            {
                MessageBox.Show(exExcepion.Message,
                                  Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }

            //Normal End
            return true;
        }

 

 

private void PLCconnect()
        {
            int iReturnCode;
            int iLogicalStationNumber;
            if (PGetIntValue(1, out iLogicalStationNumber) != true)
            {
                return;
            }
            axActUtlType1.ActLogicalStationNumber = iLogicalStationNumber;
            // axActUtlType1.ActPassword = txt_Password.Text
            iReturnCode = axActUtlType1.Open();
            if (iReturnCode == 0)
            {
                //Connected
                lblStatus.Text = "Connected";
                lblStatus.ForeColor = Color.Green;
            }
            else
            {
                //Not Connected
                lblStatus.Text = "Not Connected";
                lblStatus.ForeColor = Color.Red;
            }
        }

 

 

Share this post


Link to post
Share on other sites

Which connection to the System Q are you using ?

Share this post


Link to post
Share on other sites

Hi Gambit,

Mitsubishi PLC Q series to PC(C# language) using Ethernet.

 

Edited by chandrapal

Share this post


Link to post
Share on other sites

TCP or UDP?

Is the application idle for 60 minutes ?

 

Share this post


Link to post
Share on other sites

It is TCP....  and the application was running continuously.

Share this post


Link to post
Share on other sites

I would check on the PLC side if the port was closed down ?

You should consider using UDP so you do not have an issue with opening and closing ports

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now