Jump to content

Search the Community

Showing results for tags 'sql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Our Community
    • Come on in!
  • News and Announcements
    • UniLogic 2021-- UniCloud IIoT Cloud Platform, EtherCAT & more!
    • VisiLogic: 9.9.00 - Protect Your Vision and Samba Systems with New Security Enhancements
    • New!!! ***** U90 Ladder*****
  • UniStream HMI + PLC Programmable Controllers & UniLogic Software
    • UniStream: Hardware
    • UniLogic Software
    • UniLogic UDFBs
    • Industry 4.0, IioT, MQTT, OPC UA
  • Vision, Samba, Jazz and M90 PLC + HMIs & Software
    • Vision & Samba PLC + HMI Controllers & VisiLogic Software
    • Jazz, M91 PLCs and U90Ladder
  • Motion! Servo Drives, Motors, Actuators, & VFDs by Unitronics
    • Motion: Unitronics Servo Drives, Motors, Actuators, VFDs--by Unitronics
  • UniCloud: the end-to-end IIoT Platform for Unitronics Controllers
    • Everything UniCloud!
  • Software Utilities
    • SD Card Suite
    • Remote Operator
    • Remote Access
    • DataXport and DataXls
    • UniDownloader
    • UniOPC
    • UniDDE
  • Utilities for .net and Visual Studio
    • Unitronics PCOM Protocol
    • COM Object ActiveX .dll
    • .NET driver
  • Project Design
    • ...I have a project...what hardware do I need?
  • User Application Stories
    • Just finished a great project?
  • Everything HMI!
    • UniLogic: HMI Design Inspiration
    • UniLogic: Graphics, from Community!
    • VisiLogic--HMI Design
  • Tips and Tricks
    • Best Programming Practices
    • Tips and Tricks
  • Job Board
    • Projects seeking Programmers
    • Programmers seeking Projects
  • General Discussion
    • We're Listening...
    • The Lounge
  • News and Announcements Copy

Calendars

  • Community Calendar

Blogs

  • Unitronics' Blog: PLCs, HMIs and more
  • Saragani's Blog
  • Simon's Blog
  • Ash Neilson's Blog
  • Joe Tauser's Blog
  • Unitronics en Español
  • Powered by AMPS
  • Alldrives UK's Blog
  • Unitronics, Howman Style
  • PLCNewbie's Blog
  • Telestar Automation Blog
  • Webinars Collection
  • Tim's Corner
  • Blog
  • TELESTAR (Italian)
  • i4 Automation
  • i4 Automation (UK)
  • Unistream UDFB's

Categories

  • From Headquarters: Sample Applications
    • From Headquarters: VisiLogic
    • From Unitronics: U90 Ladder applications
  • User-submitted Applications
    • From Users: VisiLogic applications
    • From Users: U90 Applications

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Categories

  • New Features
  • Other

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Interests

