Ho acquistato una CPU SlimLine MPS050A320 sulla cui porta RS485 vorrei implementare la comunicazione con alcuni fancoil (scheda MBS7) della Ditta Condaria. Il protocollo è descritto dalla Ditta nel seguente modo:
3 wire RS485 (A as the non inverting wire, B as the inverting wire, S as GND), fixed baud rate 19.2 kbps, 1 stop bit, no parity, half duplex, max. 63 fancoils . Please make sure that the computer ( or PLC ) RS485 driver provides the necessary pullup and pulldown resistors, 680 ohms between B wire and GND, 680 ohms between A wire and +5V.
Per cui la prima domanda è se la CPU in questione ha implementate, sulla porta RS485, le resistenze di pullup e pulldown necessarie (molti PLC, quando la porta seriale viene impostata in modalità carattere escludono tali resistenze). L’operazione di lettura dovrebbe avvenire secondo le seguenti modalità:
READ TRANSACTION : any register can be read out by PC by sending the following byte stream FEH, TERMINAL ADDRESS, REGISTER ADDRESS, Bit 7 of Register Address must be 1 so that MBS7 knows that this is a read transaction. Upon receiving this sequence the interrogated MBS7 responds with the value contained in the selected register. Answer is loaded onto the field bus 10 msec after the end of the interrogating sequence.
PC software designer must ensure that the bus is released before this delay is over, otherwise a bus collision will result. After sending the register value the interrogated fancoil releases the bus after another 10 msec, so that the PC must wait at least that amount of time, before initiating another bus transaction. I registri a cui sono interessato sono i seguenti:
STATUS register, address 04H
ROOM TEMPERATURE register, address 05H
TEMPERATURE SET POINT register, address 06H
MFAN SPEED register, address 07H