Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-09-27 15:06:13

ad_t
Member
Registered: 2016-05-09
Posts: 52

Database insert using OUTQUAD

Hi,

Is there an example available (or could one be made), showing how to insert data into a database but using a OUTQUAD block rather than a GOTO block? I am getting a compilation error ' Invalid driver's item name', which I don't seem to be able to get round.

Cheers,

Adam

Offline

#2 2016-10-02 14:25:40

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Database insert using OUTQUAD

Hi Adam,
please find the example attached: db_multiflag.zip

If you need additional explanation, I'll be happy to help.

Jaroslav

Offline

#3 2016-10-08 09:44:32

hubc
Member
Registered: 2016-09-05
Posts: 60

Re: Database insert using OUTQUAD

Hi,

Jaroslav, can you please clarify naming conventions and connections between items in .rio file and block/elements in task?

In your example, in .rio file there are items i2 - i9.
In task there are:
- block named DB__i2'
- values (constants, generators) named from i2 to i9

which one from above two is important? Name of the block? (i2) Or name of the constants?
So if, for example I name my block: DB__someBlock10
then I should use in my .rio file: someBlock10, someBlock11, someBlock12 etc?

What about "i" - is it somehow connected with data type? (integer)

And btw about data types: am I reading user guide correctly and there is no way to write FLOAT type to the database?


Regards
Hubert

Offline

#4 2016-10-09 19:47:15

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Database insert using OUTQUAD

Hi Hubert,
it's always the string after the two underscores, which is important for the I/O driver. If you name your block DB__someBlock10, then you should use in .rio file "DB__someBlock10, i3, i4, ..., i9). In fact, the 7 remaining signals can be named arbitrarily, they just need to correspond with a column in the database table).

All the remaining blocks (constants, generators, etc.) can be named arbitrarily (though it's highly recommended to keep the block type part of the name).

As for data types, you are right, the 'i' is related to integer numbers (type long).

The column in the database table can be of type FLOAT, the value will be converted automatically on write from double to float (you might loose some precision, of course).

If you need further information, I'll be happy to help.

Jaroslav

Offline

Board footer

Powered by FluxBB