This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to read device ID?

Hi

I'm using PLC-TMDSPLCKIT V3.

I want to know how to read this device ID?

I found in the PRIME Host Message Protocol Specification it talks about product id.

So can I read the ID number?

And is the ID number are the same or not with same device?

Cause I want to use ID number to let device to recognize which device I'm connecting right now.

It is similar to the PC's IP number.

Could someone help me?

Any suggestion or information would be appreciated

Thanks,

Wayne

  • Hi everyone

    I try to write some code to read the PLC's product id.

    I refer to PRIME Host Message Protocol Specification this datasheet.

    In p.59, it talks about GET_INFO(Meaage Type 0x14), and I want to get the information inside of it.

    And in p.69, I try to write the code.

    MSG_TYP = 0x14;   //GET_INFO

    MSG_ORG = '1';    //originated from PLC

    MSG_RPY = '0';     //need reply message

    MSG_BDY = uint16_t blob_id;     // blob id to identify the blob

                          uint16_t blob_len;     // length in bytes of blob to read

                          uint16_t blob_addr;     //start address of the blob, only exist when blob_id=4

    I don't know what else I need to write in the code and my code is use it right or anything wrong.

    Any suggestion or information would be appreciated

    Thanks,

    Wayne