News:

  • February 01, 2023, 10:37:02 AM

Login with username, password and session length

Author Topic: H2-PBC & CTRIO  (Read 13647 times)

CraigAWells

  • Newbie
  • *
  • Posts: 7
H2-PBC & CTRIO
« 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.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: H2-PBC & CTRIO
« Reply #1 on: January 04, 2013, 04:41:50 PM »
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.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #2 on: January 07, 2013, 02:34:42 PM »
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.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3478
  • Darth Ladder
Re: H2-PBC & CTRIO
« Reply #3 on: January 07, 2013, 03:27:13 PM »
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!
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3478
  • Darth Ladder
Re: H2-PBC & CTRIO
« Reply #4 on: January 07, 2013, 09:35:12 PM »
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.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: H2-PBC & CTRIO
« Reply #5 on: January 08, 2013, 09:25:37 AM »
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.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: H2-PBC & CTRIO
« Reply #6 on: January 09, 2013, 12:20:59 PM »
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

There are two types of people in the world; those that can extrapolate from incomplete data sets.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #7 on: January 09, 2013, 02:58:19 PM »
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.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: H2-PBC & CTRIO
« Reply #8 on: January 09, 2013, 03:20:41 PM »
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.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #9 on: January 09, 2013, 03:30:17 PM »
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.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #10 on: January 09, 2013, 03:35:10 PM »
My IN/OUT are the older version.  Will have to recheck my .GSD file installation.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #11 on: January 10, 2013, 08:04:14 AM »
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.

CraigAWells

  • Newbie
  • *
  • Posts: 7
Re: H2-PBC & CTRIO
« Reply #12 on: January 10, 2013, 09:47:40 AM »
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.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: H2-PBC & CTRIO
« Reply #13 on: January 10, 2013, 09:58:35 AM »
H2-PBC .GSD file attached...
There are two types of people in the world; those that can extrapolate from incomplete data sets.