Jump to content

Nexus

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Nexus's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Louis: I believe the examples will help me a lot! Also the state machine approach is very usable in this case. I also found the CRC threads and also these can help me further! Thank you for your spontaneous assistance! Kind regards, Nexus.
  2. Louis Manfredi: The communication protocol consists of two layers: - The datalink. The datalink handles exchanging of messages between the modules in the system. - The application layer. On application level the actual exchange of data takes place. To make this possible several commands are defined. To make it easy to connect a PC, the system uses a standard baudrate (19200 baud) and 8 bits per data byte. It is possible to use other baudrates. Datalink The protocol is a binary protocol. Each message starts with a DLE character, followed by a function byte. The function byte contains the message type and contains other information dependent on the message type. The following figure shows an example of a message type (Request) the datalink of the protocol uses. (Total 5 different messages are used). -------------------------------------------- | DLE | type | length | data | CRC | -------------------------------------------- type = bits 5 -7 destination address, bit 4 reserved (0), bits 0 - 3 type 0001 length = bits 5 - 7 source address, bit 4 reservedd (0), bits 0 - 3 message length minus 1 With a request a module can send data to or request data from another module. This module should respond on the request with a response message or with a status message if an error occurred. If there is no response within a time-out of 224 ms or an error is returned by the receiver of the request, the sender of the request sends a token to the next node. If it receives a token with its own address again, it sends the request again. This repeats until either a response message is received or the maximum number of retries is reached. If the number of retries is reached an error is returned to the application. I do have a flowchart of the datalink but this would be to much to use this here. Maybe you can give me a clue how to setup a VI which handles the datalink with a simple datalink protocol. Thank you. Nexus
  3. Hi, Does someone have an example how to setup a VI that is capable of handling data from/to the serial port using a "custom defined" communication protocol? I do have a specification on datalink level and want to convert into a VI. Thanks in advance. Nexus
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.