Giter Site home page Giter Site logo

Comments (5)

unref-ptr avatar unref-ptr commented on September 17, 2024

What might be the reason why the device is not switched to operate?

My guess is that something else due to your hardware (ATmega2560 or MAX22513) could be the issue.

Does the protocol stack of the iolink master switch the device state in other ways?

To change the state the IO-Link Master sends a master command, please refer to Table B.2 of the specification (v1.1.2)

If you have a logic analyzer you can capture TX,RX, and Wakeup pin to try to debug the communication.

from lwiolink.

jiang-qihang avatar jiang-qihang commented on September 17, 2024

thank you for your reply,
I have already solved part of the previous problem
I used an oscilloscope to check the mega2560 and max22513, and the serial data can be sent and received normally. There may be no problem with the hardware.
I have checked that the slave is receiving the correct wakeup sequence and the corresponding command

Problem 1 (partially resolved): Unable to switch to preop and op mode
Reason: I put too many printfs for checking, making the program slow

After deleting the printf check, the program can switch to the pre-op state under the communication of the master station, but the master station program reports an error, indicating that some responses from ISDU are needed
Errors like:

  • iolink dl isdu h sm isdu wait3: ISDUWait. No service!
  • (ERROR] AL: ISDU read cnf: Got unexpected qualifier 0x06

Now the problem seems to be related to ISDU, which is currently an undeveloped feature. It seems that the IO-Link communication cannot enter the periodic communication mode.
If I just want to transfer 1-3 bytes of process data (PDin) to the master, no other complex functions involved, is this possible?

Can the slave station without ISDU function communicate with the master station normally?

from lwiolink.

unref-ptr avatar unref-ptr commented on September 17, 2024

About your first problem, as mentioned in the readme the library works in polling mode (due to Arduino´s limited API). For this reason you should not call any blocking functions in the loop as it can interfer with the IO-Link communication deadlines (see Figure A.15 symbol TA spec v1.1.3).

Is your scope capable of decoding Serial communication ? That would help to check the complete communication, if not you can plug a logic analyzer in the TTL logic level pins of the Arduino (TX,RX).

This library bypasses ISDU by indicating that ISDU is not supported in the MSEQ capability parameter (see spec Annex B.1.4)

static bool constexpr ISDUSupported = false;

return PreopCode << 4 | OpCode << 1 | static_cast<uint8_t> (ISDUSupported);

from lwiolink.

unref-ptr avatar unref-ptr commented on September 17, 2024

You also have to be sure that the port which is connected on the IO-Link master has Identification checked disabled.

See Table E.3 – PortConfigList (spec v1.1.3) , element name Validation&Backup.

This is manufacturer specific so please check your IO-Link Master instruction manual on how to disable port check.

from lwiolink.

unref-ptr avatar unref-ptr commented on September 17, 2024

Will close the issue, feel free to open it if you have any updates.

from lwiolink.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.