Host Engineering Forum
General Category => Obsolete Products => Profibus => Topic started by: CraigAWells on January 04, 2013, 11:45:17 AM
-
I am using a Siemens S7-300 as a Profibus master with 2 H2-PBC stations connected. The only problem that I have is a CTRIO module, every other module works great. The CTRIO is set up in the Siemens hardware manager at input address 312 and output address 272. When I run CTRIO Workbenchthru the PBC the I/0 map starts at 65535 for in and out. I have the latest .gsd file and have updated the firmware on the H2-PBC and the CTRIO. The CTRIO is hardware version 4A. It is located in slot 7 of the base.
-
The I/O Map in CTRIO Workbench does not do anything except allow you experiment. It doesn't actually configure anything at all. It is functional so you can enter in your addressing and see where stuff is going. The PBC is giving your S7-300 master 44 bytes IN and 52 bytes OUT, but the S7-300 is mapping those bytes itself.
For example, I did an example CTRIO configuration in the pic below, clicked on I/O Map button and entered in your values and you can see where stuff is getting mapped.
You could then use the Report button to print out a list for documentation purposes.
-
So I did some troubleshooting and got this info. I set up the CTRIO for 4 counters and hooked up a test encoder. These are the results
According to CTRIO offline setup should be
CH1/FN1 CH1/FN2 CH2/FN1 CH2/FN2
Scaled 312-315 320-323 328-331 336-338
Raw 316-319 324-327 332-335 340-343
@Reset 344.1 345.1 346.1 347.1
This is actual
CH1/FN1 CH1/FN2 CH2/FN1 CH2/FN2
Scaled 320-323 328-331 336-339 344-347
Raw 324-327 332-335 340-343 348-351
@Reset 312.1 313.1 314.1 315.1
also the byte order of each value is swapped I should be able to read CH1/FN1 with a PID320 as a double integer, but it didn't work. I had to swap the four bytes, then the values read the same as the I/O Monitor in CTRIO Workbench.
-
Yeah, S7 byte order has always seemed backwards to me.
For example, say you write ladder to successively write values 1, 2, 4, 8, 16, and so on up to 32768 to a 16-pt output module, say at address QW0 for instance.
The values 1-128 energize outputs on the SECOND half of the module and 265-32768 work the FIRST half (but with the bits in expected order on both halves)!
Those zany Germans!
-
In fact, just the idea of using bytes as the base memory allocation unit instead of 16-bit words always seemed absurd to me in itself. Probably left over from when they designed the S3 and S5 and memory was DM12 a bit or something.
-
CraigAWells, the endian-ness of the words or double-words you are getting doesn't surprise me. You'll have to manipulate that yourself.
But the mapping does bother me. I'm testing this myself and will post the results. I don't have an S7-PLC to test with, so I'll have to use a different Profibus master.
-
CraigAWells, we found some issues with the H2-PBC booter that could possibly be causing the shift in the placement of data in your I/O map. Attached below is a BETA-release booter file that I tested. It works in my major tests with the H2-CTRIO and things are mapped where they should be using my SST-card Profibus Master on my PC. Please note (to everyone), if you download this file and use it, you are using it at your own risk. If this booter works for you, then after the test engineer runs it through his gambit of tests, I will formally release this for the PBCs.
To use:
- Unzip it to c:\HAPTools\Images\H2-PBC
- Connect serially to H2-PBC serial port (not the Profibus port) from a COM-port on your PC.
- Start NetEdit3
- In NetEdit3 menu, choose Network --> Protocol --> Serial --> (your COM port). NetEdit should display your H2-PBC
- Right-click on the PBC, choose Update Booter... and pick pbusboot_01_00_82_BETA.BIN file. This should update the booter and you should get a success message.
- Power-cycle the PBC
- Test and let us know
-
Installed the new booter. After a restart the PBC indicates that there is a configuration error. The TOKEN led is not lit. Reinstalled .79 booter and the PBC operates as it did before.
-
You should be using the GSD file to configure the slave. I can't speak for Step7 profibus configurator, but some allow you to read the configuration from the slave and then use that as the configuration in the master. If you did this then:
Booter: v1.0.79 will log in as 48out, 40in (bytes) <--- This is incorrect and may be why you are seeing the offset in mapping
Booter: v1.0.82 will log in as 52out, 44in (bytes) <--- This matches the GSD file
So, in your case, when you loaded v1.0.82 you would need to reconfigure your Step7 master for the different size I/O.
-
Installed the newest .GSD file before I started this project, but I will check if it installed correctly. Also I didn't mention it before because I had not tested the resets, and you may have caught this already, but they are mapped incorrectly as well.
-
My IN/OUT are the older version. Will have to recheck my .GSD file installation.
-
Can you post your .GSD file. I downloaded the file from AutomationDirect again. I installed it on a machine that does not have the H2-PBC.GSD installed just in case there was a problem overwriting the old .GSD. The .GSD still only has the I/O at 40/48. Which would be logical since the newest firmware available in your download is .79 they would have to match.
-
I modified your .GSD file to give me the correct bytes I/O for the S7 hardware manager and installed the booter .82 for the PBC. Everything is working correctly with the proper addressing. Thank you. I will let you know if any other issues pop up.
-
H2-PBC .GSD file attached...