Author Topic: Repeat-until in Test Tool  (Read 4692 times)

Offline Martin

  • PLUS+1 Novice
  • *
  • Posts: 2
  • Karma: +0/-0
Repeat-until in Test Tool
« on: January 18, 2019, 11:17:25 AM »
I have recently started using the Guide Test Tool to verify some of my Plus+1 code, and have encountered an issue.

I use the repeat until loop for calculating CRC on variable lenght CAN messages (combined from multiple messages) and to extract numbers from ASCII from the same messages.

When trying to make an end to end testing, putting in CAN messages, and verifying the output from the code, it will always fail on the repeat-until loop. (It does work in the actual HW)

As far as I can see it exits on the first iteration with an error, my suspicion from looking at the C code output earlier is that the check for exceeding the loop time is the culprit here.

Is there any setting that I can change to make it run through several loops in the test tool without failing?

Martin

Offline oiltronic

  • PLUS+1 Guru
  • *****
  • Posts: 170
  • Karma: +15/-0
Re: Repeat-until in Test Tool
« Reply #1 on: January 22, 2019, 01:44:54 AM »
Increase your setting for OS.ExecTimeOut (under the Inputs->OS page) when simulating.  From the help text for the UNTIL component:

Quote
A timeout condition occurs if the application loop time becomes greater than the controller’s OS.ExecTimeOut

Also make sure you don't have any forbidden software components inside the repeat-until loop.  The list of what's not allowed can be found from a link within the help section of the REPEAT component.  Maybe there's a particular component that isn't causing a compiler error as it should, or that causes a delay in the simulator but not the HW because of some different PC-based API/library that's used.

By the way, have you tried putting your array-processing inside a POU using structured text?  It's really quite easy once you're used to it, and is a much faster way to develop this type of code.  (The flow control loops just don't make sense to me in the GUIDE graphical environment, and always struck me as unreliable.)

Offline Martin

  • PLUS+1 Novice
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Repeat-until in Test Tool
« Reply #2 on: February 05, 2019, 11:01:17 AM »
Thank you for your suggestion.

I was aware of the ExecTimeOut, but somehow forgot to set it in the new piece of code I was testing.

Digging a bit deeper into this I can compile the test code in GUIDE 10.1.7, and the tests will pass both in GUIDE 10.1.7 and 11.0.7, however if the test code (for the exact same project) is generated in GUIDE 11.0.7 it will fail in both versions of GUIDE.

So for testing this I will have to use an old GUIDE version it seems, at least for now.


Offline Nilla

  • PLUS+1 Guru
  • *****
  • Posts: 253
  • Karma: +13/-0
Re: Repeat-until in Test Tool
« Reply #3 on: February 06, 2019, 11:16:39 AM »
Hi guys!

I just posted a new topic with some excel templates for use of the Test tool that might be useful to you;

http://www.plus1forum.danfoss.com/index.php?topic=1182.0

Enjoy!

Best regards
Nilla
PLUS+1 Helpdesk team

Offline Nilla

  • PLUS+1 Guru
  • *****
  • Posts: 253
  • Karma: +13/-0
Re: Repeat-until in Test Tool
« Reply #4 on: February 18, 2019, 02:35:31 PM »
Hi Martin!

Unfortunately there is a small issue with the repeat-until functionality in Test tool in v11.0 of PLUS+1 GUIDE. Test Tool handles Repeat Until differently between v10.1 and 11.0 which can cause issues like the one you're experiencing. The development team are working on a solution for this but a possible workaround is to use v10.1 instead.

Best regards
Nilla
PLUS+1 Helpdesk team
« Last Edit: March 26, 2019, 01:31:41 PM by Nilla »

Offline Nilla

  • PLUS+1 Guru
  • *****
  • Posts: 253
  • Karma: +13/-0
Re: Repeat-until in Test Tool
« Reply #5 on: March 26, 2019, 01:35:34 PM »
Hello guys!

The issue with repeat-until functionality has been solved by the release of PLUS+1 GUIDE and Service tool v11.0.8. Please update using the PLUS+1 Update Center.

Best regards
Nilla
PLUS+1 Helpdesk team