Hello, teh;
When purchasing the Modbus driver for the CP340/CP341, make sure you know whether you will be Modbus master or slave; there are 2 different drivers in the Siemens catalog.
Once you have the driver installed, use the example project that comes in the documentation for the CP340/CP341 (you can download it from the Siemens webpage) to establish a basic communication link; then modify it to suit your needs. It is the easiest way to make sure all functionnalities are available to you.
Hope this helps,
Daniel Chartier