noorloai

MrPLC Member
  • Content count

    71
  • Joined

  • Last visited

Everything posted by noorloai

  1. FactoryTalk SE - VB Script

    Hello guys, Currently, I am trying to do the same thing by running specific VB code to communicate with SQL database continuously in FTSE. I dont have a lot of experience with VB codeing and wondering if you can guide me through.? Thank you
  2. Which plc is the best?

    Hi guys,  I would like to ask based on your experiance which plc is the best based on lifetime span over high tech feature? If any one can help me / share with me his thought and some links to guides me through this topic would be highly appreciated.   Thanks
  3. Hello, I want to monitor Wonderware historian communication status inside CompactLogic PLC and trigger a fault in PLC if communication is lost and capture this in FactoryTalk HMI SE. I have talked to Wonderware historian technical support and they said there is no way to do that as the Wonderware  Historian Server is a Suitelink Protocol server, so only a Suitelink Client would be able directly to access the system item from the Historian Server. has anyone tried to achieve this task before? is there any alternative way? and if so, can you guide me through the steps? Thank you and appreciate your support in advance.    
  4. Unfortunately, the Historian has no way of pushing system tags value to the PLC. Therefore, I am looking for an alternative way to accomplish my task, like using FT SE VBA to communicate with SQL server to pull historian system tag? this is just a thought but not sure if it's possible. I have limited experience with VBA and SQL.  Wondering if someone can help with that? Thought? 
  5. Currently, the WW Historian can read the tags from the PLC (Compact logic) using RSLinx over Ethernet DAServer Manage (DASABCIP). But I am facing an issue in finding a way to read Historian system tags in PLC. Is there any solution for that? I would like to monitor the Historian communication Status in PLC   Note: HMI is FactoryTalk SE Ver 9.0 Appreciate your response in advance.  
  6. Hello all, I am using NJ501-1300 CPU, connect to HMI Via Ethernet and would like to capture data from the PLC/HMI to excel spread sheet.What is the best way to do that and can you give me some outline how to start? Is there any manual should I follow to help read data in an excel sheet? Thanks for your support.
  7. Hello, We have a customer who wants to connect the HMI PC of FT SE to their domain and to use their own authentication. After investigating the application, it seems our application uses a windows-linked user group and VBA script for login and security permission. For some reason, it’s not using FT SE built-in login feature. We have mapped the HMI PC to the domain and generated new users in the domain and tried to run the application and login with the new users, we got fail with a Permission Denied exception We trace VBA code and found the root cause of the issue is that the VBA script is looking at which groups the login user is a part of does not have permission to look at domain users. This is because the VBA script is running under the local HMIUser account, which does not have any visibility on whichever domain the PC is joined to.   see below   Function getCurrentUsersGroup(Optional username As String) As String         Dim strUserName As String         Dim Domain As String         Dim i As Integer         Dim userLevel As Integer         userLevel = 0         i = 0                          Dim objGroup    As Object         Dim objUser     As Object         Dim objNetwork  As Object                  If username = "" Then             Set objNetwork = CreateObject("WScript.Network")             strUserName = objNetwork.UserDomain & "/" & objNetwork.username         Else             strUserName = username         End If                  strUserName = Replace(strUserName, "\", "/")         If InStr(strUserName, "/") Then             ' No action: Domain has already been supplied in the user name         Else                 Set objNetwork = CreateObject("WScript.Network")                 Domain = objNetwork.UserDomain                 strUserName = Domain & "/" & strUserName         End If                  Set objUser = GetObject("WinNT://" & strUserName & ",user")         If objUser Is Nothing Then             ' Error handling         Else             For Each objGroup In objUser.Groups                 i = getAuthLevel(objGroup.name)                 If userLevel < i Then                     userLevel = i                 End If             Next objGroup         End If          GetObject looks for user object... if that user is on a domain (eg. TESTDOMAIN\domeng ) then it will fail with a Permission Denied exception I am wondering if there is a function/method that we can use to solve this issue? I am not very fluent in VBA but I think I could stumble through it if given an idea of how to tackle this. Thank you and appreciate your response in advance  
  8. thanks for your response ameyzingg. We have already added the users to FT administrative console, but The script in the application doesn’t allow domains it's only seeing the local users not domain users. I am wondering if there is any way to read domain users in VBA? Thanks  
  9. Hi there, I am using compact logix controller 1769-L36ERM with Factorytalk view SE running on BlueLine PC communicating through Ethernet/IP. I would like to perform a performance test to check how long it takes for a command to transfer from HMI to PLC and vice versa. I tried to create a logic that set a tag in Plc and HMI reset that tag and monitor this tag in Studio5000 trend, however, this task doesn't give me what I am looking for. Can someone help on this? Thank you and appreciate your response in advance.    
  10. Hi All, Recently, we have upgraded G3 RedLion HMI to CR300010 and migrated the G3 database crimson 2.0 to Crimson 3.1 Currently I am testing CR300010 and I am facing an issue with communicating CR300010 with the third party through RAW TCP/IP  I have two ports one set as Raw TCP/IP Active and the second one set to RAW TCP/IP Passive please see the attachment Currently, the HMI Received data fine from the third-part ( server Pc) however, when trying to send message to the third party, the third-party doesn't seem it receive anything. The same program works fine with G3 HMI.  Are there any differences between portprint() command in crimson 2.0 and crimson 3.1? Can someone guide me through how can I confirm that both systems are communicating? how can I investigate this issue further?. I could ping the IP address for both systems from my pc which is connecting to the same network switch.  Appreciate your support in advance      
  11. RedLion CR300010 Raw TCP/IP Communication

    This issue been solved by using PortPrintEX() function instead of PortPrint() to write to the third party and it fixed the issue.
  12. Hi there, Recently we have a client who has code written in studio5000 using 1769-L30ER PLC. Most the codes written using AOI. Some of these AOI used to configure hardware of third party like reading/writing Beckhoff Ethernet IO Chassis.  Client requires to move the AOI to Open Controller CPU 1515SP PC2 Using TIA PORTAL.   My question, how can we establish communication between those controllers? How can data exchange between those controllers? By moving AOI to diffrent platform, how can studio5000 points to those AOI in TIA PORTAL? Is there any suggestion on how tags/ parameters transfer in this case? Is there anyone who have achieved something like this can help? Thanks, and appreciate your response in advance.
  13. Conversion partial code from Studio5000 to TIA Potal

    Thanks pcmccartney1 for your response. My other question Can I Send  /Receives  UDT tags between those two controllers (Rockwell and Siemens) like Produce /Consumes tags between two Rockwell controllers?   if so, how ?  does this gateway enable my controllers to exchange UDT as well? Thanks,  
  14. RedLion CR300010 Raw TCP/IP Communication

    Hi,  Well , I still have the old HMI with crimson 2 and it works totally fine. however for some reason same program in crimsion 3.1 with Cr300010 not working as expected. CR300010 only support crimson 3.1 software. So i didn't test 3.0 version on machine. how can I use that "Have you been able to verify the connection is operational using a modbus emulator? " Iam not sure how to use that can you advice me?  The issue that I am facing is writing to pc over Raw TCP/IP protocol. Redlion CR300010 can receive data from pc however can not send data back.  I have debugged my code using web server and Windows online tools and found my code is executing, however i couldn't see what i am sending to pc. i couldn't find a way to monitor the string data type that i am send.   what could be the issue? its same code exactly in crimson 2.0. same Ip address and subnet mask. is there any suggestion that i should do to help me discover the root cause of this issue ??    thanks
  15. What is the easiest way that HMI writes to Array of SINT[24] ? Like I am thinking to have a maintain buttons that points to a BOOl[32] elements in PLC when button press on HMI the bit in BOO[32] will be active high and then can write 99 a member in to SITN[24] , else will write 0. But that required 48 rungs . Is there any other efficient suggestion ? Thanks  
  16. I have the following: Array of SINT[24] call it Sorted[24] has a sorted vehicles based on its position If there is less than 24 vehicles on track, I need operator to insert gaps which will shift the first Array elements based on the location that operator select I want operator to select from HMI whether this location is full or empty which write to another Array of SINT[24] call it Gap[24], 0 means full, 99 mean empty   Example: Sorted[21]= [6,7,8,9,…..,10] Operator can add up to 3 gaps, Based on operation selection Gap[24]= [0,99,99,99,0….0] Output Array = [6,99,99,99,7,8,9,…..10] So what I am thinking is to map 24 buttons on HMI to Bool[32] on PLC only 24 used, Then if operator select that bit it will write 99 to Array SINT[24] Else it will write 0 Then I can compare my sorted array with my gap array and find the output array. If you have a better solution/idea would be appreciated.  
  17. “Do the array elements match up? In other words, will pressing BOOL[7] write 99 to SINT[7]?" ·         Yes It does match Why 48 rungs with only 32 buttons? Do you have an example of what you've done so far that does what you want for one button?” ·         As I have two condition 0 and 99 , and I have 24 elements
  18. Hi All,   I have a question on if its possible to do indirect addressing of individual bits of a tag of datatype dint in studio5000 ladder logic? I am writing a routine that should  loop through the individual bits of the tag of data type dint and do processing . Like instead of using OTE instruction ConfirmRequest[rvIndexSafety] where confirm Request is BOOL[32] elements  if condition true and rvIndexSafety =1 => it will set confirmRequest[1]  I need to use DINT and set DINTDataType.1  How can i approach this?   Thanks,  
  19. Thanks for your response. I also found a tech note that explain that using this  MyArray[(MyIndex AND NOT 31) / 32 ] . [MyIndex AND 31]  
  20. Hi All, I have an issue and hoping you can help me with the solution.  I am not sure how can I use TON within loop in ladder logic? I have made a loop using JSR and LBL to execute Sub, in this subroutine I need to use timer or delay before turning the output on, as I am facing an ON/Off condition which turn the output on. Is there any suggestion ? Appreciate your response in advance. Thanks,
  21. there is no condition on JSR, BUT I am using conditional MCR to execute those codes . Is there any other solution ? 
  22. Hi, I need to set an output of bool[64] array when condition triggered but when I download the code to the controller it cause major fault see attached. Can someone help me with that? Thanks  
  23. Hi Guys, I have an Array of BOOL [52].I want to mask this array based on size (SINT) . like if my array size is 12, I want to pass the first 12 elements of Array of Bool and block the rest. I am not sure how to use MVM. Can someone help me with that ? Thanks 
  24. Hi All, I have two DINT array for example array1 [200] = [ 0, 1.........199], array2[100] = [ 20,40,60 ...180]  array1[30] = 30 need to compare it with array2[100]  and find the closest range. in my example array1[30] is between array2[0] and array2[1] how can I do that in studio5000? I haven't worked with array before and therefore your support is appreciated  Thanks