Jump to content

VisiLogic System equivalents in UniLogic


Flex727

Recommended Posts

  • 2 weeks later...
  • MVP 2023

Still hoping to get an answer to this. Also how about the TCP/IP SBs, SIs, and SDWs?

 

What's the best way to determine if I have a communications problem when using MODBUS IP?

 

Is there any way to modify the Slave IP address by ladder in the Master PLC?

Link to comment
Share on other sites

  • MVP 2023

Is there any way to modify the Slave IP address by ladder in the Master PLC?

 

Hey! I just found two String commands: "IP To String" and "String To IP". Perhaps those will allow me to modify slave IP addresses by ladder? I should be able to test this out tomorrow.

VisiLogic had a real nice RTC To ASCII function block to provide a nicely formatted date and time in string form. Anything like that in UniLogic?

Link to comment
Share on other sites

There are not equivalent system tags for the VisiLogic operands that you listed. To access UniApps you must press and hold in the top right corner of the screen. A menu will then prompt if you wish to enter UniApps. Since this is no longer based upon pressing the screen the associated system operands no longer apply.

 

Currently there is also not a system tag that will prompt the UniStream to reset. Also, there is not any on board temperature readings, though PT100 and thermocouple I/O modules can be added if needed.

 

When many communication options are added, a struct containing the required system tag information is added. Such as when a socket/slave is connected for Modbus of TCP/IP functions.

 

Unfortunately all slave IP addresses are static and must be defined within the project. This feature request has been passed along to our R&D department.

 

Please let us know if there are any applications requiring various system tags for current or future projects.

Link to comment
Share on other sites

  • 2 weeks later...

Further to this topic, are there any sample apps for UniLogic involving Modbus TCP/IP?  I am a V350 - CANbus - Visilogic veteran, and am trying to diagnose comms problems with a RedLion Ethertrak2 I/O module.  the UniStream and the Ethertrak2 are both plugged into a switch, and I can ping the Ethertrak2 (with fixed IP) from the UniStream.  However, cannot read any registers. 

 

Where does the struct containing the required system tag info appear  when a socket/slave is connected? 

 

Do you have to do any initialization on start-up like we did/do on booting a Vision controller?

 

Thanks

Link to comment
Share on other sites

Further to this topic, are there any sample apps for UniLogic involving Modbus TCP/IP?  I am a V350 - CANbus - Visilogic veteran, and am trying to diagnose comms problems with a RedLion Ethertrak2 I/O module.  the UniStream and the Ethertrak2 are both plugged into a switch, and I can ping the Ethertrak2 (with fixed IP) from the UniStream.  However, cannot read any registers. 

 

Where does the struct containing the required system tag info appear  when a socket/slave is connected? 

 

Do you have to do any initialization on start-up like we did/do on booting a Vision controller?

 

Thanks

 

Hello,

 

When you create a Remote Slave that you are going to connect to, a struct for the Modbus slave is created in the Global tags list.  This struct is called "Remote Slave".

 

Within this struct are tools for diagnostics.  The session attempts are the amount of connects the PLC has made, and the successes or failures are based on the number of sessions attempts.  If they match, there are no comm errors.  The status in this struct will also give you an idea of how the connection is.

 

Status '1': No errors

Status '2': No connection has been made or established

Status '3': Connection exists, but there is an issue with the Modbus commands being sent

 

You will not have to set up any comm port initializations like in VisiLogic; it is all taken care of in the solution explorer set up.  The only things you need to do is set up the panel Ethernet address on the same network of your slave and enter the slave IP address to connect to where you set up what you are reading from the slave (under the Modbus protocols tab).

 

Please let me know if this helps.

Link to comment
Share on other sites

Guru:

 

Thanks much for getting back to me/us.  I have confirmed what you say, and that I am consistently getting Status 2 errors.  See below/attached. 

We can ping the target unit (an EtherTrak2 I/O module with two Ethernet ports and support for Modbus TCP).   I have captured all the config settings there and fired off a request that they confirm settings on their side.

 

Apart from pinging from the Unistream, which works, what else can we do to see what is holding up the comms?  I am going to go back and review the documentation on the Modbus configs on the Unistream end, but there is not much in the way of examples or details.

 

