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 » Dynamic text input
Dynamic text input [message #1864017] Mon, 11 March 2024 15:18 Go to next message
Wolfgang Trischnigg is currently offline Wolfgang TrischniggFriend
Messages: 45
Registered: April 2016
Member
Hello,

is it possible to make the input of a FB dynamic?

For example:

I have an input called "TEXT1" from type REAL. For example "45" .

In structured text I managed to sort a number to get an array [2,1,3].
Now I want to call the input by using the sorted array and use it in my code like
23 + "TEXT+arr[1] " = 23+ 45 = 68

I hope you understand what I want to do.


Best regards
Wolfgang

[Updated on: Mon, 11 March 2024 15:20]

Report message to a moderator

Re: Dynamic text input [message #1864019 is a reply to message #1864017] Mon, 11 March 2024 16:24 Go to previous messageGo to next message
paulo nunes is currently offline paulo nunesFriend
Messages: 10
Registered: January 2024
Junior Member
so you want to convert a number from an array (UINT#1) into a string and then append to another string ("TEXT")?

if so, then i would use "F_UINT_TO_WSTRING" from "iec61131-3" module of FORTE to convert the UINT number into Wstring and then "APPEND_STRING_2" from "utils" module of FORTE to join both strings into one.
Re: Dynamic text input [message #1864022 is a reply to message #1864019] Mon, 11 March 2024 20:41 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I'm sorry but there is no way in IEC 61131-3 or IEC 61499 to address in our outputs by index. The only solution that I know would be to have the input as array.
Previous Topic:IDE 2.0.1 export feature and FORTE develop branch
Next Topic:Transfer fboot to a microprocessor
Goto Forum:
  


Current Time: Sat Apr 27 17:36:30 GMT 2024

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

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

Back to the top