How port number should be designated in "opcda" function when communication with OPC DA server?

When accessing an OPC DA server using the Industrial Communication Toolbox, I understand that the IP address of the external PC should be set in the HostID parameter of the opcda command when creating the DA object. However, how should I specify the port number in this case?

DAobj = opcda(HostID,ServerID)

 Accepted Answer

OPC(DA) communicates using the port 135 as default, and a random port ranging 1024 – 65535 will automatically be chosen for the return communication, so it isn't necessary to be care about the port number in the "opcda" function. 

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!