fins_ltt 0.0.2
fins_ltt: ^0.0.2 copied to clipboard
A lightweight Dart library that implements the Omron FINS UDP protocol for communicating with Omron PLCs.
import 'package:fins_ltt/fins_ltt.dart';
Future<void> main() async {
final plc = await FinsUdpClient.bind(
plcHost: '192.168.0.5',
network: 0,
pcNode: 191,
plcNode: 5,
);
try {
// Read DM words
final words = await plc.readWords(
area: FinsMemoryArea.dmWord,
start: 100,
count: 4,
);
print('DM words: $words');
// Read CIO bit
final bit = await plc.readBit(
area: FinsMemoryArea.cioBit,
start: 100,
bit: 5,
);
print('CIO bit: $bit');
} finally {
await plc.close();
}
}