FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
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.
02-15-2023 09:59 AM - last edited on 02-16-2023 04:11 PM by CodeShepherd
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,
Solved! Go to Solution.
02-16-2023 04:07 PM - last edited on 02-16-2023 04:11 PM by CodeShepherd
Hi
Sorry I have no experience with modbus TCP, you might want to check with CodeShepherd
02-16-2023 04:10 PM
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?
02-19-2023 04:52 AM
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?
02-20-2023 02:27 AM
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.
How to change the measuring range in the AI module?
Warmest regards,
02-20-2023 01:07 PM
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:
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
02-21-2023 02:25 AM
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
02-21-2023 09:04 AM - edited 02-24-2023 03:11 PM
@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
02-22-2023 06:16 AM - edited 02-22-2023 06:17 AM
Hi CodeShepherd,
If i want to change the measuring range of the S20-AI-8 to 0 V ... +5 V.
Measuring range table:
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?
02-22-2023 09:39 AM - edited 03-15-2024 02:23 PM
@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.
02-24-2023 08:19 AM
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
02-24-2023 09:26 AM - edited 02-24-2023 09:33 AM
@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:
Did you do a power cycle after loading the config file, because this is mandatory?
02-24-2023 10:05 AM
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!
02-24-2023 10:10 AM
02-24-2023 11:03 AM - edited 02-24-2023 03:03 PM
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.
02-27-2023 06:39 AM - edited 02-27-2023 07:03 AM