RS485 short reply
koozoo
Posts: 17
in AMX Hardware
Ni-x100 Serial device (RS485) can control very short time response ?
Remotemicrophone which I try to control require the very short time polling.
Every 60msec device send to amx the polling request, amx shuold repry in 6msec.
I tried following, but amx rs485 send the polling about 50msec after receiving request.
Limits of the amx device?
DATA_EVENT[RMC]
{
STRING:
{
IF (FIND_STRING(RMC_BUF,"$80,$3D",1))
{SEND_STRING RMC,"$70,$8F" //POLLING}
}
}
Using timeline ....
DEFINE_VARIABLE
lTL_Time[1] = {20}
DEFINE_EVENT
TIMELINE_EVENT [1]
{
SEND_STRING RMC,"$70,$8F" //POLLING}
}
DATA_EVENT[RMC]
{
STRING:
{
IF (FIND_STRING(RMC_BUF,"$80,$3D",1))
{TIMELINE_CREATE(1,lTL_Time,1,TIMELINE_ABSOLUTE,TIMELINE_REPEAT)}
}
}
Remotemicrophone which I try to control require the very short time polling.
Every 60msec device send to amx the polling request, amx shuold repry in 6msec.
I tried following, but amx rs485 send the polling about 50msec after receiving request.
Limits of the amx device?
DATA_EVENT[RMC]
{
STRING:
{
IF (FIND_STRING(RMC_BUF,"$80,$3D",1))
{SEND_STRING RMC,"$70,$8F" //POLLING}
}
}
Using timeline ....
DEFINE_VARIABLE
lTL_Time[1] = {20}
DEFINE_EVENT
TIMELINE_EVENT [1]
{
SEND_STRING RMC,"$70,$8F" //POLLING}
}
DATA_EVENT[RMC]
{
STRING:
{
IF (FIND_STRING(RMC_BUF,"$80,$3D",1))
{TIMELINE_CREATE(1,lTL_Time,1,TIMELINE_ABSOLUTE,TIMELINE_REPEAT)}
}
}
0
Comments
AMX reply between 3msec after receiving request from device.
Is it possible?
device amx
---
poling request
>----
| | |
| | 2msec |
| v |
| <
poling reply
|
| |
| 5msec v
|
|
|
v
60msec
--- ---next poling request
>----
| | |
| | 2msec |
| v |
| <
poling reply
|
| |
| 5msec v
|
|
I suggest playing with the device, see what works, then poll and send command at intervals that suit your needs and the device's capabilities.
It's not clear to me how the serial port on an AMX master handles the switch between idling receive mode and transmit mode. There doesn't appear to be much information in the manuals describing how it works. But, it seems reasonable to me that any attempt to transmit on an AMX serial port with RS485 enabled would require that the data be buffered until a delay following any data reception. In other words, it would seem probable to me that the port would not go into transmit mode until some time following the receipt of the last data, this delay being imposed in order to avoid data collisions.