Forum > General

[SOLVED] USB connected device- How to access 'Bus Reported Device Description'

<< < (7/8) > >>

bobby100:
You have SerialPortDriver component in your project?
Take a look at the events of the component in Object Inspector.

Username:
Thanks Bobby100,
I'm looking at the responses now and comparing to the RTU Protocol Specifications. Can't believe I didn't even check the SerialPort Events. Geez.  %) Big help. Much appreciated!

Username:
When I do an intentional write error, (Value out of range or non-existent memory address) I can see the output in the error log file and it has the expected values returned by the device.

However, neither of the error events of SerialPortDriver are triggered. I have them set to activate, but they are not triggered, and I don't see how to check the Device response after a write operation. I looked into the SerialPortDriver routines and I can see where I could hack it to get the result but I don't want to do that and have to do all the licensing stuff required for modifying the libs. Surely there's a simple way to check the responses?

DonAlfredo:
You can also look at the LastSyncReadStatus of a TPLCBlock after trying to read some info from your device.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if (ReadStatus<>TProtocolIOResult.ioOk) then ErrorHandling;

bobby100:
SerialPortDriver can detect just the communication errors (bit parity check does not match and such). In real life, this is the layer where you'll get the 90% of the possible errors.
As for ModBus protocol, the master is sending a package and the slave responds to the master with (almost) the same package.
This is probably not visible in PascalSCADA, as it should be a background process.
Setting values outside the range - it should be programmer's duty to take care of.
You could ask Fabio about the details of error handling implementation.
On www.pascalscada.com, in the documentation section, you can ask questions (every documentation topic has its own discussion at the bottom of the page). Fabio usually answers in a couple of days.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version