Jump to content

Saragani

Administrators
  • Posts

    1,194
  • Joined

  • Last visited

  • Days Won

    116

Everything posted by Saragani

  1. You need to give the address in decimal (meaning 28672), but the Memory Float operands in Visilogic/ V1040 are MF0 to MF63 (there isn't any MF7000), So you need to give it a number from 0 to 63. I think that the 7000 hex address that you are talking about it for ModBUS.
  2. ur2 and urc files are completely different. urc files are used for fonts and images cache on the Color PLCs (used both by Remote Access and Remote Operator), while ur2 is the file type used by Remote Operator in order to save its configuration (PLCs with their communication settings). In order to import a urc file in Remote Operator, go to the where you found the button that creates the urc file from the PLC. There you also have an option to import a file from your computer. Once a file was imported, it will be used again (so you don't need to import it every time) and it will be used for other PLCs that has exactly the same Fonts and Images.
  3. http://www.unitronics.com/Data/Uploads/communication/Unitronics_Communication_Driver_for_Dot_Net.pdf A ReadWrite request can read/write operands, Data Tables, and more. Basically, when writing or reading the opearand, the start address represents the start address of the first operand you want to read/write. This address is off course in decimal (The StartAddress is an ushort so it can only contain numbers). If you set the number of operands to be for example 5, then in your example, you will read the values of MF 7000 to 7004
  4. If you have the original project (vlp) then you can open it with visilogic and create a URC file from there. Other than that, it seems like some corrupted image or image data in the PLC is preventing the creation of the image cache.
  5. That's because you have a 3 values array and only the first one has a value (while the other 2 are Null, ergo Null Reference exception), and you are also writing only 1 value so no need to 3 values array. instead of: Dim values As Object() = New Object(2) {} have it: Dim values As Object() = New Object(0) {}
  6. If the UDC was constructed with the upload file inside then yes. If not, it only contains a list of instructions of what to download without any way of reconstructing the vlp
  7. Send string accepts string and Unit ID, therefore you need to give it a string, meaning: (assuming the PLC is connected to your PLC with no CANBus in the middle, then the Unit ID is 0) plc.SendString("SD0000011", 0) Off course plc.SendString(SD0000011) will not work, because it is missing the Unit ID, and also because SD0000011 is not surrounded with ", then the compiler thinks it is a variable or a class and not a string. plc.SendString(SD, 0, 1, 1) will not work either because again, the number of arguments is wrong, and in this case SD is a type of a class (the SD class is used for reading and writing files from the SD Card of the PLC, it if has one)
  8. Forced Params under the Unitronics.ComDriver (I belive that you are talking about the .Net communication driver, not the ActiveX driver) is not for forcing an input (But for forcing some comunication parameters). Forcing an Input or an Output is possible with the ActiveX DLL, but unfortunatelly, it is not supported out of the box in the .Net communication driver. You can try using Plc.SendString where the string is in the format of (As explained in the PCOM: http://www.unitronics.com/Data/Uploads/communication/Unitronics%20PCOM%20Protocol.pdf) : <CC><ADDRESS><LENGTH><VALUES> There CC is the Command Code (SE for Force Output, SD for force Input Address (4 characters) is the address of the output in HEX Length is the number of bits to write (2 characters, Number is in Hex) Values is the values (Also in HEX, but for bits 0 and 1 remain the same) For example, force input 32 to value 1: SD0020011 I have not tested the string, but I think it should work.
  9. Dear Fre_ZZe, Ok, your code has a small bug. Instead of sending the number of rows to write, you send the number of bytes to write in row. Therefore, you request to write 2 bytes * 2 rows, but supply only 2 bytes. Your code is: rw(0) = New WriteDataTables(StartAddress, NumberOfBytesToWriteInRow, NumberOfBytesToWriteInRow, RowSizeInBytes, ValueList) while it should have been: rw(0) = New WriteDataTables(StartAddress, NumberOfBytesToWriteInRow, NumberOfRowsToWrite, RowSizeInBytes, ValueList) On the other hand, why working so hard and failing with such bugs. Why converting the integer value into 2 bytes? What would he do with strings and floats? Why not knowing the structure of the Data Tables and guessing its address? I can suggest you to use our Unitronics.DataTables.dll, which makes things much easier. You can read the structure and values of the data tables from the PLC, and also read and write specific cells. http://www.unitronics.com/Data/Uploads/Dot_NET/Unitronics%20Data%20Table.rar The rar file contains both DLL and example. The DLL uses the communication driver, but does all the hard work for you.
  10. Ok, I'm glad to hear that you solved the problem. Anyhow, I will forward this bug report to our support and to the the Visilogic R&D team so it will be handled in the future.
  11. Turn off the PLC, touch the screen, and then power it on. You should see a countdown that says that if you touch it once then it will stay in OS stop mode. You should be able to download an empty project while in OS stop mode.
  12. Please either attach the vlp here, or contact the support through email with the vlp attached. The R&D can easily find the problem. Please also provide information about the version of Visilogic you are using.
  13. Flex727, it is not related to the deepness of the nesting, but actually to the length of the path. In windows, the path to the file must not exceed the 260 bytes.
  14. http://www.unitronics.com/Data/Uploads/communication/Unitronics_Communication_Driver_for_Dot_Net.pdf The following link also has the examples (but compiled with an old version of the dll): http://www.unitronics.com/Data/Uploads/Dot_NET/Unitronics%20Communication%20Driver.rar
  15. Is it Windows 8/ Windows 8 Pro or Windows 8 RT? It should work on Windows 8 (or Windows 8 Pro), but it might fail because of administration rights (So you might wanna disable UAC notifications and run Remote Operator as Administrator... Please note that on Windows 8, even though you disable the UAC and you are an Administrator, some programs will not run correctly if you don't run it as Administrator)
  16. Since the .Net driver and the Communication Driver are compiled for x86 (it is required for the logger of the communication driver, since it uses Access which is only supported in x86), you need to also compile your program as x86.
  17. Ok, 1st note on the vlp you have attached - The Socket is initialized as Slave while it should be Master. The 2nd note would be removing the timer, or at least increasing the interval. The PC should be able to get a connection in less than 5 seconds (on LAN it should be very fast), but those timers (and events because of disconnection) can make your debug harder.
  18. Are you familiar with the plc.ReadWrite ? You can read or/and write values of Operands. You simply send an array of ReadWriteRequest to that function, which will ultimatly return you a the requests filled with what you have requested. What you do after that (Either showing it in a table, creating a Scada or whatever) is your own code. You want to show it in a table, that's fine. You can create an array of requests that the first one will read 100 MIs, the second will read 100 MBs, and the 3rd 100 SIs Iterate the indexes from 0 to 99 (le'ts call it J), and then inside it, iterate the requests inside the array. Each Read request has a property called Values. If you get the Value at index J then you get the value of the current "Row" on your table.
  19. Hi, Chris Graf mentioned testing the Listener Example on our website. Can you please test and see if it works for you? Can you also test SD Card Explorer? This might give us some clues if the problem is maybe in the Listener itself other than your code.
  20. It's been a while since the last time I wrote a c# program that uses the Listener, but as it seems, I don't see anything wrong. What PLC model is trying to connect with the program? What is the ComDriver version? What Windows version you are running, and do you have full Administrator rights? What kind of connection are you having? (Direct Ethernet connection, or using Switch, or Hub, or maybe over the Internet) If might also be useful to turn the Logger on (and using the LogViewer I might be able to see what the problem is). We will leave that as a last resort.
  21. No, because the RemoteOperator.exe.config doesn't have much of a config There is the EnableLogger which is for communication debugging (Requires the ComDriver log viewer in order to open the logs). The other options doesn't do anything... (because the actual settings are saved under the User profile)
  22. Hi, I have checked and autorun from command line is not supported. However, I have added a support for it, and you will have it in version 1.0.36 Usage: /o="C:\Some Folder\Another one\My test.ur2" /autorun=true
  23. The RDP/VNC mode and Autotun is not inside the ur2, but in a config file saved in program data folder. I'll loot at the code on sunday and give you a more detailed answer
  24. Ok, now that I look at the documentations, I can help you a little better. Q: "//I still don't underastand what [0] and [1] are for... " A: The first 2 bytes are message ID, meaning that when you send a message to the PLC with a message ID 1, then the PLC will reply back with the same ID in the TCP header. It is suggested to change the message id for each message you send. See documentation: http://www.unitronic...OM Protocol.pdf (Pages 27 and 28) I see that the string of the message that you are using was taken from the documentation... However, the first problem I see is that your ETX is \n while it should be \r (This might be the main reason why the PLC doesn't respond). Also, make sure that the Network ID of the PLC is indeed 1...
  25. Make sure that getBytes returns you the right bytes (meaning, not from unicode, but ascii, and that you have exactly the amount of bytes you expect). The next thing I would check is that the message structure is correct: * Make sure that the Network ID of the PLC is indeed 1 * Make sure that you are not missing any character in the message * Make sure that the checksum is correct You can also connect to the PLC using Serial Port, and then send the string message (without the tcp header) and see that you get response.
×
×
  • Create New...