AdvancedHMI Software

General Category => Open Discussion => Topic started by: Manickam Sk on May 16, 2018, 12:01:41 AM

Title: Errors in Advanced HMI
Post by: Manickam Sk on May 16, 2018, 12:01:41 AM

Sine I am new to the Advanced HMI domain some one please help me to overcome this issue :

Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code).

Please provide me a solution to overcome this problem.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 16, 2018, 12:21:01 AM
We will need more details in order to troubleshoot this. What version are you using? Does this occur with the AdvancedHMI controls or from code that you had written? Can you post a screen shot of the details of the error?
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 16, 2018, 03:54:35 AM
Dear Sir

I am using version 3.5. I am just Interfacing my micro controller to advanced hmi in order to display data's.the parameters include analog values.

I just want to display it continuously in my real time where my basic objective is to do that. But it could't hold it for more than a minute .So what should i do to overcome this problem.

The modbus rtu settings are 19200 baud rate ,pollover ride is 80 and my timeout is 50...If i change any of this setting I cannot fetch any data in my communication.

The screen shot of my screen had been attached below.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 16, 2018, 07:19:43 AM
The version is going to be something like 3.99x or 3.99y Beta 10. Check the title bar of the MainForm or right click the project and look at the properties to get the correct version number.

Are you using your own code or using the visual controls like a BasicLabel? If using your own code, please post your code or your full project.
Title: Re: Errors in Advanced HMI
Post by: Godra on May 16, 2018, 07:34:18 AM
Also check this link:

https://stackoverflow.com/questions/46634776/your-app-has-entered-a-break-state-but-there-is-no-code-to-show-because-all-thr?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

It suggests to click on "Continue execution" to get the error details.

Can you also post screenshots of other parts of your project (the MainForm, driver settings, ...)?
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 16, 2018, 08:17:51 AM
Hi Sir

My version code is 3.9924 and I am does not not uses any code I am just using the basic  label to display my parameters.
But it often shows the error condition.

Is the property settings in modbust rtu is wrong or else i should use some other parameters to display it.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 16, 2018, 09:01:09 AM
My version code is 3.9924 and I am does not not uses any code I am just using the basic  label to display my parameters.
But it often shows the error condition.

Is the property settings in modbust rtu is wrong or else i should use some other parameters to display it.
So you are using the latest of 3.99x

What else is currently on your form other than the driver?
Title: Re: Errors in Advanced HMI
Post by: Godra on May 16, 2018, 09:31:11 AM
A picture is worth a thousand words.

If you post as many screenshots and details as possible then you might resolve your issue sooner.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 12:16:03 AM
Sir/Madam

This is my front screen where I had used only digital panel label to display my parameters. But when I am running the screen is being moved to break mode here by I had attached  my modbus property screenshot.

How to overcome this problem.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 12:32:43 AM


This is my mainform settings.I had not used any other drivers in my USB port. What ever I had been modified It would not affect my real time display of my front screen.
Where my basic objective is to display my analog values.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 01:42:44 AM
What happens when you select Continue Execution?
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 01:57:37 AM
It comes out from the running state and I need to restart it again.So My data's are being fetched with dime delay.

It is happening for every 50sec to 1 minute when ever I start my execution.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 02:12:34 AM
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

The program '[9504] AdvancedHMI.exe' has exited with code -1 (0xffffffff).


This was coming in my output window.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:14:10 AM
This is typically the sign of a corrupt .NET framework install.

- Start with a new copy of the AdvancedHMI solution.
- Add a Modbus driver to the form and set the communication properties
- Add a BasicLabel and set the PLCAddressValue to 40001
- Run the application and see if you get the same error


Are you using a USB to RS232 adaptor?


Also set the EnableLogging to True for the driver. Run the application then look for the driver log file in the bin\Debug directory
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 02:16:53 AM
Yes i am using RS 232 adaptor.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:16:59 AM
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

The program '[9504] AdvancedHMI.exe' has exited with code -1 (0xffffffff).


This was coming in my output window.
This sounds like the Modbus packet returned from the controller has too few bytes. The EnableLogging will give a clue to that.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:30:35 AM
In your application, set EnableLogging property of the Modbus driver to True.
Run the application until it stops again.
Post the DriverLog.txt file found in AdvancedHMI\bin\Debug
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 02:32:16 AM
When I am running I had now noticed other error window now. I had attached the screen shot below.

The break window now is replaced by this window.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:39:01 AM
The DriverLog file may show me what the problem is.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 02:41:29 AM
Now I am getting the disassembly error.

source code missing what should I do to rectify this.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:51:24 AM
In your application, set EnableLogging property of the Modbus driver to True.
Run the application until it stops again.
Post the DriverLog.txt file found in AdvancedHMI\bin\Debug
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 02:55:08 AM
FYI This is my driver log file.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 03:04:24 AM
Your PollRateOverride is over running the controller. Set PollRateOverride to 500 or higher.

