Hello everyone , I am using libnodave with Delphi 7
WhenI run the Demo\NoDaveDemo.exe all things are fine.
But when I open Delphi7 and run the Demo\Delphi\NoDaveDemo.dpr I get always a dos screen where you can see all the handle protocol of UDP.
The problem is that this window appears to making errors to the communication .
-Is there a way to shut down this window?
Thank you very much
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With the commandline-parameter "-debug" NoDaveDemo.exe is showing the dos-box, thus you can remove it from the run-parameters in delphi to hide this window, but I don't expect that the debug-messages are responsible for any errors in the communication.
Axel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you know maybe any good way to read more than one of DB with libnodave?
Because I try to read for example DB100 , DB101 and DB102 but the program was making errors.
The way I made it is :
As it is in the example demo but I have put a Timer and every 500ms I change the following
NoDave1.DBNumber
NoDave1.BufLen
NoDave1.BufOffs
Can you help me to guide me to a correct way of read from many DB's?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The best and easiest way to read from multiple DBs with the Delphi-component is to use the method TNoDave.ReadBytes with the parameters for the DB, offset and length. In this case you must change the property Interval to 0, and it's not neccessary to write to the properties DBNumber, BufOffs, Buflen of the component. Just call the method ReadBytes with all the parameters in your OnTimer-event, and after the call you can read the requested data out of the buffer.
Axel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you want to write a single bit/byte/word/int/... you can use the methods WriteBit/WriteByte/WriteWord/WriteInt/... of the component. These methods writes the content of the parameter Value to the address defined by the properties Area and DBNumber and the parameter Address of the method.
If you want to write a complete address-range at one time, you can use the method WriteBytes, where the parameter Buffer must be a pointer to a buffer with the values which should be written to the PLC. If the parameter Buffer is NIL or undefined (both is not recommended), the internal buffer of the component is used.
Axel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone , I am using libnodave with Delphi 7
WhenI run the Demo\NoDaveDemo.exe all things are fine.
But when I open Delphi7 and run the Demo\Delphi\NoDaveDemo.dpr I get always a dos screen where you can see all the handle protocol of UDP.
The problem is that this window appears to making errors to the communication .
-Is there a way to shut down this window?
Thank you very much
With the commandline-parameter "-debug" NoDaveDemo.exe is showing the dos-box, thus you can remove it from the run-parameters in delphi to hide this window, but I don't expect that the debug-messages are responsible for any errors in the communication.
Axel
Hi Alex thank about your help.
Do you know maybe any good way to read more than one of DB with libnodave?
Because I try to read for example DB100 , DB101 and DB102 but the program was making errors.
The way I made it is :
As it is in the example demo but I have put a Timer and every 500ms I change the following
NoDave1.DBNumber
NoDave1.BufLen
NoDave1.BufOffs
Can you help me to guide me to a correct way of read from many DB's?
The best and easiest way to read from multiple DBs with the Delphi-component is to use the method TNoDave.ReadBytes with the parameters for the DB, offset and length. In this case you must change the property Interval to 0, and it's not neccessary to write to the properties DBNumber, BufOffs, Buflen of the component. Just call the method ReadBytes with all the parameters in your OnTimer-event, and after the call you can read the requested data out of the buffer.
Axel
Hi Alex ,
Thank very much for the info on reading.I manage to do it very good.
I would like to ask you a question.With the command
WriteBytes(Area: TNoDaveArea; DB, Start, Size: Integer; Buffer: Pointer = Nil);
Where do I put the value that I want to write to the PLC?
If you want to write a single bit/byte/word/int/... you can use the methods WriteBit/WriteByte/WriteWord/WriteInt/... of the component. These methods writes the content of the parameter Value to the address defined by the properties Area and DBNumber and the parameter Address of the method.
If you want to write a complete address-range at one time, you can use the method WriteBytes, where the parameter Buffer must be a pointer to a buffer with the values which should be written to the PLC. If the parameter Buffer is NIL or undefined (both is not recommended), the internal buffer of the component is used.
Axel