Jump to content

Izhar

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Izhar

  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. I can't reproduce the download error you got, but try setting the timeout to a higher value.

    Furthermore, I do see that values that I write to the data tables disappear... but it is not a bug with the data tables DLL.

    Your Ladder code has "DT Write Row", "DT Clear Row", "DT Clear Col" etc...

    Your Ladder code keeps altering the data on the cells, so after you change it by the DataTables.DLL, it keeps getting back to the old value because of the ladder code.

    If you put your PLC in Stop-Mode then the .Net example should work fine.

    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

    post-1292-096783300 1300276530_thumb.jpg

  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, your code is right, either using Write or Update will update the content on the PLC.

    However, what about updating the cells values on the PC?

    You are using reloadCellsData to load the cells data into the UI (Probably a grid)... Are you sure that editing the UI makes the changes back to the cells in the Data Tables DLL?

    (Maybe you are just changing the UI?)

    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 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

  8. 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

  9. What OS are you working with on your PC?

    (Windows XP, Vista, 7?)

    Is it 32 Bit or 64 Bit?

    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

  10. 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...