Delete the DriverLog.txt, then run the application again and post the DriverLog
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 03:18:20 AM
Yes , but whenever I changed my pollride more than 100 or to 500 My HMI is running but I cannot receive any data from my controller and I change that to 80 the response is immediate and it works properly.

FYI the driver log is attached below
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 03:24:11 AM
It looks like you set the PollRateOverride to 3000.

There is something wrong with your device's Modbus response:

12:23:08.434 Send 17,3,0,0,0,21,134,149,
12:23:08.456 RCVD 17,6,0,0,0,0,33,0,1,0,32,0,32,0,33,0,32,0,36,0,0,1,215,0,125,0,125,0,125,0,120,0,30,0,2,0,0,0,0,0,1,0,10,0,7,0,22,

The received data byte 2 should be the function code of 3, not 6. The 3rd byte is the data size, but the response packet has a 0

See this for more information:

http://www.simplymodbus.ca/FC03.htm
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 03:36:57 AM
Ok I will check with that, what should be the timeout value to maintain.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 03:48:41 AM
A typical PollrateOverride for RTU is at least 250. A Timeout of 3000 is normal.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 05:18:40 AM
Whenever I changed my pollrate value the data is not being displayed in my window but the driver log receives and sends the data.

And when I change my pollrate value the communication takes place but another error window appears as arithmetic operation stack overflow.

Please find me a solution to this problem.

I had attached my both driver log data and my error display.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 08:26:26 AM
The response packet is not correct:

02:42:20.282 Send 17,3,0,0,0,21,134,149,
02:42:20.304 RCVD 17,3,0,0,0,0,33,0,1,0,32,0,32,0,33,0,32,0,32,0,0,1,215,0,125,0,120,0,125,0,120,0,30,0,0,0,0,0,0,0,1,0,10,0,6,0,22,

The 3rd byte is supposed to tell the number of bytes in the packet. The driver uses that value to know when it receives the full packet. See the response description :

http://www.simplymodbus.ca/FC03.htm
Title: Errors in Advanced HMI
Post by: DougLyons on May 17, 2018, 01:37:33 PM
This is very probably a failure of the "USB to RS-232" converter. I recommend that you obtain a converter with the FTDI chip such as the CHIPI-X10 model and test this. These are readily available from www.newark.com (http://www.newark.com) for a reasonable price.
Title: Re: Errors in Advanced HMI
Post by: Archie on May 17, 2018, 02:09:32 PM
This is very probably a failure of the "USB to RS-232" converter. I recommend that you obtain a converter with the FTDI chip such as the CHIPI-X10 model and test this. These are readily available from www.newark.com (http://www.newark.com) for a reasonable price.
I was thinking the same thing because of the erratic responses shown in the driver log file.
Title: Re: Errors in Advanced HMI
Post by: Godra on May 17, 2018, 05:30:18 PM
Can you also post a screenshot of your COM3 settings in the Windows Device Manager?

Just like the attached picture...
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 17, 2018, 11:57:16 PM
This is my port settings.
Title: Re: Errors in Advanced HMI
Post by: Godra on May 18, 2018, 12:25:29 AM
Your driver is set as: 19200 /  8 / None / 2, so you should either have the same for your COM3 port or both of these should match what your device supports.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 18, 2018, 12:59:10 AM
Thank You ...and I am getting a delay of 3 to 5 sec to fetch a data why is it so? all the parameters are being set correctly.
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 18, 2018, 06:38:47 AM
It was working properly. How to open a another file in existing project.

Since i need to connect another microcontroller for another application.Now I cannot open another file in it.
Title: Re: Errors in Advanced HMI
Post by: Godra on May 18, 2018, 05:39:22 PM
I don't really understand what you are trying to do.

Can you be more specific and provide more details?
Title: Re: Errors in Advanced HMI
Post by: Manickam Sk on May 19, 2018, 01:30:42 AM
My problem regarding modbus communication is being solved and I need to run my display for various application and for that I need to create a another HMI screen.

But I could not open a new ,how to open a new advanced HMI screen .

And also how to display a 32 bit signed integer values in my display.
Title: Re: Errors in Advanced HMI
Post by: bachphi on May 19, 2018, 07:31:37 AM
still clear as mud, I would suggest to activate your window first, then go buy a better rs232-usb converter.
Title: Re: Errors in Advanced HMI
Post by: Phrog30 on May 19, 2018, 07:57:23 AM
I'd also get a better language translator. :)
Title: Re: Errors in Advanced HMI
Post by: Godra on May 19, 2018, 08:44:22 AM
You should check these posts:

Modbus addressing for integer values:
https://www.advancedhmi.com/forum/index.php?topic=765.0
https://www.advancedhmi.com/forum/index.php?topic=2058.0

Create a new form (or use existing Page2):
https://www.advancedhmi.com/forum/index.php?topic=2090.0