Multiple BS2's to a Pink
![skylight](https://forums.parallax.com/uploads/userpics/803/nTO3A3VZ5KPW6.png)
Hi,
I'm considering connecting multiple BS2's to a Pink Module the Stamps will only be communicating to the Pink and not between themselves, basically the Pink will store up to it's 100 variable limit values and these values will be read by the stamps in a parallel configuration(hope this is ok?) and each stamp will control it's output pins according to it's particular assigned variable's value.
The stamps will also update a webpage on the Pink showing their current status (Aux contacts on a contactor, in or out)
Two questions:
If one stamp is updated from the pink at a time and then updates the pink as to it's status, could they be paralleled up to the pink·using 2·bus rails for data?
If so is there a limit to how many paralleled stamps can be hooked up to a pink?
Regards
I'm considering connecting multiple BS2's to a Pink Module the Stamps will only be communicating to the Pink and not between themselves, basically the Pink will store up to it's 100 variable limit values and these values will be read by the stamps in a parallel configuration(hope this is ok?) and each stamp will control it's output pins according to it's particular assigned variable's value.
The stamps will also update a webpage on the Pink showing their current status (Aux contacts on a contactor, in or out)
Two questions:
If one stamp is updated from the pink at a time and then updates the pink as to it's status, could they be paralleled up to the pink·using 2·bus rails for data?
If so is there a limit to how many paralleled stamps can be hooked up to a pink?
Regards
Comments
If you want to connect a lot of Stamps this way, you probably will need to use RS422 signalling and buffers. This would allow multiple transmitters and receivers on a set of lines (one pair to the PINK and the other pair from the PINK). You'd need 3 pins on the Stamps, one from the PINK, one to the PINK or to listen from the other Stamps, and one to change from sending to listening. You could certainly have 10 Stamps, possibly more.
I went down the road of thinking that a basic stamp would listen for it's particular variable, such as stamp 14 contains the line if nb_var 14=1 then close contactor and update a variable to show it's closed .
As long as they are just listening, I thought that comms back from the stamps would only occur individually as and when a particular stamp was updated.
in other words the !NB0WXX[noparse]:D[/noparse]D and !NB0RXX statements would control this? Of course in order for a particular stamp to see it's callup they would all have to be constantly polling the pink.
Thanks for highlighting this overlook on my part.
My only option then will have to be many pinks each with their individual stamps (was trying to cut costs a bit and also as only a few variables would be used on each pink it seemed a bit of overkill to have several pinks rather than one pink used to it's limits although I will think of ideas in the future for using up the remaining variables i'm sure).
The project is control of Lighting Bars and their output configurations in some new television studios we are having built at work.
Regards
You really need just one PINK because it will be impractical to try to control several different PINKs, each with their own web address and separate control page. As I suggested, each Stamp can either send to the PINK and the other Stamps on a party line or listen to the party line or listen to the PINK. Each Stamp listens for the "!NB0Rxx" message on the party line for the variable one less than its own. It can ignore the response from the PINK on the other line, then it listens for the "!NB0Wxx:dd/CLS" message on the party line for that same variable #. It pauses briefly, then sends its own "!NB0Rxx" command and listens on the response line from the PINK for its value, then sends the appropriate "!NB0Wxx:dd/CLS" command on the party line. Once the next Stamp sees this, it will pause and ask for its own variable and so on. There would be a timeout and a "fault" LED on each board that would be turned on if the Stamp timed out so that you would have some idea of where the problem might be. This way, there are no "master"s and the system is pretty open ended. The first "master" would have to be different since its own number is zero, but it has to listen for a non-zero (the last) "master" to finish.
Thanks again for your reply, Have been trying to get my head around the code that would be needed for a stamp to see the previous stamps
!NB0Wxx:dd/CLS command, though i have come up with maybe something similar?
the previous stamp would read it's value from the pink, send it's response·and then set a pin high that could be the signal for the next stamp to read it's value etc the stamps·pin out·would i believe be like a DTR line and this line would cascade in and out of each consecutive stamp so that the data sequence would occur on the two data lines· the interconnecting would then·be three wire as opposed to two.
The stamps would be in an enclosure close to each other so interlinking is not a problem, the only question then is one of loading on the pink,at work we use DMX systems that have physical limits of 32 devices on a serial line, would you know the physical limit of stamps connected to a single pink?
Regards
Post Edited (skylight) : 4/14/2007 12:31:00 AM GMT
Thanks for the reply, Yes i will put the resistors in and the termination resistors on the last stamp (see updated attachment) The usual way to terminate DMX data lines is a 2200 ohm resistor across the Data+ and Data-(RS 485)·lines as opposed to this configuration.
·Only thing that worries me is the value of 2200· and 3300ohms on 5v data lines as the value is the same one used on DMX lines which are RS485·Spec (12v?) should the termination·resistors in the stamp circuit·be of a·greater value in order not to drag the data line signal down?
Post Edited (skylight) : 4/14/2007 5:08:38 PM GMT
Regards