Skip to content

some issue #1

Description

@feecat

We wanted to do a replacement for an old profibus DP device and I found this repository which is easy transformer to ESP-IDF or PicoSDK. It does what I need successfully, Thanks a lot! I encountered two issues in use, as follows:

1, Line 689 need replace to profibus_send_CMD(SD2, DATA_LOW, 0, &uart_buffer[7], Output_Data_Size); // send data

#if (OUTPUT_DATA_SIZE > 0)
if (diagnose_status == true)
profibus_send_CMD(SD2, DIAGNOSE, 0, &uart_buffer[7], 0); // Request a diagnosis
else
profibus_send_CMD(SD2, DATA_LOW, 0, &uart_buffer[7], Input_Data_size); // send data

2, Here just accept function code = 0x5D or 0x7D, but 0x6D also is a good function code.
According https://www.felser.ch/profibus-manual/funktionscode.html, 0x6D is first frame with FCV. For our application, we don't have to strictly follow the protocol, we just need to add 0x6D to the if then it works well.

else if (function_code == (REQUEST_ + FCV_ + SRD_HIGH) ||
function_code == (REQUEST_ + FCV_ + FCB_ + SRD_HIGH))
{

cheers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions