Re: Sample Modbus TCP PAC Strategy Not Working

SNAP PAC Systems

Sample Modbus TCP PAC Strategy Not Working


brad_mccready@hotmail.com 02-04-2008, 12:01 PM
I'm fairly new to the SNAP PAC. I have a SNAP-PAC-R1 and have loaded the sample MBSlaveTCP strategy (found here:
http://www.opto22.com/site/downloads/drilldown.aspx?aid=3280&dnl=PAC-INT-MBSER) to the PAC using PAC Control Basic 8.0f.

The strategy downloads and appears to run fine. To test the strategy though, I connected to the PAC with a Modbus Master Simulator program (ModScan32) running on my PC. The program connects to the PAC and they communicate, but the data the PAC sends back in response to a Holding Register request is completely wrong.

The Holding Register table in PAC Control shows the table is completely initialized to 0. The simulator shows the following data from the PAC though:
40001: 7FFF
40002: FFFF
40003: 7FFF
40004: FFFF
and on and on it goes repeating that pattern.

I have never had any problems with Modscan and have ruled it out as the culprit, but can't see where this data is coming from on the PAC. The port's are set correctly, the data type is correct, I've even tried performing a Modbus Holding Register Write to the PAC to change register 40001, but don't see the change take effect in PAC Control.

Any ideas? Has anyone else used this sample strategy? If I can't verify the functionaly of a simple Modbus Holding Register Read, there is no sense proceeding with the rest of the project.

Re: Sample Modbus TCP PAC Strategy Not Working


gerhardK 02-04-2008, 2:02 PM
You are talking about Modbus/TCP, but you reference to a Modbus Serial Integration Kit.

If you meed to talk to the PAC-R1 via Modbus/TCP, means you have the PAC-R1 working as a Modbus/TCP Slave, there is no Integration Kit needed. The Modbus/TCP protocoll is supported by nature.

This document describes the Protocoll:
http://www.opto22.com/documents/1678_Modbus_TCP_Protocol_Guide.pdf

Re: Sample Modbus TCP PAC Strategy Not Working


asooral 02-06-2008, 5:35 PM

I am also new to Opto22 and SNAP PAC. But I just successfully communicated to a Modbus slave using the sample strategy. Ofcourse I had to make some modifications in the script for reading the data from the slave. Which protocol are you using? Opto website has different kit for different protocols. I used  MODBUS TCP and PAC-S1 as a Master.

http://www.opto22.com/site/downloads/index.aspx  is the link for the integration kits. I used PAC-INT-MBTCP.

 

Re: Sample Modbus TCP PAC Strategy Not Working


Cready24 02-07-2008, 12:48 PM
Sorry. I posted the wrong url or the integration kit. I was using the Modbus TCP kit though.

It seems that Opto22 has updated their documentation this past week and has now included an explanation of how to correctly configure the Modbus option for the sample strategy. It seems that the Modbus Port under Communications -> Network Security needs to be changed from 502 to 0 in order for the sample strategy to properly work. Not doing so only allows access to the I/O portions of the memory map. Making that change allows the strategy to take over and provides access to the I/O and Strategy portions of the memory map.

Running the sample slave strategy with the change made, I can now scan the PAC with a Modbus TCP connection on port 502 and read and write to the contents of the strategy's Holding Register table. I can now return to building the rest of my strategy. Thanks for the replies. They got me looking into the documentation again.

Powered by Community Server, by Telligent Systems