More than 6 VPs?
Hi there,
Is there a way to implement more than 6 VPs? I have try to set MAX_NUM_VPS, but it's a RO property.
I'm looking for 9, and I would like to not buy 2 Javelin and link them, if possible.
Thanks,
JM
Is there a way to implement more than 6 VPs? I have try to set MAX_NUM_VPS, but it's a RO property.
I'm looking for 9, and I would like to not buy 2 Javelin and link them, if possible.
Thanks,
JM
Comments
However, you can declare more than 6 VP's. For example, you could declare 4 receive uarts
and 6 transmit uarts and a Timer, with only one transmit uart active at any time.
What VP's and how many would you like to use?
regards peter
I have 5 scales, one RC-4, one timer and one UART for sensors (would also like to have on display). All are using UART. The scales are measuring in loop, so they always need to be connected. Then an RC-4 command cylinders to remove what is on the scales on a regular base (timer). When the objects are removed, information are received from the sensors to know is they are really going where they have to.
So my first option was to add another Javelin with the 5 scales and one UART to send the retreived data to another Javelin, but I'm trying to see if there is another way to do it.
Another option is to use only one UART for all the scales, then load it on scale 1, read, unload it, load it on scale 2, read, unload it, and so on. But I'm not sure if this will be efficient and not add delays. The scales are working at 9800 bauds.
Thanks for all the hints you can provide.
JM
is not supported by the javelin.
Starting and stopping uarts does not impose large delays (especially if you consider the
low baudrate of 9600) so I would try that first. Also note that if your scales support
handshake signals, you can then even stop receive uarts. This is also true if
devices do not sent messages unsollicited (eg. they only respond to commands
sent by the javelin), in which case you can start/stop uarts in pairs (tx and rx)
which may even provide more flexibility.
Serial displays usually only require a transmit uart and you can stop that uart
anytime.
regards peter
Thanks for your replies.
I think I have to develop with another way. By removing and remounting the UART when I need to read the data, and so on.
That will be a challenge, but that will be nice [noparse];)[/noparse]
Thanks for the hints.
Regards,
JM
PS: You're right regarding the bauds.
like the CD4052. If your scales each require a tx and rx signal and the scales
only responds to commands, then using direct connections requires 10 I/O pins
for the 5 scales and you need 10 uarts. Utilizing·a CD4052 chip will multiplex
4 scales to one rx/tx pair and two select lines A/B (so this is 4 I/O lines) plus another
tx/rx pair (2 I/O lines) for a total of 6 I/O lines and only 4 uarts (2*tx + 2*rx).
If you·specify exactly what connections you require I can come up with some schematic.
regards peter
The scales are sending the weight automaticaly. No need to query it. So here is what I think I will do.
Connect the 5 scales to 5 pins.
Implement 2 UART.
Connect UART 1 to Scale 1, and UART 2 to scale 2.
Read weight from scale 1.
Remove UART from scale 1, activate UART for scale 3.
Read weight from scale 2.
Remove UART from scale 2, activate UART for scale 4.
Read weight from scale 3.
And so on. So each scale will be connectected to the UART few time before I need to read it, wich will give it the time to send a full message (22 characteres).
A cylinder will then remove the object from the scale and push it on a conveyor , but only one can be remove at a time, so that's fine if I can read only one scale at a time, as long as I can read them frequently.
Doing that, I will need only 5 pins, and 2 UART. I have estimate about 19ms to read the message, so if I think I will be able to read the 5 scales in less than 20ms, which mean cycle 5 times between the 5 scales in 1 second.
Again, your advices are welcome.
Regards,
JM