Page 1 of 1

Change the data value of a specific LINID

Posted: Thu 5. Sep 2024, 11:07
by iso32
Hello!!
Last time I asked about slave publishing. Thank you so much for your answer. However, I have a problem and would like to ask you again.
When changing the data in the subscriber frame in the slave, LIN_UpdateByteArray enabled the data frame to be changed.
However, if I change the data in the subscriber frame using UpdateByteArray when there is already a slave response, the data value I want to change will not be published, and the data value of the slave that is already responding will change to a completely different value.
In particular, this happens frequently in the first byte of the data (the rest of the bytes were able to change their data frames normally)

[For example]
(Two channels are being used.)

Code: Select all

- LIN data currently being collected
LIN ID: 0x00
LIN Data: 0x01ff

- Bytes of data I want to change
LIN ID: 0x00
(update) LIN data: 0x09ff
mode: slave
direction: publisher

- If I change the data frame by running the code
LIN ID: 0x00
(change value) LIN data: 0x08ff
Error: OtherResponse
I used RegisterClient, ConnectClient, Initialize Hardware, SetFrameEntry, GetFrameEntry, and UpdateByteArray sequentially.

Code: Select all

TLINFrameEntry.FrameId = 0x00
TLINFrameEntry.Length = 2
TLINFrameEntry.Direction = TLIN_DIRECTION_PUBLISHER
TLINFrameEntry.ChecksumType = TLIN_CHECKSUMTYPE_ENHANCED
TLINFrameEntry.Flags = FRAME_FLAG_RESPONSE_ENABLE
Is that a collision or is it a misconfiguration?

Please help me.

Thank you.

Re: Change the data value of a specific LINID

Posted: Thu 5. Sep 2024, 12:29
by M.Heidemann
Hello,

how does "UpdateByteArray" look in your case and what's the reponse?

BR

Marvin

Re: Change the data value of a specific LINID

Posted: Thu 5. Sep 2024, 12:56
by iso32
I'm sorry. I didn't understand what you were asking for.

The code I'm writing is...

Code: Select all

#UpdateByteArray
data = (c_ubyte *8)(0x09, 0xFF)
update = LIN.UpdateByteArray(hClient, hHw, 0x00, 0, 2, data)
if update != TLIN_ERROR_OK: print("Failed to UpdateFrameEntry!)
else: print("Update Success")
And the response when I sent it is 0x08FF, 0x01FF, 0x00FF.
ID | Length | Data | Period | Count | Direction | CST | Checksum | Errors

00h 2 08 FF 180 43785 Publisher Enhanced 02h Timeout, OtherResponse
00h 2 01 FF 140 43783 Publisher Enhanced 01h Timeout
00h 2 00 FF 140 43780 Publisher Enhanced 7Fh OtherResponse

Is this information you requested?

Re: Change the data value of a specific LINID

Posted: Thu 5. Sep 2024, 15:43
by M.Heidemann
Hello,

Do you send messages manually or do you have a scheduler running?

BR

Marvin

Re: Change the data value of a specific LINID

Posted: Fri 6. Sep 2024, 09:00
by iso32
Hello

I did send messages manually.

Re: Change the data value of a specific LINID

Posted: Fri 6. Sep 2024, 09:04
by M.Heidemann
Hello,

can you please tell us, what exactly you want to do?

I would expect a scheduler being involved.

Are you working with a specific node?

Please let us know.

BR

Marv