If everybody is transceiver equipped, use the "main" to poll each "remote" station.
Each remote station have their own "address" and they hold/wait to send their data 'till they're ask to do so.
Using this will save some possible collision.
If everybody is transceiver equipped, use the "main" to poll each "remote" station.
Each remote station have their own "address" and they hold/wait to send their data 'till they're ask to do so.
Using this will save some possible collision.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Since you have to count and transmit the total, I insist on using the tranceiver method. You can leave every of the 40 pic as Steve stated in a polling state and when the address is valid for each station, then this station report back. No collisions this way.
From the PC side you have to implement a way to address each one of the 40 pics in circle.
For example in a loop:
for i=0 to 39
send address i
gosub receive from station i
next i
Ioannis
If you have to update whenever any machine changes state, polling will not work since a machine may change state more than once between polls, especially if you have 40 machines to poll. Nor will just letting each machine transmit as it changes, as you are sure to have collisions and lost data. And, a loop which polls each of 40 machines will violate every European regulation on how often any one transmitter can transmit. OTOH, if you can accumulate counts locally and transmit the total periodically, polling or independent transmission will work. An occasional collision can will not matter as an accurate count can be sent with the next transmission. It all depends on how frequently each count changes and whether you need to have each change registered immediately. If you can live with independent transmitters, you can use much cheaper hardware. What distances are involved? As this sounds like a factory floor, my guess is it's not very RF friendly with lots of metal surfaces and maybe lots of interference. I'd look at a wired RS-485 network.
Yes Dave. You are right about regulations but we lack of some specs by Pedro Pinto, so only guesses we can make.
Absolutely agree for the 485 solutions. Rock solid communications.
Ioannis
Bookmarks