Send / Receive data to automaton through a Winccoa driver

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
ange.ogawin
Posts:18
Joined: Thu Mar 14, 2019 10:51 am

Send / Receive data to automaton through a Winccoa driver

Post by ange.ogawin »

Hi,

I am creating a Wincc OA driver for an industrial automaton (C200). I use the template driver generated by winccoa to implement my driver functions.
In the documentation, i saw that we must create datapoints in the Para module and do other stuffs like create driver panel configuration or edit userDriver.ctl and userPara.ctl.

To be more precise with my question, i give an example(fictive) of what i want to be able to do:
The communication protocol with the c200 is a master/slave communication where c200 is the slave and can only send answers to different commands(functions).

Function 1 : Initialize my automaton, function 2 : Get connection state with automaton ...
Message frame: (bit) 8 7 6 5 4 3 2 1

octet 1 [Address of my automaton]
octet 2 [function to execute ]

So if i want to send function 1 to c200 of address 1, my frame will be :
octet 1 [0 0 0 0 0 0 0 1]
octet 2 [0 0 0 0 0 0 0 1]

And it's the same way that c200 answers to commands.

My questions are:
- how to organize my datapoints to send/receive data through the driver? Should i create for each function a datapoint type with as many datapoints elements
as there is data to handle(for my example, 2 bytes to create)?
- how to handle data received from c200 in the driver, i mean how to find the peripheral address of a the datapoint element which the value must be updated? In order to use this api function : virtual PVSSboolean toDp(HWObject *dataPtr, HWObject *hwAdrPtr);

- When i want to send value to c200, in the configuration panel of a datapoint element is it a singleQuery or an output for the direction?

Thanks you.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Send / Receive data to automaton through a Winccoa driver

Post by leoknipp »

The panels for the configuration of addresses are not needed, it is just additional stuff to allow the user to configure address configs with a user interface.
You can also configure addresses (and all other WinCC OA configs) with the ASCII manager or with a CTRL script by using appropriate dpSet() commands.

If you want to create an own driver based on the WinCC OA API toolkit we suggest to have a WinCC OA basic and API training.
During the training you learn how to deal with data which shall be send from and received by the driver.

If you are interested in a WinCC OA training please get in contact with your common WinCC OA sales contact.

Best Regards
Leopold Knipp
Senior Support Specialist

ange.ogawin
Posts:18
Joined: Thu Mar 14, 2019 10:51 am

Re: Send / Receive data to automaton through a Winccoa driver

Post by ange.ogawin »

Thanks you for the answer

3 posts • Page 1 of 1