Zuviel Werbung? - > Hier kostenlos beim SPS-Forum registrieren

Ergebnis 1 bis 5 von 5

Thema: Libnodave, S7-222, Linux, Hilfe?

  1. #1
    Registriert seit
    31.10.2008
    Beiträge
    3
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    I'm having no luck.

    I have compiled the libnodave programs with no error.

    ./testPPI /dev/ttyS0 gives the following:
    timeout in _daveExchangePPI!

    My cable is 6ES7 901-3CB30-0XA0.
    I have tried all switch settings.

    This cable does work with S7-222 to program, in Windows.

    My serial port does work.
    Linux is PuppyLinux 4.0

    Can you give me some clues?
    Zitieren Zitieren Libnodave, S7-222, Linux, Hilfe?  

  2. #2
    Registriert seit
    22.06.2003
    Beiträge
    242
    Danke
    9
    Erhielt 19 Danke für 19 Beiträge

    Standard

    Hello
    after reading your question I've just tried it with the 3CB30 cable - for the first time with libnodave and this cable too.
    Seems to be working
    linux:~ # cd /
    linux:/ # cd libno*
    linux:/libno42_PCTest # make
    cc -O0 -Wall -Winline -DLINUX -c -o testPPI.o testPPI.c
    gcc nodaveCommon.o setport.o nodavePPI.o testPPI.o -o testPPI
    linux:/libno42_PCTest # ./testPPI
    Usage: testPPI [-d] [-w] serial port.
    -w will try to write to Flag words. It will overwrite FB0 to FB15 (MB0 to MB15) !
    -d will produce a lot of debug messages.
    -b will run benchmarks. Specify -b and -w to run write benchmarks.
    -l will run a test to determine maximum length of a block in read.
    -m will run a test for multiple variable reads.
    Example: testPPI -w /dev/ttyS0
    linux:/libno42_PCTest # ./testPPI -d /dev/ttyS1
    Trying to read 64 bytes (32 words) from data block 1.
    This is V memory of the 200.
    Press return to continue.
    PDU header: 32,01,00,00,00,00,00,0E,00,00,
    plen: 14 dlen: 0
    Parameter: 04,01,12,0A,10,02,00,40,00,01,84,00,00,00,
    I send: 68,1B,1B,68,
    send 29
    .............
    For compiling in PC I just took an older version of libnodave (V4.2 ...) which doesn't any matter.
    There are two points which have to be in the testPPI.c and switched to the PLC similar.
    dc =daveNewConnection(di,2,0,0); // insert your PPI address (2) here
    1.) You have to choose really that adress which is given to your PLC - in this case by me No.2
    fds.rfd=setPort(argv[adrPos],"19200",'E');
    2.) The choosen baudrate must be same like switched in your PLC.
    In the newer versions the source looks a little bit other, but in usage you will find the help and must look in the source for the points were you have to fix the code in these both points.
    regards

  3. #3
    jestal ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    31.10.2008
    Beiträge
    3
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard

    Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!

    it's working.
    And all the cable switches are OFF.


    Now, then next thing is to try a generic RS232/RS485 adapter.


    Jeff.

  4. #4
    Registriert seit
    22.06.2003
    Beiträge
    242
    Danke
    9
    Erhielt 19 Danke für 19 Beiträge

    Standard

    Hi
    Now, then next thing is to try a generic RS232/RS485 adapter

    until 19.200Bd works every RS232 --- RS485 with automatic data direction control (ADDC) and right connect of line 'A and B' (Pin 8 & 3);

    for 187,5kB there normally works nothing - without one exception to try setting in Linux the UART to a Baudrate nearly this 187,5kB (230.000 and a little smaler clock ...).
    Therefore has been my way to reach the 187,5 kB taking an extern/optional UART (PCI) or µC (AVR) and choose the divide by 3,68xxx MHZ for 230.000Bd, but clocking it by only 3,00MHZ. Thats works well .
    But in 187,5kB there is a little difficult to find an isolated ADDC-Adapter which can transform the speed, the most of them 'hangs up' there functions a few clocks over 19.200Bd.
    In 187,5 you need very good quality or short length of the cables (I took there the Profibus cables) otherwise the communication is disturb.


    When I built it for myself in 187,5kB in isolated 'design' there didn't work any Optocouplers which I'd tried too. Only the ISO722 or aquivalents transmitted the dates - but then until real higher speeds up to > 12MB.

  5. #5
    jestal ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    31.10.2008
    Beiträge
    3
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    thanks,

    I don't need 187k.
    so, if 19.200 works for me, than that is enough.

    thanks, again.

Ähnliche Themen

  1. libnodave - linux
    Von waschtl im Forum Hochsprachen - OPC
    Antworten: 5
    Letzter Beitrag: 15.12.2010, 17:12
  2. LibNodave 64bit write error on Linux
    Von 3electrons im Forum Hochsprachen - OPC
    Antworten: 3
    Letzter Beitrag: 23.04.2010, 19:42
  3. Nur TCP/IP bei Libnodave und Ubuntu Linux
    Von Alexandr im Forum Simatic
    Antworten: 6
    Letzter Beitrag: 28.01.2010, 22:06
  4. Hilfe zu Libnodave
    Von SPS_Hannes im Forum Simatic
    Antworten: 7
    Letzter Beitrag: 09.11.2007, 17:07
  5. Brauche Hilfe mit Libnodave
    Von Snoopy123123 im Forum Simatic
    Antworten: 13
    Letzter Beitrag: 19.10.2007, 11:29

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •