Hi,
I'm communicating with a generator controller via Modbus, and not sure how best to write the time to it.
The generator is expecting the following:
MSB1 =BCD(hour)
LSB1 = BCD(minute)
MSB2 =BCD(second)
LSB2 = 0
If I convert the RTC values to BCD, how would I go about concatenating them and sending it as a single 16 bit Integer via a write MSG instruction?
Thanks
I'm communicating with a generator controller via Modbus, and not sure how best to write the time to it.
The generator is expecting the following:
MSB1 =BCD(hour)
LSB1 = BCD(minute)
MSB2 =BCD(second)
LSB2 = 0
If I convert the RTC values to BCD, how would I go about concatenating them and sending it as a single 16 bit Integer via a write MSG instruction?
Thanks