Jump to content

Few issues about UniLogic


shargy

Recommended Posts

Hi all, especially to Uni Crew
I have few issues about UniLogic (I'm using Ver 1.6 Rev83)
First issue is about numeric (input) field. I put it in screen, untick Reaad-only, link it to some tag (declared as INT16) and set format to one decimal place.
After  project is downloaded when I try to set some value like 25.3 (witch in PLC should be 253) I got message something like "value not in range" and range is set -3276.8 to 32768.7
Only value I can enter is zero. But when I change that tag in PLC via Online mode and set it to 321 on PLC's screen it becomes 32.1 as it should be.
Where is my mistake or is it possible to do such thing in UniLogic (like in VisiLogic)?
My second issue is about data exchange between two UniStream PLCs. I found Your example and tried it. Of Course it work fine but I found one situation with TCPClient.Connect method.
After PLC's are powered-on connect method momentary makes connection to another PLC. But when I unplug ethernet cable and wait for few seconds connection state becomes "disconnected" as it should be.
After that I plug eth cable and press button connect (same tcpclient) on slave PLC it says "connected" but on master PLC is still disconnected and there is no data exchange.
After that I press disconnect button (tcpclient.Disconnect) and that again connect. After that both PLCs (master and slave) say that connection state is "connected". Same situation is when I
power of one PLC and after power on I try connect (first connect, then disconnect and than connect and after that it always works). also, when connection is established after press button
disconnect situation is same when I want to connect again.
Does some one have experience about that?
My last issue. I have declared tag STRING UTF 32 (also from Your example) wich holds IP address of master PLC as retentive but it always has "" value after power-up. Is there some special procedure for making string tags to be retentive?

 

Link to comment
Share on other sites

Hi Shargy,

Regarding the Numeric Keypad Entry - this is a known issue and will be resolved in the next Unilogic release.

Regarding the TCP connection - The scenario you described actually make sense. If the TCP link between two devices has dropped without properly disconnecting it, communication will not be re-established after a certain period. Disconnecting and reconnecting after the link is restored will ultimately solve the issue.

To make the timeout of the connection longer, check the Keep-Alive option when defining the TCP clients/servers.

As a workaround, I suggest using the following logic:

1. When the system tag System.Ethernet_Port_Link_State drops, set a temporary bit.

2. When the system tag System.Ethernet_Port_Link_State comes back, initiate a disconnect and connect sequence. 

Link to comment
Share on other sites

Hi Eyal,

Thanks for very fast answer!

I agree with You about dropped connection but what I tried to explain is actually what happens when I try to reconnect those 2 PLCs let say after manual disconnect command. After first connect command client does not connect to master (watching from master's side) but on client side says "connected".  So I have to press disconnect (after first connect) and then again connect and that is what establishes connection (I tried several times). 

After unplag then plag eth cable situation is the same. Always I must press connect, disconnect and connect (not just disconnect and connect). Can You please simulate that situation?

I will resolve this with some watchdog because TCPClient.Is Connected sometimes gives falsely state of connection.

I will listen You advice about Eth port state properties.

Do You have idea why string tag always loses values after power up (although is declared as retentive)?  I checked several times, only places where it is in use is on screen IP edit box and in ladder in String To IP block.

Also, INT type of tag has no problem about retentive option.

Interesting is that one PLC loses that string value (even i set power-up value for that tag) and another not. In first ("problematic") PLC IP edit box if made from 4 input fields and in another is made from one input field. I just found that Bin_Files are different in that 2 PLCs (1.6.14 and 1.6.13).

 

Thanks very much again!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...