Jump to content

Izhar

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Izhar's Achievements

Member

Member (2/4)

0

Reputation

  1. Hi, The Stop-Mode works for the data writing, I simply added "plc.Stop();" whenever I attempt to write something to the PLC. The problem is that when I run the debugger again, the updated cell returns to the original value, so that's not very useful. What can I do to actually keep the new data in the PLC dataTable? Another issue I have is with saving table rows as strings. When I access a table, I run through the columns in each row and try to save the values as one string separated by commas. I keep getting stuck with returning the string. could you please write a few lines of code to do that? Thanks in advance, Izhar
  2. Hi, I put the PLC in stop mode and the code works fine now. What exactly does that mean? when the PLC is in stop mode, is the ladder code neutralized? Thanks, Happy Purim, Izhar
  3. Hello Saragani, I had no more space left for uploads so I deleted my previous uploads. I hope that's OK. I tried the new dll's you sent me and sadly they did not work. After you brought up the vlp issue I decided it might be a good idea to download the program to the PLC once again (From the Visilogic program). What I got was an error (attached screen). I added the code also. Thank you, Izhar my_main_1_19.vlp
  4. Hi, Here is the original code I have been working on (downloaded from this forum) http://ftp.unitronic...L%201.0.0.4.zip Actions I had taken so the code would run: 1. convert the project to be compatible with Visual Studio 2010 2. Change project to be .NET Framework 4 (otherwise it doesn't work) 3. Change UnitID of the Form1 file to be 11 (my UnitID), in both read structure and read structure and values commands. 4. F5 5. Press on "Read Structures & Values from PLC" (the data appears in the grid) 6. double click an arbitrary value (the update popup appears) 7. Change the value -> OK 8. update changes / write tables to PLC 9. read range The updated changes do not appear no matter what... Thanks in advance, Izhar
  5. Hi, What I did before attempting to write my own code, was play around with the code I downloaded from this forum (Unitronics Data Tables) That's the code I added in the previous response, just as a reference. Bottom line, when I change some arbitrary data in the EditCell screen, I can save the changed table to a file, see it changed in the UI etc. Even when I try to update it to the PLC, the compiler goes through the process OK. How can I see whether I'm actually changing anything or just saving data to the UI? Thanks, Izhar
  6. Hello again, I continued writing my program, using "Unitronics Data Tables" as a guideline. I came to the part where I wanted to update an existing cell in my PLC. I tried both the "update" function and the "write" function, from the original Unitronics program but for some reason, the function finishes it's run successfully but the data is not updated when I try to "read" it afterwards - what I get is the unchanged data from before the writing attempt. I added the original code for a general write: private void WriteTable_Click(object sender, EventArgs e) { try { dataTables.Tables[listTables.Text].Write(); reloadCellsData(dataTables.Tables[listTables.Text]); } catch (Exception ex) { MessageBox.Show(ex.Message); } } What am I doing wrong? Thanks in advance, Izhar
  7. Hi, I was finally able to solve the problem. Turns out it wasn't connected to the dll at all. The problem was a bug with the resgen.exe file for windows 7 x64 OS. I "solved" it by changing my program to .NET 4. Other solutions may be found in http://social.msdn.microsoft.com/Forums/en/msbuild/thread/e5900710-9849-4d10-aa28-48b734d06bf2 Thanks again for all your help Saragani, Izhar
  8. Hi Saragani, When I open the Unitronics.ComDriver.dll it shows that it's compiled as 32 bit but I can't figure out how to build it as an "any CPU" type. My program is indeed compiled as "any CPU". I also added the error I get when trying to build what I had written so far and the screen-shot with the error description in the bottom. Thanks again for all your help, Izhar
  9. Hi again, The code now recognizes the plc (after playing with the plc declaration in the beginning. Now my problem is that the project doesn't build, because the program can't find the output file. I checked that the path and assembly names are correct (clearly they are correct, they had been defined by automatically), but it gives an error saying it doesn't exist... Thanks again for your help, Izhar
  10. Hi, Thanks for the quick response. I'm using a 64 bit windows 7 OS. After playing around with the example I got it to work (I have no idea how...) Today I'm trying to write my own project using the example. I created a project (.NET Framework 3.5) and a simple form which attempts to connect to the PLC. I added the Unitronics dll to the solution explorer -> References -> Browse -> Relevant library and file. and when I tried to use the plc class, the compiler didn't recognize it. I assume the problem is with the adding of the dll. what can I do? Thanks in advance, Izhar
  11. Hi, I'm trying to access a Vision 230 PLC using "Reading MIs using Serial Port - C# Example" I am using Visual Studio 2010 Ultimate" which asked me to update the files when I first opened them, and returned a successful message. However, when trying to run the example I get the following error when attempting to "Connect to PLC" via the form. (Attached). You should also know that I'm quite new to C#. Can you help? Thanks in advance, Izhar
×
×
  • Create New...