Thanks

 

 

 

post-162-0-34570500-1427771083_thumb.jpg

Link to comment
Share on other sites

Hello,

 

I would check a couple things:

 

First, I would check to see if this module is using an internal Modbus IP to Modbus RTU converter.  If this is the case, you must choose the correct Slave ID to connect to the device.  Very few devices have this, but it is a possibility.

 

For Modbus IP, we usually set the Slave ID to 255.  This may be affecting your connection as well.  I would change the Slave ID by switching the Remote Slave connection point from a Modbus IP (Panel Ethernet) device over to a Modbus RTU (COM1) device, change the slave ID, then convert the master back to Modbus IP communication.

 

Let me know if this helps.

Link to comment
Share on other sites

Hi:

 

Thanks for the ideas; I will check into them and get back to you when I get to the shop again.  Much appreciated.

 

We did do one test.  At the request of the EtherTrak Tech Support, we installed ModScan64 and were able to successfully return Input Status values for the I/O card repeatedly.  This was configured using Modbus TCP and the IP address of the unit and a slave/unit ID of 1.  So, PC to I/O card works using the IP method via Ethernet.

Link to comment
Share on other sites

Ok, here's an update. 

 

The very first thing I did was to update my UniLogic to Version 1.13, Rev. 9 and to download the Firmware Update to the PLC.

 

Following your instructions, I reset the Slave/unit ID to 255, and downloaded.  The sessions began to run with 100% success, and the Status for the Slave in the struct was 1, for successful.

 

However ... my jumpered Discrete Input (address 10001) does not show HI, nor does it change when I unjumper it.  This is the value that IS showed correctly on the laptop using Modbus sniffer tool, ModScan64.

 

I have two tags configured, IN1 for the Discrete Input, and OUT1 for the first Coil (*write*) output.  If I remove IN1 (delete the tag), there is no change in Sessions/Succeeds.  If I remove the OUT1 tag, the Sessions fail 100%.  Plainly, the IN1 tag is not being polled.

 

Also, when I look at the Struct for this Remote Slave, the Slave ID is still 1, even though the Slave ID in the Properties window is successfully changed to 255.  I deleted and re-created the Remote Slave and the Slave ID in the Struct remained at 1, even though the properties window showed 255.

 

I've attached a summary of screen captures showing these results.

 

Your continued help on this is very much appreciated!

 

 

Link to comment
Share on other sites

Hello,

 

I do not see any attachments provided.  However, since you are able to write to the device, it does not seem like an ID-ing issue.

 

Do you have a spec sheet for the device, though?  Are the Modbus addresses they list in hex?

 

If you are able to write to output 1 (which I assume is address 1), then it will work fine.  But if the addresses are in hex and you are entering in UniLogic to read address 10001 (which is decimal 65537) then this would explain why you are not seeing the address change with respect to digital input 1 on your device.

 

Please let us know of your results.

Link to comment
Share on other sites

The addresses are not in hex.  I haven't tried to write to the output yet.  The Inputs do not work. As explained, if I eliminate the output function, the comms stop working.  Also, again, the Slave ID is incorrectly reported as 1 in the struct for the slave definition in the Modbus Master. 

 

As mentioned, ModScan64 correctly shows the Inputs from my PC with the addresses 10001 through 10008. 

 

 

I have edited my previous post to include (again) my latest screen captures. 

Link to comment
Share on other sites

Hello,

 

If you are using the Modbus periodic, you should be reading/writing to the registers defined in your program as soon as the device turns on, unless you have Active bits associated with the slave registers.  If the Active bits were off, then you would not be reading/writing to the slave. 

 

In the struct, you will see the Slave ID go to 1 even though you set it up for Slave ID 255.  This is because it is reading this information from the slave device.

 

I noticed in your struct from the first screen shot you attached (I did not find your other screen shots) that the remote slave IP you are connected to is 3.232.235.781, but you are connecting through 192.168.1.5.  Is this correct?  In the ModScan64 software, are you also connecting to 192.168.1.5?

 

Would it be possible to send this case into support@unitronics.com with your application for us to review attached and a spec sheet for the device you are connecting to?

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...