Found 25 results

  1. Hello, I am testing the principle of calling a stored procedure in Unilogic 1.33.236 but I have a visible error message in the structure associated with the request: Status: -5 (Not documented in the Unilogic help) Status report : 2031 no data supplied for parameters in prepared statement I am working with a MySQL database. The connector is correctly configured. In PhpMyAdmin, I created a stored procedure to insert data in a table with the name of the dynamic table as described in this link: https://support.unitronics.com/index.php?/selfhelp/view-article/sql-dynamic-table-name but adapting it to MySQL. Here is the code for the stored procedure: DELIMITER $$ CREATE PROCEDURE `insert_data`(IN `idStation` INT, IN `ts` INT) BEGIN SET @varTable = CONCAT('bd_acquisition_',idStation); SET @query = CONCAT('INSERT INTO ',@varTable,'(`id_station`, `date_time`) VALUES(',idStation,',FROM_UNIXTIME(',ts,'))'); PREPARE dynQuery FROM @query; EXECUTE dynQuery; DEALLOCATE PREPARE dynQuery; END$$ DELIMITER ; I tested the call in phpmyadmin CALL insert_data(10,123456); and it works fine. I've tested the call in the LADDER code by giving input values in hardcodes directly in the SQL statement and it works very well (without checking "Is Executing Stored Procedure") But I'd like to provide the input values through the SQL Query block and that's where it gets stuck...The problem comes from the call with the placeholders. Nothing works: ? , :param , @param , With or without "Is Executing Stored Procedure". Does anyone have any ideas? Thanks in advance
  2. Trying to connect to a Azure sql server running the latest version of SQL server. I can connect using telnet and SSMS no problems. The unistream can connect to a local host using sql express. However when i connect using the same info. I get error which is the pic attached. I am kinda at a impasse. So what server on the unistream line compatible with?
  3. Hello Everyone, Been having some trouble connecting to a remote mysql database which I have solved but at a compromise. The mysql server in question was running 8.0 using the new default authentication method caching_sha2_password and connecting using SSL. I had to disable the server requirement to only connect over SSL and revert to using mysql_native_password authentication to be able to connect. I can live without using the new auth method but not being able to use SSL is surprising. Is unistream running an mysql client that does not support these features or have I missed something? Thanks Luke
  4. How can I get multiple values back from multiple SQL statements in a stored procedure in MySQL? Stored Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `get_test`(OUT var1 INT, OUT var2 INT ) BEGIN SELECT Temperature into var1 FROM `interface`.`setpoints` WHERE Area = 1; SELECT Temperature into var2 FROM `interface`.`setpoints` WHERE Area = 2; SELECT var1, var2; END In MySQL Workbench: CALL `interface`.`get_test`(@a1,@a2); Result Grid shows: var1 | var2 750 | 850 In UniLogic my Query is: CALL get_test(:a,:b); The query executes successfully but doesn't return any values. The two tags tied to the Query Outputs keep their current values and aren't changed. Do I just need the proper SQL incantation to get this working? Or are out parameters not supported with UniLogic?
  5. Hello, I would like to push and retrieve data to and from the the internet directly from my Unistream. I tried to connect to a server on Amazon, a working database (MSSQL) we are using in another project. But when doing a simple query I get error: "20009 Unable to connect to data source Unable to connect: Adaptive server is unavailable or does not exists" Anyone here who could give me a hint on what I need to do? The Database is set up as "SQL Server" with IP-number and instance name, database name, user name and password. Another question is if I can use other kind of web services to handle my data ? Thanks, Bjarni Gudmundsson
  6. Hi All, I have a unistream pro to play with for a few weeks, thought id spend the time trying to use the SQL client functionality for the first time. I have followed the installation instructions in the help files for express 2012 and have downloaded one of the examples 'SUniStream_070_SQL' Is there any documentation on this particular example?
  7. Hi, I need help to tackle a problem, Cyclic i write data into an table, this works like a charm. However at random events there is some kind of data corruption. All 4 columns are written with a large number. When i Look into the PLC the data is 100% correct. Making a SQL trace data is incomming wrong, please refer at the attachement This is just in one of the 1000 times. Changing the write interval does not help. We use CAT6 shieleded cable. Thanks in advance!
  8. Hi All, I have created an stored procedure in an SQL server. I would like to create a table whith a variable name. EXEC CreateTable[:Test] It creates always a table with the same name. The name between brackets [] This Test parameter should be variable, how can I archieve this?
  9. Hi all Is it possible for the Unistream series to respond to an external SQL Query. I have a client that has a database that wants to request data from the PLC instead of the PLC pushing data to the database?
  10. Hello everyone, In the code below I`m targeting a database called t_lg202001 which refers to a log table of a specific year and month. In this case January 2020. See code below: SELECT a.EVTLGUID, a.DEVDT, a.USRID, c.NM, b.NM FROM t_lg202001 a JOIN t_evttyp b ON a.EVT = b.EVT JOIN t_usr c ON a.USRID = c.USRID WHERE a.USRID IS NOT NULL ORDER BY a.EVTLGUID DESC LIMIT 1; As my target table is going to be update every month as the years goes by I need to change this line of code for every single month and afterwards years. i.e: t_lg202001 = January 2020. t_lg202002 = February 2020. ... ... ... t_lg202012 = December 2020 t_lg202101 = January 2021 ... .. t_lg202112 = December 2021. I really would like to manipulate that line of the code through a variable where I can automate as required. Does anyone has any idea or how this can be done? If there isn`t any way at the moment here is a suggestion of improvement for the coming versions of the Unilogic software which I think it`d be very beneficial and it would enable the capability of the software for the future. I hope that makes sense.
  11. Hello everybody, I'm new to the Unitronics world. I have to synchronize the PLC clock and the idea is to read the time zone and the UTC from the MySQL database and set the time with the Set PLC date/time elements. However, sometimes the updating functions hang, with the status 1, and date and times are not set. The tags RtcDateSql, RtcTimeSql and RtcTzFromSql contain the right values, and they are updated correctly everytime RtcQueryTrigger is pulled up. I have done some test, anyway I wasn't able to find the reason this function sometimes works and sometimes not. Am I doing something wrong? The PLC is a USP-070-B08 with the USC-P-B10 CPU, no I/O or COM installed. CPU OS 1.28.35, Panel 1.28.58, UniLogic 1.28.34 Thank you for your attention
  12. Hello, I noticed that unilogic has a function named " SQL_QUERY " for executing SQL queries using c language. I can see that it needs to be passed an array of a struct called " SQLParamData_t ". This struct it seems that it has three fields: one for the data type, another one for the data length and finally a third for the data itself. From some try and error I deduced some of this data types values (I hope correctly): unsigned char 1 signed int 4 unsigned int 5 volatile char* 10 Any ideas where I can find the rest of them, for example the value for volatile unsigned char* type? Thanks in advance and best regards, Juanan
  13. Hi guys, we need help for write data in SQL table , for build report. We don't be how type for use this variable. I try string (all types), but not work. In anexx my table where need write . Thanks in advance.
  14. Will the Unistream SQL drivers connect to MS SQL 2000 or am I just wasting my time? I can connect to MySQL 8.0 and SQLEXPRESS 14.0. (I know - just upgrade already...) Thanks, Norm
  15. Dear All, I am starting for the first time to work with DB in a server PC using SQL (SQL server) query. I am using the SQL example...all works fine...I do the connection...I create the table...I am able to insert, update, get and cancel the "info" with this DB...what I saw and I don't understood is that if I send a query to have some information refered at a specific ID (...WHERE employeID =?) and this ID is not present in the DB the query result, BIT about query success, is turned as "1" ...I was expecting that the "fail BIT" arise !? Maybe this is correct, sorry I don't know deeply this matter...can someone confirm? thanks
  16. Dear Friends, I require a sample program of SQL connection with UniStream PLC and how to run queries.
  17. Hello, I would like to connect my UniStream to the internet via Ethernet cable that is connected to my router. This is to send SQL statement to my SQL database. Right now I am able to download/upload ladder logic to the PLC via the current communication setup I mentioned. Is there any settings that I need to do before it is able to go online (internet) in order for me to send the SQL statement? Thank you.
  18. Any help on using the block for reading the data from data table into SQL rows would be appreciated. I could not find enough document on using this ladder element in the help section. I can read successfully execute the query and read the data from the database to the data table.
  19. I am trying to set up the connection between PLC and a local database for the first time. Tried many times but an unsuccessful attempt. I think I might be making mistake in configuring the connection parameters in UniLogic. In my case I am using SQL server. Can somebody help me to explain the database connection parameters? I have attached my settings below.
  20. Hi everybody, I'm struggling to make a controller to submit data from a controller USP-070-B10/B08 to a MySql Database that stays on Amanzon cloud. I made a project using Unilogic v 1.19.83 same as the one in the controller. Did the connections and queries I wanted but nothing happens. it looks like it's not communicating at all with the database. I'm not even seeing a connection in my server manager. There is any tutorial, hints or something somewhere to guide me (I attached some screens as well)? Thanks
  21. Hi, I'm using UniStream with UniLogic (19.2). I'm unsure on how to use the "SQL Query" function block. the "SQL Query" has 3 fields: Query - Input, SQL query to execute. Parameters - Input, query parameter Outputs - Output , query output When I write the next query: Insert into Agua (Tiempo) Values (T_Agua) How does the PLC knows the direction of the database? What do I put in the Parameters and Outputs fields? Is there any file or webinar that I can check regarding this topic?
  22. So. You may be smack in the middle of your first Smart Factory project...or you may be wondering what all the hype is about..or, you may be looking around for a brand of programmable controllers that will talk to an ERP SQL database. No matter what your particular scenario is, we invite you to attend our webinar to learn how easy it is to communicate data via SQL, from the production floor up to management levels using Unitronics All-in-One PLC + HMI controllers. To sign up, click here
  23. We invite you to take part in our webinar: SQL - Adding a Piece to the Industry 4.0 / Smart Factory Puzzle. UniStream PLC + HMI controllers support MS SQL and My SQL, server and can connect to SQL databases. This enables you to set up UniLogic to communicate SQL data ERP/MRP servers - sign up to learn how!
  24. Hello, Does Unilogic support data transfer to SQL server ? Thank's, Itzik.
  25. Is there any automated way to get data from a database such as SQL into a V350 in an automated way? It would be nice to go from an external database into a Data Table. Anyone with experience in this area?
×
×
  • Create New...