Hi.
I installed PascalScada version 0.7.3 2014-03-12 on my Lazarus version 1.0.10.
My operating system is Lubuntu Linux.
I have a USB to RS485 converter connected to ABB energy meter DMTME.
I tested the electrical connection with a C program ad a Modbus library (libmodbus).
The serial port is configured with 9600 bps, 8 data bits, 1 stop bit, no parity.
I created a Lazarus project with "SerialPortDriver" and in the objected inspector I inserted the same parameters.
I inserted a "ModbusRtuDriver" and set the CommunicationPort property to "SerialPortDriver1".
I inserted three tags with the address 4096, 4097, 4098.
I cannot see data on the three tags.
I insert a breakpoint in the event "TForm1.SerialPortDriver1CommPortOpened", but is never reached.
Can you help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
3 x THMILabel and link each one with each created tag (PLCTag property). It will show the values of your tags. If you want get the value of your tags, do this in your code:
Hi.
I installed PascalScada version 0.7.3 2014-03-12 on my Lazarus version 1.0.10.
My operating system is Lubuntu Linux.
I have a USB to RS485 converter connected to ABB energy meter DMTME.
I tested the electrical connection with a C program ad a Modbus library (libmodbus).
The serial port is configured with 9600 bps, 8 data bits, 1 stop bit, no parity.
I created a Lazarus project with "SerialPortDriver" and in the objected inspector I inserted the same parameters.
I inserted a "ModbusRtuDriver" and set the CommunicationPort property to "SerialPortDriver1".
I inserted three tags with the address 4096, 4097, 4098.
I cannot see data on the three tags.
I insert a breakpoint in the event "TForm1.SerialPortDriver1CommPortOpened", but is never reached.
Can you help me?
Hi!
Check if you have the following components in your application and their settings:
1 x TSerialPortDriver (with your serial settings and Active property must be true, Parity is the property Paridade, this is a translation error. )
1 x TModbusRTUProtocol (linked with Serial Port Component and set ReadSomethingAlways = false)
3 x TPLCTagNumber: one for each modbus register. In each tag you must set:
3 x THMILabel and link each one with each created tag (PLCTag property). It will show the values of your tags. If you want get the value of your tags, do this in your code:
You can put 3 x THMIEdit instead of THMILabel, but, to make more easily, set the property FreezeValueOnFocus of each THMIEdit to false.
About the CommPortOpened event, do you Actived your SerialPortDriver (active=true)?
I don't remember if modbus address notation starts from 4000 or 4001
If it starts from 4000, use the suggested MemAddress in the previous post.
If it starts from 4001, use 95, 96 and 97 in property MemAddress instead of the values suggested on previous post.