sachincool786

MrPLC Member
  • Content count

    37
  • Joined

  • Last visited

Posts posted by sachincool786


  1. Dear Experts!!!!

    I want to communicate my "XG-8000 Series Keyence Vision camera" with Mitsubishi Q06UDV PLC over RS232C non-protocol mode.

    My configuration is like :

    PLC CC-link Master module---------------- cc-link to RS232C cc-link cable converter (AJ65BT-R2N)

    AJ65BT-R2N is connected to XG8000 Series controller over RS232C port-1.

    Can anyone please tell me the commands, how can i change program, change variable etc. from PLC.(or have any manual regarding PLC command please forward)

    If you have any sample program please forward it to sachin0000.000@gmail.com

    Thank You.


  2. Dear All!!!

    Please tell me the way how can i delete recipe from Runtime.

    There are only save and restore options in the inbuild recipe function.

    I am using inbuild recipe function.

    Factory Talk View SE v8.0 (all the patches till date are installed)


    I have RSView32 VBA code but i am not able to use it in FTV SE Please help me with it!!!


    Private Sub Display_AnymationStart()
    Dim sRecipes As StringList
    Dim vRecipe As Variant
    On Error GoTo ErrHandler

    Set sRecipes = gProject.GetComponents("recipe;files")
    For Each vRecipe In sRecipes
    LstRecipeNames.AddItem vRecipe
    Next vRecipe

    ErrHandler:
    If Err.Number Then
    gActivity.Log Err.Description
    Err.Clear
    End If
    Set sRecipes = Nothing
    Set vEachRecipe = Nothing
    End Sub

    'user selects the recipe name in the list box, and then presses delete button

    Private Sub cmdDeleteRcp_Click()
    On Error GoTo ErrHandler
    If LstRecipeNames.ListIndex = -1 Then
    MsgBox "Select a recipe to delete"
    Else
    'delete the recipe file, and remove from the project
    gProject.DeleteComponent "Recipe;files", LstRecipeNames.Text
    'remove the item from the listbox
    LstRecipeNames.RemoveItem LstRecipeNames.ListIndex
    End If
    ErrHandler:
    If Err.Number Then
    gActivity.Log Err.Description
    Err.Clear
    End If
    End Sub


    The bolded points are problem, Bypased the error handler , but please lemme know how can use use this commands in FTV SE, as VBA in SE is client based blah blah...

    gProject.DeleteComponent "Recipe;files", LstRecipeNames.Text

  3. Public WithEvents oGroup1 As TagGroup
    Public vidrios1, vidrios2, vidrios3, vidrios4, vidrios5, vidrios6, vidrios7, vidrios8, vidrios9 As String
    Public str_vidrios1, str_vidrios2, str_vidrios3, str_vidrios4, str_vidrios5, str_vidrios6, str_vidrios7, str_vidrios8, str_vidrios9 As String


    Public Sub Display_AnimationStart()
    Dim TagsInError1 As StringList
    On Error Resume Next
    Err.Clear
    If oGroup1 Is Nothing Then
    Set oGroup1 = Application.CreateTagGroup(Me.AreaName, 500)
    If Err.Number Then
    LogDiagnosticsMessage "Error creating TagGroup. Error: " _
    & Err.Description, ftDiagSeverityError
    Exit Sub
    End If
    oGroup1.Add "[0]comm_furnace_glasses[0]"
    oGroup1.Add "[0]comm_furnace_glasses[1]"
    oGroup1.Add "[0]comm_furnace_glasses[2]"
    oGroup1.Add "[0]comm_furnace_glasses[3]"
    oGroup1.Add "[0]comm_furnace_glasses[4]"
    oGroup1.Add "[0]comm_furnace_glasses[5]"
    oGroup1.Add "[0]comm_furnace_glasses[6]"
    oGroup1.Add "[0]Glass[0]"
    oGroup1.Active = True
    oGroup1.RefreshFromSource TagsInError1
    End If

    End Sub


    Private Sub oGroup1_Change(ByVal TagNames As IGOMStringList)
    On Error Resume Next
    Dim oTag11, oTag21, oTag31, oTag41, oTag51, oTag61, oTag71 As Tag
    Dim oTag100 As Tag

    Dim str_bits1 As String

    If Not oGroup1 Is Nothing Then
    Set oTag11 = oGroup1.Item("[0]comm_furnace_glasses[0]")
    Set oTag21 = oGroup1.Item("[0]comm_furnace_glasses[1]")
    Set oTag31 = oGroup1.Item("[0]comm_furnace_glasses[2]")
    Set oTag41 = oGroup1.Item("[0]comm_furnace_glasses[3]")
    Set oTag51 = oGroup1.Item("[0]comm_furnace_glasses[4]")
    Set oTag61 = oGroup1.Item("[0]comm_furnace_glasses[5]")
    Set oTag71 = oGroup1.Item("[0]comm_furnace_glasses[6]")
    Set oTag100 = oGroup1.Item("[0]Glass[0]")

    m_vidrios.str_bits (str_bits1)

    str_vidrios1 = str_bits1(CStr(oTag11))
    str_vidrios2 = str_bits1(CStr(oTag21))
    str_vidrios3 = str_bits1(CStr(oTag31))
    str_vidrios4 = str_bits1(CStr(oTag41))
    str_vidrios5 = str_bits1(CStr(oTag51))
    str_vidrios6 = str_bits1(CStr(oTag61))
    str_vidrios7 = str_bits1(CStr(oTag71))
    Err.Clear
    End If
    txtHorno.Value = "Mid(str_vidrios1, 1, 31) & Mid(str_vidrios2, 1, 31) & Mid(str_vidrios3, 1, 31) & Mid(str_vidrios4, 1, 31) & Mid(str_vidrios5, 1, 31) & Mid(str_vidrios6, 1, 31) & Mid(str_vidrios7, 1, 31)"
       
    If Mid(txtHorno, 1, 1) = "1" Then
         
        oTag100.Value = 0

        End If
        
    If Mid(txtHorno, 1, 1) = "0" Then
         
       oTag100.Value = 1

        End If
     End Sub

     


    I have some doubts , please help debugging it :

    1) txtHorno is a name of string display object  (which is VBA controlled) :

    txtHorno.Value = "Mid(str_vidrios1, 1, 31) & Mid(str_vidrios2, 1, 31) & Mid(str_vidrios3, 1, 31) & Mid(str_vidrios4, 1, 31) & Mid(str_vidrios5, 1, 31) & Mid(str_vidrios6, 1, 31) & Mid(str_vidrios7, 1, 31)"

    is it right???
    should i write "" because this is returning a string???
    should i write "txtHorno.Value =" or just "txtHorno ="
    if not please tell me the correct way to write it, actually txtHorno is a string in which i want to move the above(function returned) value.


    2)m_vidrios is my module name in which i have defined a public function so that i can use it in my form :

    m_vidrios.str_bits (str_bits1)

    Is it a right way to call it???

    The code of module named "m_vidrios" is :

    Function str_bits(entrada As String) As String

    Dim i, j  As Integer
    Dim Temp As Double

    Temp = Abs(CDbl(entrada))

    str_bits = "0000000000000000000000000000000"

    i = 0

    If Temp = 1 Then

    str_bits = "10000000000000000000000000000000"

    GoTo A:

    ElseIf Temp = 0 Then

    str_bits = "00000000000000000000000000000000"

    GoTo A:

    End If

    For i = 31 To 1 Step -1

    If Temp / 2 ^ i >= 1 Then

    str_bits = Mid(str_bits, 2, i - 1) & "1" & Mid(str_bits, i + 1, Len(str_bits) - i)

    Temp = Temp - (2 ^ i)

    Else:

    str_bits = Mid(str_bits, 2, i - 1) & "0" & Mid(str_bits, i + 1, Len(str_bits) - i)

    End If

    Next i

    If Temp = 1 Then

    str_bits = "1" & str_bits

    Else:
    str_bits = "0" & str_bits

    End If

     

     

    A:

    End Function

     


    3) oTag100.Value = 1
     
    will update my PLC tag "[0]Glass[0]" high automatically or i have to write anything else???


  4. Dear Experts!!!!

    Can you tell me the complete clear cut procedure of  PIDE autotune functioin

    And plz tell me when i shoukd do it ??? I.e. when the set point near the actual or when its far away and reaching to the SP.

    Can't i do it in FBD in Auto mode :  If yes then how??? Have to put FBD Block in manual mode always????

    Any other way to autotune it???

     

    asaS.png


  5. Quote

    Not able to make object "VBA contolled"  (sos)

    Dear Experts!!!

    Actually i have two problems :

    1.    I want to change the object (FT View SE v8.0) property to "VBA controlled". But its not allowing me to do it,  like as you can see on the pic.

    image.jpg

     


    2.    I want to make an array of objects in FT View like as shown in the pic (Image of VB form): the object name is azul and the index is 0 so the object shown in the pic is azul(0)

    image.jpg


    VB Form code is :

    Private Sub Form_Load()
    Dim i As Integer
    For i = 1 To 224
    Load gris(i)
    azul(i).Visible = True
    Next i
    azul(0).Visible = True
    For i = 0 To 224
    azul(i).Top = gris(0).Top
    azul(i).Width = gris(0).Width
    Next i
    For i = 0 To 224
    azul(i).Left = azul(0).Left + i * azul(0).Width
    Next i
    End Sub

    As you can clearly see in VB code I have created one object only, but rest of the objects are being created by Code only

    I want to do the same thing in FT View SE v8.0


    Please please help!!!!!


  6. Dear Experts!!!

    I am facing one problem in FT View SE v8.0 :

    I have 15 screens : 5 "are replaceable" with full resolution and other 10 are popup displays with half the resolution of that of Monitor and are "on the top" type. I have a buttons to go to those pop up screens.

    Whenever I press any button to open any pop up screen the background screen (Replacable type, full screen) becomes shorten and pop up displays works like they should.


    i.e. whenever a pop up display opens, full background screen display suppresses automatically. Then i go to another full screen and then come to the main working full screen then it becomes ok.


    This phenomenon occurs whenever a pop up display open (not VBA controlled).

    Its a simple display open button ( not VBA controlled)

    As you can see in the picture the back image is suppressed :-

    http://postimg.org/image/c5um49c5h/

    Normally it comes to full screen , its like :-

    http://postimg.org/image/vtli1bd7f/

    when I go to some other replaceable type screen and come back again to this screen, it becomes OK.


    Here in this pic below, you can see the properties of the screen which is giving problem :-

    http://postimg.org/image/gcqpkfb65/