DATA AHEAD toolkit support Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

SP7: Use of cluster element 'Connected?' ?

Hello,

I tried SP7 toolkit and it runs fine.

In 'S7 Connection' cluster there is a boolean element 'Connected?'. What is the use of this element? I never saw it go true.

I thought I can check this boolean before reading or writing, but it stayed false after opening a connection to the PLC.

Uli

0 Kudos
Message 1 of 8
(5,291 Views)

Hi UliB,

thanks for your request!

The "Connected?" boolean is switched after a ( special - known to us) response of the plc after a successfully connection.

This boolean should help the developer to debug his code and is checked  after a read or write request.

To ensure a continous valid reference i would additionally use the function "Not A Number/Path/Refnum?".

To track down your issue it would be great to know your hardware (PLC) you are communicate with!

Greetings,

Hajo

0 Kudos
Message 2 of 8
(4,332 Views)

Hello Hajo,

thanks for your answer.

Its strange. Today I checked the 'Connected?' boolean again.

Sometimes (~10%) the boolean goes true after opening a connection, but most times (~90%) the boolean stays false.

I communicate with a S7- 300, CPU315-2PN/DP.

Uli

0 Kudos
Message 3 of 8
(4,332 Views)

Hello UliB,

this sounds strange! I opened and closed a connection more than 1000 times in a short period of time and the "Connected?" boolean was true all the time.

I currently communicate with a S7-ET200S.

Is it possible that your tcp/ip connection has a high delay or the network is pretty busy?

Do you open and close the connection to the PLC in your application very often?

Thanks that you help us to find the problem.

Greetings,

Hajo

0 Kudos
Message 4 of 8
(4,332 Views)

Hello Hajo,

my LabVIEW-PC is connected to the factory LAN with LAN port 1. This could be busy !?

The second LAN port of the LabVIEW-PC is connected to a LAN just for communication with S7. There are four participants in this LAN: my LabVIEW-PC, S7-PLC, Touch Panel HMI and the PLC programmer's PC.

The PLC programmer is working with SIMATIC MANAGER Step7 and has an open connection to PLC too. Maybe the two open connections don't work together?

Uli

0 Kudos
Message 5 of 8
(4,332 Views)

Hello Hajo,

I open the connection only at the beginning of my communication. Then I read and write periodically (every ~300ms) to the PLC. The communication itself is working, only 'Connected?' stays false.

Uli

0 Kudos
Message 6 of 8
(4,332 Views)

Hello UliB,

sorry for the late response. We still can´t reproduce this issue.

Does this issue prevent you to use the functionality of SP7?

We will try to implement a stable "Connected" Boolean in the upcomming version!

Greetings Hajo

0 Kudos
Message 7 of 8
(4,332 Views)

Hello Hajo,

thank you for comming back.

I simply set my own flag for being connected and I'm fine with this.

I assume it has to do with the number of allowed connections to the PLC. In all my tests the programmer of the PLC was connected to the PLC too and he told me that in the PLC there is only one connection configured.

I still have to check the 'connected' boolean when the programmer isn't connected. Next time I will let the programmer set the number of connections to '2' and check again.

Uli

0 Kudos
Message 8 of 8
(4,332 Views)