Sign in to follow this  
Followers 0
ericnya

Databases POSTGRESQL with TwinCAT of Beckhoff

1 post in this topic

I would first like to greet you and to thank those who answer my questions. I installed Postgresql database on my laptop for development. I wish I could access Postgresql database from TwinCAT software developed by Beckhoff. 1 - To this effect, I used directly the function block FB_DBOdbcConnectionAdd For that here are the settings I completed: sNetID:= , eDBType:= eDBType_ODBC_PostgreSQL , eDBValueType:=eDBValue_Double , sDBDriver:='{PostgreSQL UNICODE}', //sDBServer:= '127.0.0.1', sDBServer:= 'localhost', sDBDatabase:= 'Name_DataBase' , nDBPort:=5432 , //sDBProtocol:= , sDBUserId:= 'postgres', sDBPassword:='passCreated' , sDBScheme:='public' , //sDBSequence:= , //sDBClientDll:= , sDBTable:=’tbl_Name’, bExecute:=TRUE , tTimeout:=T#20S); 2 - Then I run the FB_DBConnectionOpen function to verify that a connection been added to the database. 3 - Then I create a table using the function FB_DBTableCreate 4 - Finally I add the items in the table with the function block FB_DBRecordInsert. However, my program hangs at step number 2 with an error TwinCAT # 1 internal Error. I checked and manipulate all parameters of (1 -) because the function (1 -) runs properly and generates hDBID. But other performance are no longer feasible. Can you give me your help? Thank you in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0