Jump to content

NoamM

Moderators
  • Posts

    185
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by NoamM

  1. Hi hotwires,
    This is just the way TCP works. A connection can remain established for days or even weeks without a single packet being exchanged. The disconnection should be detected as soon as the connected side tries to send data. A disconnected device can't send any data, so there's no way to  know that it's disconnected until it fails to respond to a query.
    In general, the only way to detect a disconnected device is to try to send data to it. If you don't ever send any data, you're simply not assured of detecting it.

    Notes:
          When the server regains connectivity (back on the net) it will automatically update the number of connections value.

  2. Hi _MELLON_,
    You can build a widget that use the "Alarm Status Struct".

    image.png

    For example,  if I have 3 Alarms in my application I can use

              "Alarm Status Struct -> Alarm State[0]"
              "Alarm Status Struct -> Alarm State[1]"
              "Alarm Status Struct -> Alarm State[2]"

    to trigger alert (text or some graphic element). Any Alert can be saved in a Data Table and be acceded later on.

     

  3. Hi Kestralcontrols,
    In order to download a file that stored on the SD card via a  web server "Hyper Link" use the prefix "ExternalSd" before the path to the file.

    For example, lets assume the next file exist on my SD card "/MyDir/MyFile.txt". and that I have a "Hyper Link" widget that it "Tag:Link" is tag PATH_TO_FILE. If I will set PATH_TO_FILE to "/ExternalSd/MyDir/MyFile.txt" and press on the "Hyper Link" on the web site the file will be downloaded:

    image.png
     

  4. Hi Priyanka Shahi,
    Let's go over the steps to use:

                           image.png 


    #1. Create a "UniLogic Query" for parameter A
    When you are using  "Read from DTI row, Write to SQL" function block  the first parameter is Query that belongs to an SQL data base. for example:

    Capture.PNG

    In this example I've created a Query named "My Query" that belongs to data base "Database1". When I will use "SQL Query" function block with "My Query", UniStream will connect to "Database1" according to the specifics I gave it - IP = 1.2.3.4, Port = 1234, etc...
    The SQL query syntax will be added in the next steps.


    #2. Add a Data Table for parameter B
    Let's add the next Data Table: 12 rows of the next struct {"ID" - UINT8, "Age" - UINT8}

    image.png

     

    #3. Add SQL syntax  our "UniLogic Query"
    The SQL syntax of the "UniLogic Query" will be the code that will be preformed in the SQL Server. One can use the "Add New Query" (see image below) button, when he creates a "UniLogic Query",  in order to create in a fast & convenient way the SQL syntax for the SQL operation he wants:

    image.png

    For example , let's say we do not have a SQL table that feet to our table created above  in our SQL Server. If we use "Add New Query" -> "Script from Data Table as" -> "CREATE", and link the the table we created, we will get:

    /*************************************************************************************
        Use this query in a 'SQL Query' Ladder Element.
        The PLC will create an SQL Table with a strcture that matches the DTI's structure.
    ****************************************************************************************/
    
    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Table1]') AND type in (N'U'))
    BEGIN
    CREATE TABLE [Table1](
    	[ID] [int] NOT NULL,
    	[Age] [int] NOT NULL
    )
    END

    This is the exact code we need to create the Data Table we created in our SQL Server.
    The table already exist and you want to add the data? no problem, let's use the  "Add New Query" -> "Script from Data Table as" -> "INSERT":

    image.png

    UniLogic does the job for us.


    #4. Add 'From Index' for parameter C and 'Number of rows to write' for parameter D
    Straightforward. Just add the values that detriment from what index you start and what are the number of rows you want. If for example we use:
                   
               'From Index' = 2
               'Number of rows to write' = 2

    If the query syntax is the "INSERT" query before, 2 rows of the Data Table from index 2 will be added to the table in the SQL Server.
     

  5. Hi Interroga,
    I see in our bug tracking system that issue "UAC struct updated with wrong data after 'Login' -> 'Logout' -> 'Invalid Login'"  was fixed & verified by our QA in 22-01-2018, PLC version 1.23.4.
    Moreover, I just checked the bug scenario on PLC version 1.23.19:

              1. Login to UAC using correct credentials: User name and group appear in UAC struct
              2. Logout: User name and group data is reset
              3. Login again, now using incorrect credentials
               While the status is correct (5=invalid login),  the user name and group name of last successful login  appear in the struct

    and it working as expected.

    In what version do you use? 
    Is my scenario  is exactly what you are complaining about?

  6. Hi Interroga,
    In order to apply language change on HMI elements follow the next steps:
    #1. Add an HMI element to the HMI screen.  For example, I added a "Fixed text" with the value "Hello".
    #2. In "Solution Explorer" -> "Languages"  add an additional language of your choice to the application. For example, I added "Korean".
    #3. Press on the new language you added  and the translation menu will appear:

    image.png

            The "Hello" marked in red is the value of the "Fixed text" element when the language of the PLC is Korean. Let's edit the value:

     image.png


       #4. Create a change language Action on order to change the PLC language  to Korean. For example, I created 2 actions, one for English & one for Korean.
               When the Action's linked BIT is set (via Ladder, button click...) the PLC language will change accordingly. Example:

    image.png

          Now on our "Fixed text" HMI element the text will be "여보세요" and not "Hello" because Korean is the active language,

  7. Hi ORSO2001,
    Use "Find DTI Column Value" Ladder function. This Ladder function finds a value in a column and writes the row index number into a data tag. If the function finds a matching row, the row number is stored in parameter E, Result. If no row is found, E contains -1. Function parameters:
        
            A    Data Table to Search
            B    Column to Search
            C    Value to Find
            D    Start Row for Search
            E    Number of Rows to Search

            F    Value Location: Row Index Number


    Build your logic so that if a "Find DTI Column Value" call return a row index,  row index + 1 will be the "D  Start Row for Search" next value.

×
×
  • Create New...