SQL in Codesys

Ale_Sam

Member
Join Date
Aug 2021
Location
Guatemala City
Posts
1
Hello! I am new to Codesys and I need to send data from my Festo PLC (CPX-CEC) to a microsoft sql database. I am basing myself on the examples from the library MsSQL for CODESYS and the ones from the library SQL4CODESYS. The problem is that with the mssql library, I can't even log into the database because the error "gc iLengthOfByteArrays is longer thanPLC can handle. " keeps appearing whenever I do anything. I tried changing the value of gc iLengthOfByteArrays to something smaller like it says to do in the user manual but if I put anything under 29 it tells me that there are numbers not defined and if I put anything above 29 I get the errror of the byte arrarys being longer than the PLC. I tried the SQL4CODESYS library and i also get an error relating to the lenght of the query being too long.

What can i do? Where is my error? I really need help and i can't find any information on this.
 
Ale_Sam, welcome to the forum. I have no experience with Codesys for MQTT.
But I would recommend that you buy the "iiot-libraries" that Codesys has on offer.
https://www.codesys.com/products/codesys-communication/iiot-libraries.html

The libraries below are included in the package, which costs EUR 50.00
MQTT Client (MQTT)
Web Client (http, https)
AWS IoT Core Client (MQTT)
Azure IoT Hub Client (MQTT, https)
Mail Service (POP3, SMTP)
SNTP Service (SNTP)
SNMP Library (SNMP)
SMS Service (SMS)
Auxiliary libraries help you simplify the communication even more, such as
JSON Utilities
XML Utility

I bought the package not for IIoT libraries above, but for CSV and INI file structures reading and writing, for a project I am working on. I am almost finished, and I recon, had I not purchased these libraries (and had I not got really kind support from Codesys experts in this forum, I should say), developing the application I am doing now would have taken me weeks, perhaps months more than it has already taken me. If you want, I can send you the CHM help file, so you can go into the details, but at least get the PDF document which you can get from the online store. Based on my experience with the CSV library, I am almost sure it would be for your project very helpful to start from this library, as opposed to starting from scratch.

2021-08-27_Codesys_IIoT.png
 

Similar Topics

Hi all, I'm having difficulties trying to connect FactoryTalk View SE Local Station (V13.00) to MS SQL Server Express. I state that they are...
Replies
2
Views
109
Hi all, I have FTV v13 installed on my VM. I made an ME application and exported it in v11, as that's the version being used on the Panelviews at...
Replies
3
Views
366
Dear colleagues, I am reaching out for assistance with an issue I am having. I have a code that can successfully insert data from FactoryTalk...
Replies
6
Views
999
Hi, All: I have a project to replace 3 old window 7 PCs with new window 10 PCs. the 3 old PCs: one is FTV SE server, other 2 are SE clients...
Replies
2
Views
562
Hello, Does anyone have experience managing the FactoryTalk alarm & events SQL database from outside of FactoryTalk? Essentially I'd have tag...
Replies
3
Views
1,242
Back
Top Bottom