Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Problem with translation from structured text to cpp
Problem with translation from structured text to cpp [message #1728225] Fri, 01 April 2016 07:59 Go to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Hello to all,

there is a problem when I export my function block.
Structered text will be not translated right to cpp:
Please see attachment.

Is there anything wrong with my code? or is there a bug? or.....?

Thank you.

Best regards,
Wolfgang
  • Attachment: Unbenannt.jpg
    (Size: 87.97KB, Downloaded 114 times)
Re: Problem with translation from structured text to cpp [message #1728341 is a reply to message #1728225] Sat, 02 April 2016 10:01 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

I assume you are pointing to the missing code for the second ELSEIF. Thanks for pointing this out there was an issue in the code generator. In 4DIAC-IDE cset 0d7d4a[1] this is fixed now and will go into 4DIAC-IDE 1.8.

Cheers,
Alois

[1] https://sourceforge.net/p/fordiac/fordiac-ide/ci/0d7d4acb99bb5fd7f610880a7dc6b38a4214f680/tree/
Re: Problem with translation from structured text to cpp [message #1728410 is a reply to message #1728341] Mon, 04 April 2016 09:08 Go to previous messageGo to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Thank you for fixing the problem.
Is it possible to fix it on my own with your changes in 1.8 M1? If, yes...what do I have to do?

Best,
Wolfgang
Re: Problem with translation from structured text to cpp [message #1728447 is a reply to message #1728410] Mon, 04 April 2016 12:17 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I think the fastest and easiest way is that you try to build your own 4DIAC-IDE. This has the advantage that you can immediately get the fixes you need. Please have a look on the web-page's documentation section under developing chapter -> building 4DIAC IDE from source.
Alois
Re: Problem with translation from structured text to cpp [message #1728454 is a reply to message #1728447] Mon, 04 April 2016 12:56 Go to previous messageGo to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Ok, I will give it a try.

Best regards,
Wolfgang
Re: Problem with translation from structured text to cpp [message #1729211 is a reply to message #1728454] Tue, 12 April 2016 08:38 Go to previous messageGo to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
I've also noticed an error, when exporting this one

IF STATE THEN
	IF X < (Y + DIFF_EIN) THEN
		ANF:= TRUE;
		WW := Y;
	ELSIF X > (Y + DIFF_AUS) THEN
		ANF_WW := FALSE;
		WW := 5;
	END_IF;
ELSE
	IF X < (T + DIFF_EIN) THEN
	 	ANF:= TRUE;
	 	TWW := T;
	ELSIF X > (T + DIFF_AUS) THEN
		ANF_WW := FALSE;
		WW := 5;
	END_IF;
END_IF;


An error occured in 4DIAC:
Errors
- Anforderung_WW: Else without preceding IF, ELSIF, or CASE statement
  • Attachment: Error.jpg
    (Size: 29.79KB, Downloaded 389 times)

[Updated on: Tue, 12 April 2016 11:58]

Report message to a moderator

Re: Problem with translation from structured text to cpp [message #1729263 is a reply to message #1729211] Tue, 12 April 2016 13:06 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Is this already with my fix for your last issue?
Previous Topic:Petri Nets
Next Topic:setting a static variable in structured text
Goto Forum:
  


Current Time: Wed Apr 24 23:19:16 GMT 2024

Powered by FUDForum. Page generated in 0.03475 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top