Join node overwrite data

The CAN BUS sends data with similar ID. I know that I will receive 29 msgs every 1 minute. I used the Join ID as shown in the picture to join the first 29 msgs in an array. So I can assort them depending on their ID # in the function node.
For some reason, the data will be overwritten and won't receive the expected order. I added a reset topic after the 29 msgs are received to reset the join node, but it didn't solve it.

The inject node solve it when I manually click it and next batch arrives correctly but connecting the reset node to the front of join node didn't solve it. What I am doing wrong?

In array mode, the items are joined in the order they arrive.

To ensure order is correct, change to key/value mode (ensure each value has a unique topic)

If I have unique key/value, I wouldn't use the join node. I am using it to give unique ID to the 29 coming data streams. The only way is to clear reset the join node after it receives a batch of data

Are you certain there is nothing in the msg of these 29 items that differentiates them?

All you need to absolutely ensure the items after the join node are always in the correct order is to generate a topic for the msg before it enters the join node then use the key/value mode.

Use a debug node with show complete msg set to inspect the full message properties (not just payload)

yes, because CAN BUS send a request followed by another request, sometimes the second request doesn't go through and will only send one msg instead of 29. Maybe that is the reason that when it happens like few times in the day it keep moving the array and will miss one every time.

That's why I added a reset switch node after the join to reset it after it send a packet. It doesn't work unless I inject it by myself.

I think I will the reset with a delay of 50 ms once a msg is sent. I think that will solve that overwrite issue

That solved the issue. Adding a reset with a delay before the Join Node

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.