Skip to main content



      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 03:59 Go to next message
Eclipse UserFriend
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 133 times)
Re: Problem with translation from structured text to cpp [message #1728341 is a reply to message #1728225] Sat, 02 April 2016 06:01 Go to previous messageGo to next message
Eclipse UserFriend
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 05:08 Go to previous messageGo to next message
Eclipse UserFriend
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 08:17 Go to previous messageGo to next message
Eclipse UserFriend
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 08:56 Go to previous messageGo to next message
Eclipse UserFriend
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 04:38 Go to previous messageGo to next message
Eclipse UserFriend
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 407 times)

[Updated on: Tue, 12 April 2016 07:58] by Moderator

Re: Problem with translation from structured text to cpp [message #1729263 is a reply to message #1729211] Tue, 12 April 2016 09:06 Go to previous message
Eclipse UserFriend
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: Fri Oct 31 10:27:07 EDT 2025

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

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

Back to the top