[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transmit a String to a UserType



Hello,
I'm trying to create a Type where I need to get a user-defined string. As
the component-parameters-card supports only numeric values, I tried to use a
special card. This corresponds to TYPE9, where the FORTRAN-format-statement
is entered in a special card.

But I have two problems:
1) By doing this, the *.dck-File gets the following entry (the string
entered in the special card is written correctly into the *.dck-file)

...
INPUTS 6
* [unconnected] Input1
0,0
* [unconnected] Input2
0,0
* [unconnected] Input3
0,0
* [unconnected] Input4
0,0
* [unconnected] Input5
0,0
* [unconnected] Input6
0,0
*** INITIAL INPUT VALUES
0 0 0 0 0 0
myUserString
*---------------------------------------------------------------------------
---
...

But Trnsys produces an error, because the characters 'myuserString' are
interpreted as another initial Input value. So Trnsys counts 7 Inputs and
that does not fit to the Statement 'INPUTS 6'.

2) The code of TYPE9 is quite complex to me. I don't understand how the
string is read out of the *.dck-file and made available in the Fortran-code.

Does anybody have some ideas?

Thanks!

Jochen

--
Dipl.-Ing. Jochen Wriske
Lehrstuhl für Technische Thermodynamik
RWTH Aachen
Tel. 0241 / 80 98153
Fax. 0241 / 80 92255