The DF1Comm uses a shared Data Link Layer so that components can be used on multiple forms and still go through the one communication component. The side effect of this is that everything wants to channel through one com port. You can get around this by going into the DF1Comm.vb code and removing the word Shared from the following line of code:Do you know if it is possible to have 2 plc,s connected to 2 comm ports on a computer and have a set of controls on a form for each plc in advanced hmi to control each plc. I tried to do this but in the properties box of the DF1COMM1 & DF1COMM2 I could not select different comm ports.
Code:
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]'* Create a common instance to share so multiple DF1Comms can be used in a project[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Shared[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] DLL [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] DataLinkLayer[/SIZE]
If the Data Link Layer is no longer a shared component, multiple forms will not be possible unless you connect the components to the communication driver (DF1Comm) through code. This is just a limitation of the VB environment that I have not found a work around for yet.