Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

how to write PDI parameters using S20 Ethernet bus coupler and ctrlX modbus TCP

how to write PDI parameters using S20 Ethernet bus coupler and ctrlX modbus TCP

Open
Occasional Contributor

Hello,

I have a question, if i am using S20 Ethernet bus coupler using ctrlX modbus TCP how to write PDI parameters to change the range of S20-AI-8?

Warmest regrads,

15 REPLIES 15

evan01
Established Member

Hi

Sorry I have no experience with modbus TCP, you might want to check with CodeShepherd

CodeShepherd
Community Moderator
Community Moderator

Moved to own topic from this one.

I do not get your question. Could you confirm your topology?

I suggest ctrlX CORE with CXA_ModbusTCP (PLC based soft master) connected via S20 ethernet bus coupler to a S20-AI-8?

Hi CodeShepard,

I have a similar question.

My ctrlX CORE and S20-ETH-BK is connected to a ETH switch. The S20-ETH-BK is combined with the S20-AIAO-2

On the S20-AIAO-2, I wired CH0 (Analog input port 20 and 30) to a 4-20mA Potentiometer via a DC current converter.

I wired CH3 (Analog output port 12 and 32) to a Digital meter that accepts a DC 4-20mA as input.

 

At this moment from the ctrlX Modbus TCP app, when I read CH0 at register 8000, the value is from 5667 to 28574.

When I write to CH3 at register 9000, the value starts from 17 up to 511 (Digital meter display 2.4 - 16.25mA).

Writing the value 512 will result in short circuit error code  0x2130.

Taken from the S20-AIAO-2 datasheet:

Short circuit: voltage output, but short circuit between the terminal points
An open circuit or short circuit is only indicated when the process data value of the channel is > 512dec, corresponding
to 1.7% of the output range final value.

 

I know the S20-AIAO-2 module is set to 0-10V measuring/output range as default.

How do I configure CH0 and CH3 to 4-20mA with the S20-ETH-BK when I cannot set the values using startup parameters such as in ctrlX I/O Engineering using the EtherCAT coupler?

Open
Occasional Contributor

Hi CodeShepherd, 

I am using ctrlX Modbus TCP app to communicate with S20-ETH-BK, i want to change the measuring range of S20-AI-8. 

Open_1-1676856163470.png

How to change the measuring range in the AI module? 

Warmest regards,

CodeShepherd
Community Moderator
Community Moderator

Writing the Analog modules behind an Ethernet bus coupler is at the moment not possible like in EtherCat because the phases for interaction are missing and a event would needed to be used. This feature is not implemented right now.

The only solution I know is using the "config.svc" file that can be found and needs to be loaded in the bus coupler itself. Please access yours via its IP and FTP protocol:

S20-ETH-BK FTP accessS20-ETH-BK FTP access

Copy and rename original file as backup. Afterwards create your own file and put it there. See example like also used for EtherCat in this topic:

 

*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x0005# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0080# Index
#0x0008# Subindex | Length of following PDI-Data
#0x0001# Byte 0 | Byte 1
#0x0001# Byte 2 | Byte 3
#0x0001# Byte 4 | Byte 5
#0x0001# Byte 6 | Byte 7

 

Dear CodeShepard,

Thank you for your feedback!

In this case for my S20-AI-AO, if I want to change CH1 (Analog input) and CH4 (Analog output) to 4-20mA, is it correct if I write the value 0x0006 to the second and fourth 2 bytes of data like below?

 

*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x0005# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0080# Index
#0x0008# Subindex | Length of following PDI-Data
#0x0001# Byte 0 | Byte 1
#0x0006# Byte 2 | Byte 3
#0x0001# Byte 4 | Byte 5
#0x0006# Byte 6 | Byte 7

@ahmadKhairi So you are talking about the S20-AIAO-2 (see documentation). In chapter "16.1 Parameter table" the setup of the bytes are descriped. Beware that "Slot-ID" is corresponding to your topology:

 

*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x000A# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0080# Index
#0x000C# Subindex | Length of following PDI-Data
#0x0006# Byte 0 | Byte 1
#0x0001# Byte 2 | Byte 3
#0x0001# Byte 4 | Byte 5
#0x0006# Byte 6 | Byte 7
#0x0000# Byte 8 | Byte 9
#0x0000# Byte 10 | Byte 11

 

Open
Occasional Contributor

Hi CodeShepherd, 

If i want to change the measuring range of the S20-AI-8 to 0 V ... +5 V.

Measuring range table: 

Open_0-1677042305096.png

Replace #0x0000# (0 V ... +10 V Default) to #0x0002# (0 V ... +5 V).

#0x0003# Byte 0 | Byte 1 (Channel 1)

.

.

#0x0003# Byte 14 | Byte 15 (Channel 8 ) 

 

*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x0005# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0015# Index
#0x0002# Subindex | Length of following PDI-Data
#0x0002# Byte 0 | Byte 1
#0x0002# Byte 2 | Byte 3
#0x0002# Byte 4 | Byte 5
#0x0002# Byte 6 | Byte 7
#0x0002# Byte 8 | Byte 9
#0x0002# Byte 10 | Byte 11
#0x0002# Byte 12 | Byte 13
#0x0002# Byte 14 | Byte 15
</EOF>

 

