Jump to content

Saragani

Members
  • Posts

    1,196
  • Joined

  • Last visited

  • Days Won

    116

Everything posted by Saragani

  1. "My problem is with the string and Boolean TargetFolder resumeRead." - You don't specify what is the problem... destinationFile is where to save the file in your hard drive. If it says TargetFolder then it means that it is a path where the file with be saved in. resumeRead is used in order to resume a file, if the transfer was canceled or interrupted in the middle.
  2. Hi, just a workaround that should work with version 1.13.9 (it will not work with later versions). If you create a new instances of the PID autotune struct, they have their members as writable. (On later version, the members will remain as Read-Only). So you can create new instances, and use the Find and Replace (Ctrl + H) to replace from the old PID autotune instance to the new one. Since this workaround will not work on later versions, I suggest you to fix your code, so you will not get stuck in the future. About the force error integral, I'll check that for you.
  3. Due to a problem with earlier versions, those tags and others had read-only members set as writable. Can you please explain why are you writing values to PID Control values and Control Value integral? We had some another customer which had the same problem, and he understood that there is no point and logic in writing to those tags.
  4. Hi, did you manage to solve the problem? The support told me that they emailed you about a remote session, but they didn't get a response (Maybe you didn't get the email).
  5. OK, 3 elements, but were there a lot of Tags on the grid? (For example, you started a "Classic project" that contains MB, MI tags etc). I might need a remote session in order to try to find why those problems happen. Those 2 problems are really weird. For the SQL problem, I might need to look at the SQL logs (and hopefully see something that might suggest why the SQL fails). For the performance problem, I might need to install a 3rd party tool in order to see why things get slow at some point.
  6. Is there a chance that the computer name on the domain changes each time you boot your computer? I've found very little information about the given SQL error that can explain why it happens on each reboot. Does the slowness of the search of tags happens for every project (even if you create a small test project), or just with a specific project?
  7. Binary text element over a Binary Image element? A better solution is to have the background on the text in the Binary Text have a different background image (The Binary Text accepts both color and image as a background). It is lighter and makes it easier to maintain.
  8. Hi, the only thing that you care about in a timer is the Preset. You can save a UInt32 in the datatable, and load it to the timer's preset value.
  9. Sorry I can't help you more. You will either have to lean and code in C#, translate the code to VB.Net, or create a c# dll with all the required code/API and call those APIs from a VB.Net project.
  10. No, that's not possible. The main purpose of the $_title is that it represents the default title of the variable. For example, it numeric, it is Min-Max, so you can change it to: Please enter a temperature in range $_title And if you add another language to the project, then you can translate it and write for example: Se il vous plaît entrer une température dans la gamme $ _title
  11. Well, this might require a remote session.
  12. It is written in .Net C# and VB.Net are .Net They both compile to the same CLI.
  13. Hi, I work with a 16GB partition USB Stick without a problem.
  14. I'm unable to reproduce the problem with the project you gave me. Can you please confirm that your PLC has OS 1.12.7 installed?
  15. Hi, yes, it is written in C# The project opens fine with visual Studio 2010. The reason why it gets the exception is because the project was compiled as Any CPU while it requires x86 I've opened the project and made the needed adjustments so it will work. It should open fine. Please see the attached Zip file. Unitronics SD Card Explorer Lite.zip
  16. Yes. The SD Card Explorer itself is written in .Net, and there is a lite version of it that doesn't use 3rd party controls (so the user can view the sources)
  17. So restarting the PLC does't solve the problem? If you re-download the project using Download All, does it solve the problem? (try again). If it doesn't, can you please attach the project (or send it to Support@Unitronics.com and ask them to forward it to me)? I'm hoping that if I take the project, then I will be able to reproduce the problem on my desk (And if I will not be able to reproduce it here, then I might need a remote access to PC). Thanks.
  18. If you have rebooted the PLC while the animation was still running, then don't First, try to do a "Download All". Wait for the program download to end on both the PC side and the PLC side (wait until the animation stops). If the problem still persist, then please send the project to Unitronics Support for examination, and explain the problem you are experiencing. Thanks
  19. Hi. Can you describe the scenario that lead to this problem? (I assume that you have downloaded a project, and then made few changes in the structure of the table, and downloaded it again... Can you describe exactly what you did? Can you reproduce the problem?) Changes to the structure of the table can be changes in the Struct itself that is being used by the table, or change in the number of rows. Restarting the PLC would most likely solve the problem, but I would like to understand the problem better (So I need to understand the sequence of events that lead to this problem). Thanks.
  20. Yes, I've copy pasted it from your code and forgot to change a small part of it. It is supposed to be ReadOperands (You want to first read the value of the MI, which is the start row) My example uses MI 100. This MI might be in use by your ladder program... If not, it might also have a value from previously downloaded project since those registers are retained. So, assuming your Data Table on the PLC contains a total of 50 rows, and the value of MI 100 is either smaller than 0 or greater than 49, then you will get the exception: 'index' must be non-negative and less than the number of rows in table
  21. Can you ping the IP? Can you trace route it? Can you reach the PLC using Visilogic? Maybe you should configure a NAT on the router the PLC is connected to.
  22. I would guess that it is a PC side problem. I never seen your code, so I'm only guessing.
  23. Off course it gives you that... On the read request you don't tell it what you want to read (what type, what address and how much) Dim rw() As ReadWriteRequest = New ReadWriteRequest((1) - 1) {} Dim Read As WriteOperands = New ReadOperands() rw(0) = Read With Read .NumberOfOperands = 1 .OperandType = OperandTypes.MI .StartAddress = 100 .NumberOfOperands = 1 End With plc.ReadWrite(rw) Dim startRowIndex = Convert.ToInt16(CType(CType(rw(0), ReadOperands).ResponseValues, Object())(0)) table.Rows(startRowIndex).Cells(3).Fields(0).Value = DateTimePicker1.Text 'datum en tijd table.Rows(startRowIndex).Cells(2).Fields(0).Value = lblvoerbaknr.Text table.Rows(startRowIndex).Cells(0).Fields(0).Value = lblVoerzend.Text table.Rows(startRowIndex).Cells(1).Fields(0).Value = lblzendgewicht.Text ' Now you increment startRowIndex by the number of rows you intend to write (in this example, only 1 row): startRowIndex = (startRowIndex + 1) ' Now you write the table (You can also use Update, which will only update the cells that you have altered) table.Write() ' or table.Update() ' Now we need to update the value of MI100 in the PLC. '30-1-15 ANDERS dan bron! aangepast naar .net en code lichtelijk veranderd! Broncode: Dim Write As WriteOperands = New WriteOperands() rw(0) = Write With Write .NumberOfOperands = 1 .OperandType = OperandTypes.MI .StartAddress = 100 .NumberOfOperands = 1 .Values = New Object() {startRowIndex} End With plc.ReadWrite(rw)
  24. Use plc.ReadWrite ReadWriteRequest[] rw = new ReadWriteRequest[1]; rw[0] = new ReadOperands() { OperandType = OperandTypes.MI, StartAddress = 100, NumberOfOperands = 1, }; plc.ReadWrite(ref rw); var startRowIndex = Convert.ToInt16(((rw[0] as ReadOperands).ResponseValues as object[])[0]); // Your code here... but instead of start putting data to row 0, start with row startRowIndex, for example: table.Rows(startRowIndex).Cells(2).Fields(0).Value = lblvoerbaknr.Text table.Rows(startRowIndex).Cells(0).Fields(0).Value = lblVoerzend.Text table.Rows(startRowIndex).Cells(1).Fields(0).Value = lblzendgewicht.Text // Now you increment startRowIndex by the number of rows you intend to write (in this example, only 1 row): startRowIndex++; // Now you write the table (You can also use Update, which will only update the cells that you have altered) table.Write() // or table.Update() // Now we need to update the value of MI100 in the PLC. rw[0] = new WriteOperands() { OperandType = OperandTypes.MI, StartAddress = 100, NumberOfOperands = 1, Values = new object[] { startRowIndex } }; plc.ReadWrite(ref rw);
×
×
  • Create New...