FAST_x10ms(9) { PullData(78, MotionSensor1, 7, 1); if(mInput(MotionSensor1) ==1) mInput(MotionSensor1) = 2; else if (mInput(MotionSensor1) == 0) mInput(MotionSensor1) = 4; Logic_T11(MotionSensor1);
Hi,
likely your problem is in the speed, RS485 has a very limited bandwitdh and pulling data at 10ms result in a lot of miss communication.
You have two options, the first is a FAST with PullData only at no less than a second, then another FAST with your logic.
As rule of thumb on AVR no more than 1 communication for each second.
Pub/sub time will depend on how often you execute your FASTs, the overall time is more or less the sum of all FAST involved in the communication. If you need faster performance go to esp8266 in wifi.
Regards,
Dario.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/6faa1f1b-79e5-4e69-9e2a-eab2cb520c07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Your nodes have a small buffer in RAM and low througput, you are flooding your network and you miss data.
Show your code.
Dario.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/cd8bec25-ec99-4751-988f-cb34cf18ee96%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/0c1e394c-e261-49ef-bf0f-bb35fd317012%40googlegroups.com.