Is this correct?

CodeShepherd
Community Moderator
Community Moderator

@Open Please see the S20-AI-8 documentation chapter "15.1 Parameter table" for further information. Beware that "Slot-ID" is corresponding to your topology. Further Index is always the object you want to write and data length needs to fit:

 

*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x000E# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0080# Index
#0x0014# Subindex | Length of following PDI-Data
#0x0002# Byte 0 | Byte 1
#0x0002# Byte 2 | Byte 3
#0x0002# Byte 4 | Byte 5
#0x0002# Byte 6 | Byte 7
#0x0002# Byte 8 | Byte 9
#0x0002# Byte 10 | Byte 11
#0x0002# Byte 12 | Byte 13
#0x0002# Byte 14 | Byte 15
#0x0000# Byte 16 | Byte 17
#0x0000# Byte 18 | Byte 19

 

 

See this post above for how to get the file to the bus coupler.

Hi CodeShepard,

I have tried uploading the below parameters but failed to change it to 4-20mA.

The CO indicator on the S20-ETH-BK lights up Yellow/Orange.

In the Bus Coupler web interface, the CO (Configuration) indicates: The parameterization of I/O modules is faulty. For clear go to page 'Startup behavior'.

I have tried to clear the message but failed unless I uploaded the original config.svc file.


*****************************************************************************
* Axioline F Configuration- and Startup-Parameterization-File
*
* THIS IS AN AUTO-GENERATED FILE. SEE MANUAL BEFORE EDIT!
*
* Comments in this file must not start with '#'
*****************************************************************************

*****************************************************************************
* SECTION 1: Bus-Configuration
*****************************************************************************
#CMD#
#0x0306# FIBO_SM_INITIATE_LOAD_REQ
#0x0003# Parameter Count
#0x0001# New_Config
#0x0001# Frame_Reference
#0x0001# Device_Count

#CMD#
#0x0307# FIBO_SM_LOAD_CFG_REQ
#0x0008# Parameter Count
#0x0007# Used_Attributes
#0x0001# Start_Entry_No
#0x0001# Entry_Count
#0x0030# DEV_TYPE
#0x0008# ..
#0x0000# ..
#0x00a9# ..
#0x0004# DEV_LEN

#CMD#
#0x0308# FIBO_SM_TERMINATE_LOAD_REQ
#0x0001# Parameter Count
#0x0000# Default_Parameter


*****************************************************************************
* SECTION 2: Startup-Parameterization
*****************************************************************************
* Example for parameterization of IO-modules:
#CMD#
#0x0042# FIBO_PDI_WRITE_OBJECT_REQ
#0x0005# Parameter Count (following words)
#0x0001# Slot-ID
#0x0000# reserved | Subslot
#0x0080# Index
#0x0008# Subindex | Length of following PDI-Data
#0x0000# Byte 0 | Byte 1
#0x0006# Byte 2 | Byte 3
#0x0000# Byte 4 | Byte 5
#0x0006# Byte 6 | Byte 7

@ahmadKhairi Did you check that your topology does match to your "Slot" index is fitting, like I mentioned above?

What is your topology? See web server of bus coupler:

S20-ETH-BK web server local busS20-ETH-BK web server local bus

Did you do a power cycle after loading the config file, because this is mandatory?

Hi, I have already found the solution and would like to share here and get some feedback.

I downloaded and installed StartupPlusSetup_v2_70.exe (447 MB) from Phoenix Contact website.

Then, I created a new project and followed the steps:

1. select device type (here: AXL F BK ETH because my bus coupler is a S20-ETH-BK),

2. choose connection type (select “Ethernet TCP/IP”),

3. select an already configured device via IP (the IP address of my bus coupler is 192.168.0.5),

4. Scan Topology > AXIOChannel > Select Generic Axioline Device

 

Next, I added the Device "AXL F AI2 AO2 1H" from the DTM-Catalog (because my bus coupler is connected to S20-AIAO-2) and insert it under the AXIOChannel.

For the next steps:

Right-clicked on AXL F BK ETH --> Connect All

Right-clicked on AXL F AI2 AO2 1H --> OnlineCompareAll (then i closed the message popup)

Double-clicked on AXL F AI2 AO2 1H which opens up the Offline Parameter Menu

Select IN2 (in my case I want to change to 4-20mA) and change the measuring range to 4 mA ... 20 mA

Select OUT2 and change the Output range to 4 mA ... 20 mA

Click on Apply

Popup message: Do you want to write the parameter set to the device --> Select Yes

Now both IN2 and OUT2 have been changed to 4-20mA!

Hi.. Yes I did a power cycle everytime I loaded the config file.

As per attached is my topology which is similar to your photo

Good to hear its working. Could you please share your actual config file with us?

EDIT: I also updated my screenshots as the "Parameter count" was wrong.

Open
Occasional Contributor

Hello CodeShepherd,

It is working for my S20-AI-8.

If i have 2 S20-AI-8, how should i write the parameter? 

Warmest regards,

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist