Hi Malanar,
the sample project you are using is intended to be somewhat flexible so that it can meet as more need as it can, but you can use it as only a source reference and adapt it to your needs.
The configuration screen, as an example, is provided only to show you which parameters are settable in opening the serial port, but you absolutely don't need to have one in your application: your "the well used 8N1 - 9600 bps" configuration can be hardcoded in the source the same as port number, simply place somewhere in the code OpenComConfig () function appropriately setting all its parameters.
The same applies to reading and writing on serial channel: go into the sample code and take it as a reference, adapting it to your needs. You will need some knowledge about the device attached to the serial port in order to establish a dialogue.
As an example:
- Serial communication settings. OK, seems you know all about them
- Is the device expecting a termination character at the end of messages? And which one?
- Does the device responds with a termination character? If so, you can read up to this termination character (ComRdTerm), otherwise you must apply a correct delay or configure a timeout in reading (SetComTime)
- Consider that all messages are recived as a string: to interpret them as a number you must convert them appropriately (for example with strtoxxx functions).
Hope all this helps
Roberto