MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About AndrejP

  • Rank

Profile Information

  • Country Slovenia
  1. S7-300 Citect S7NT

    Hello. I'm trying to comunicate to Siemens S7-300 using Citect S7NT driver. I haven't done this so far so I'm asking you for help. What software do I need to successfully comunicate with S7? How do I set S7NT CITECT driver (Board, port, device,...)? Thanks. Best regards.
  2. CITECT SCADA 6.1 + Microsoft SQL Express 2008

    But now I have another problem. In Citect Nexa 6.1 I'm using conn string: hSQL = SQLConnect(" Driver={SQL Server};Server=PC_NAME\SQLEXPRESS;Database=MyDatabase;Uid=User;Pwd=Password) It connects without problems. If I use Querystring: SELECT * FROM MyDataTable it works. I've got values from table. BUT!!! If I use more complicated Querys like Queriing a Subquery (IT WORKS IN SCADA 2016 and in SQL SERVER MANAGEMENT STUDIO): SELECT * from (     SELECT *      from mytable ) subquery I've got error: 4501Unexpected text at end of SQL query 'FROM' Does someone have any advise? Thanks. Best regards.    
  3. CITECT SCADA 6.1 + Microsoft SQL Express 2008

    Hello. The Citect Nexa 6.1 is running on WIN7 machine. The Citect 2016 is on different machine using WIN10 If you are using MSSQL-Wxpress, The connection string using CITECT 2016 is: hSQL = SQLConnect("SCADA Data Provider=SQLClient;Persist Security Info=False;Integrated Security=true;Initial Catalog=mydatabase;User ID=User;Password=Password;server=PC_NAME\SQLEXPRESS;")  
  4. Hello Wasan.

    I see you are very familiar with Citect.

    Thanks for help in SQL Connection string. For Citect 6.1 yours DSN solution works great.

    I'm now having problem with error: "4501 Unexpected text at end of SQL query: 'Value'.

    The same thing works in Citect SCADA 2016.

    I'm using this Query:

            SQLSet(hSQL, "SELECT ") 
            SQLAppend(hSQL, "AVG(tbl1Value) as AVG_Val ")
            SQLAppend(hSQL, "FROM ")
            SQLAppend(hSQL, "(")
            SQLAppend(hSQL, "SELECT Value AS tbl1Value ")
            SQLAppend(hSQL, "FROM CitectZRAK tbl1 ")
            SQLAppend(hSQL, ") x")

    If I use simple SQL Query (SELSEC * FROM Datatable", everything works OK.

    I have tried to change SQL Connection string to:

    hSql = SQLConnect("Driver={SQL Server};Server=MYSERVER;Database=MyDatabase;Truste d_Connection=yes;")

    but I got the same error.

    Do you have any suggestions?


    Best regards, Andrej


  5. CITECT SCADA 6.1 + Microsoft SQL Express 2008

    I have tested this on Citect SCADA 2016. It DOES NOT WORK in this version...
  6. CITECT SCADA 6.1 + Microsoft SQL Express 2008

    Hello.  Wasan Thanks for answer. I helped myself with "Database Exchange Controll" to build connection string. The result for successfull connection was (almost the same as yours): hSQL = SQLConnect("DSN=SQLDatabase_Name;UID=UserName;PWD=Password;APP=CITECT;WSID=ComputerName;DATABASE=SQLDatabase_Name;") Best regards, Andrej.          
  7. Hello. I'm trying to connect to Microsoft SQL Server (2008 EXPRESS), but the connection is not working. I have done this in Citect SCADA 2018 without any problems using connection string: hSQL = SQLConnect("SCADA Data Provider=SQLClient.....) How can I connect to MS SQL Server using Citect 6.1? Thanks. Best regards.
  8. OMRON ODD or EVEN value

    Hello. I have figured out... It's simple You declare UINT variable as array dimension 2. Then you can use Var[0] as word R and Var[1] as reminder R+1. Best regards...    
  9. Hello. How can I get bit addressing of defined variable in function block? For example: - I define variable type DUINT with name Double_VarI_INT. - I want to get or set one bit out of it (its double word). - If I use Double_VarI_INT.0 I got error. Best regards.
  10. OMRON ODD or EVEN value

    Thanks for answer. I have allready figured out I can use reminder. Problem is that I need to do this in Function Block. I declare variable as UDINT. The program automatically assign address to this variable. The sollution would be assigning fixed memory allocation. But I would like to avoid using fixed memory allocation (when declaring variable).  How can it be done this by looking at the R+1 (reminder) of declared variable? Best regards.

    Hello. How can I divide in MODULAR way? DM100 MOD DM101. Thanks. Best regards, Andrej.
  12. OMRON ODD or EVEN value

    Hello. How can I easely determen if for example the value in DM100 is ODD or EVEN? Thanks.