I have a task to take data from the registers of the DGU controller, I understood about how to open a connection to the com port (rs-232 interface), but the question arose what method can be used to extract data from the registers, I found an example on their website, but there are registers not specified. And I need to turn to the controller for the registers and in return he returned the parameters of the DSU to me. And how can I test it later without connecting to the DGU controller?
- What data could you get from the controller? Just the state of the registers will be reflected in the corresponding bits of the "message". What byte (and bit) of the message for what is responsible is reflected in the table that you showed. - DimXenon pm
- Perhaps a search for a single-language version will also be useful: stackoverflow.com/search?q=rs-232+java - DimXenon
- The fact is that now I can’t connect to the DGU (I do the work remotely), I’ll have to test it on my PC and send it to the customer, How to have an example and they use the res = (ReadInputRegistersResponse) trans.getResponse () method; and then in for they use the getRegisterValue method which returns int - Andrey Sibirkin
- Looks like what you need. I think you already do it right. Get the numbers, match them with the table and output (or what is required by the task?) With the corresponding signatures. - DimXenon
- Ok, I understand you, thank you very much! - Andrey Sibirkin
|