You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old August 25th, 2021, 12:50 PM   #1
Ale_Sam
Member
Guatemala

Ale_Sam is offline
 
Join Date: Aug 2021
Location: Guatemala City
Posts: 1
Unhappy SQL in Codesys

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.
  Reply With Quote
Old August 25th, 2021, 02:52 PM   #2
gclshortt
Member
Canada

gclshortt is offline
 
gclshortt's Avatar
 
Join Date: Dec 2014
Location: Ontario
Posts: 3,219
https://forge.codesys.com/forge/talk...ad/71cafec577/
This may help you out.
Regards,
__________________
Garry
https://www.accautomation.ca
Connect with us on Facebook: facebook.com/accautomation/
  Reply With Quote
Old August 27th, 2021, 05:22 AM   #3
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 1,097
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/cod...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.
Attached Images
File Type: png 2021-08-27_Codesys_IIoT.png (46.1 KB, 39 views)
  Reply With Quote
Old August 27th, 2021, 02:17 PM   #4
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 1,081
Quote:
Originally Posted by Ale_Sam View Post
I put anything under 29 it tells me that there are numbers not defined
What can i do? Where is my error? .
What is the exact error for "there are numbers not defined"?
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Raspberry Pi and Codesys Kris M. LIVE PLC Questions And Answers 2 September 16th, 2015 09:44 AM
CoDeSys 3.5 SP4 and J1939 CAN Bus jkcaldwe LIVE PLC Questions And Answers 2 July 24th, 2014 06:59 AM
Wonderware SQL database error userxyz LIVE PLC Questions And Answers 2 September 12th, 2011 02:12 PM
Perform a SQL job through InTouch dash LIVE PLC Questions And Answers 0 July 1st, 2011 03:09 PM
SQL logging and SQL recipes concept... userxyz LIVE PLC Questions And Answers 9 October 15th, 2010 02:33 AM


All times are GMT -4. The time now is 07:01 AM.


.