Coupling Devicenet Slave EL6752 in CODESYS 3
CODESYS Forge
talk
(Thread)
Coupling Devicenet Slave EL6752 in CODESYS 3
Last updated: 2016-10-28
WAGO 750-8212 SUPPORT PROFINET (MASTER/SLAVE) ?
CODESYS Forge
talk
(Thread)
WAGO 750-8212 SUPPORT PROFINET (MASTER/SLAVE) ?
Last updated: 2019-05-20
Eigenen Slave entwickeln - ESI und lib schreiben
CODESYS Forge
talk
(Thread)
Eigenen Slave entwickeln - ESI und lib schreiben
Last updated: 2018-09-27
WAGO 750-838CanBus Slave - Informationen an Master übergeben
CODESYS Forge
talk
(Thread)
WAGO 750-838CanBus Slave - Informationen an Master übergeben
Last updated: 2008-05-14
How to add startup parameters to an EtherCAT slave
CODESYS Forge
talk
(Thread)
How to add startup parameters to an EtherCAT slave
Last updated: 2015-09-15
Modbus RTU Master - how to change slave address from program
CODESYS Forge
talk
(Thread)
Modbus RTU Master - how to change slave address from program
Last updated: 2020-02-10
Interface to Parallax Propeller using I2C slave
CODESYS Forge
talk
(Thread)
Interface to Parallax Propeller using I2C slave
Last updated: 2015-01-20
ModbusFB - Modbus TCP Slave non standard port
CODESYS Forge
talk
(Thread)
ModbusFB - Modbus TCP Slave non standard port
Last updated: 2022-04-19
Modbus TCP Master->Modbus TCP Slave Variable always 0 issue
CODESYS Forge
talk
(Thread)
Modbus TCP Master->Modbus TCP Slave Variable always 0 issue
Last updated: 2018-04-18
Driving the slave axis across master's zero point - caming
CODESYS Forge
talk
(Thread)
Driving the slave axis across master's zero point - caming
Last updated: 2024-01-18
Dynamic setting of the modbus tcp/ip slave ip address
CODESYS Forge
talk
(Thread)
Dynamic setting of the modbus tcp/ip slave ip address
Last updated: 2024-02-17
mobus tcp slave device. read/write holdings with 2 variables.
CODESYS Forge
talk
(Thread)
mobus tcp slave device. read/write holdings with 2 variables.
Last updated: 2024-03-20
Post by eschwellinger on Generic EtherCAT slave
CODESYS Forge
talk
(Post)
Sure, import the ESI file, scan the slave access the PDOs.
Last updated: 2024-05-14
Issues with Modbus Slave with Raspberry Pi
CODESYS Forge
talk
(Thread)
Issues with Modbus Slave with Raspberry Pi
Last updated: 2024-07-11
Ruspberry PI and working with profinet slave.
CODESYS Forge
talk
(Thread)
Ruspberry PI and working with profinet slave.
Last updated: 2024-07-30
Number of Connections to Modbus TCP Slave
CODESYS Forge
talk
(Thread)
Number of Connections to Modbus TCP Slave
Last updated: 2024-08-01
Number of Connections to Modbus TCP Slave
CODESYS Forge
talk
(Thread)
Number of Connections to Modbus TCP Slave
Last updated: 2024-08-01
Number of Connections to Modbus TCP Slave
CODESYS Forge
talk
(Thread)
Number of Connections to Modbus TCP Slave
Last updated: 2024-08-01
Number of Connections to Modbus TCP Slave
CODESYS Forge
talk
(Thread)
Number of Connections to Modbus TCP Slave
Last updated: 2024-08-01
Post by eschwellinger on CODESYS Automation Server Connector for 3.5 SP11
CODESYS Forge
talk
(Post)
https://store.codesys.com/en/codesys-automation-server-connector.html Programming System CODESYS Development System V3.5.15.0 or higher
Last updated: 2023-08-30
Post by mondinmr on Direct Pointers in IOMapping for EtherCAT with IoDrvEthercatLib.ETCSlave_Dia
CODESYS Forge
talk
(Post)
I have found a very interesting solution using: IoConfigTaskMap IoConfigConnectorMap IoConfigChannelMap The first is the list of IO tasks. The second is the connector for each IO module in the IOMap. The third is the individual input or output on the IOMap. One of the properties of the connector is another pointer to a connector, which corresponds with the connector of the EtherCAT slave. Through this information, it is possible to understand to which EtherCAT slave an IO connectormap corresponds. I am attaching an FB that allows for the construction of an IO map and finding the pointer to the actual IOs in the IOMap based on the bitoffset. FUNCTION_BLOCK IOExplorer VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR inputChannels: COL.LinkedList; outputChannels: COL.LinkedList; ulintFactory: COL.UlintElementFactory; END_VAR METHOD inputAtBitOffsetOfConnector : POINTER TO BYTE VAR_INPUT conn: POINTER TO IoConfigConnectorMap; bitOffset: UDINT; END_VAR VAR it: COL.LinkedListIterator; itf: COL.IElement; elem: COL.iUlintElement; channelInfo: POINTER TO ADVChannelInfo; bitOffsetR: UDINT; END_VAR inputChannels.ElementIterator(it); WHILE it.HasNext() DO it.Next(itfElement => itf); __QUERYINTERFACE(itf, elem); {warning disable C0033} channelInfo := TO___UXINT(elem.UlintValue); {warning restire C0033} IF channelInfo^.connectorField = conn THEN IF bitOffsetR = bitOffset THEN inputAtBitOffsetOfConnector := channelInfo^.addr; RETURN; END_IF bitOffsetR := bitOffsetR + channelInfo^.size; ELSE bitOffsetR := 0; END_IF END_WHILE inputAtBitOffsetOfConnector := 0; END_METHOD METHOD outputAtBitOffsetOfConnector : POINTER TO BYTE VAR_INPUT conn: POINTER TO IoConfigConnectorMap; bitOffset: UDINT; END_VAR VAR it: COL.LinkedListIterator; itf: COL.IElement; elem: COL.iUlintElement; channelInfo: POINTER TO ADVChannelInfo; bitOffsetR: UDINT; END_VAR outputChannels.ElementIterator(it); WHILE it.HasNext() DO it.Next(itfElement => itf); __QUERYINTERFACE(itf, elem); {warning disable C0033} channelInfo := TO___UXINT(elem.UlintValue); {warning restire C0033} IF channelInfo^.connectorField = conn THEN IF bitOffsetR = bitOffset THEN outputAtBitOffsetOfConnector := channelInfo^.addr; RETURN; END_IF bitOffsetR := bitOffsetR + channelInfo^.size; ELSE bitOffsetR := 0; END_IF END_WHILE outputAtBitOffsetOfConnector := 0; END_METHOD METHOD scanIO VAR_INPUT END_VAR VAR numTasks: DINT := IoConfig_Globals.nIoConfigTaskMapCount; tType: WORD; ioTask: POINTER TO IoConfigTaskMap; numCon: WORD; connector: POINTER TO IoConfigConnectorMap; numCh: DWORD; channelInfo: POINTER TO ADVChannelInfo; iTsk: DINT; iCon: WORD; iCh: DWORD; i: DINT; _tmpConnList: COL.IList; elem: COL.IUlintElement; itf: COL.IElement; tmpCh: POINTER TO ADVChannelInfo; lastE: DINT; e: COL.COLLECTION_ERROR; e1: Error; END_VAR VAR_INST lF: COL.ListFactory; END_VAR IF outputChannels.CountElements() > 0 OR inputChannels.CountElements() > 0 THEN RETURN; END_IF _tmpConnList := lF.CreateDynamicList(16, 16); //Iterate through all IO tasks FOR iTsk := 0 TO numTasks - 1 DO ioTask := ADR(IoConfig_Globals.pIoConfigTaskMap[iTsk]); //Store the type of the task (Input or Output) tType := ioTask^.wType; numCon := ioTask^.wNumOfConnectorMap; //Iterate through all connectors of the task FOR iCon := 0 TO numCon - 1 DO connector := ADR(ioTask^.pConnectorMapList[iCon]); numCh := connector^.dwNumOfChannels; //Iterate through all channels of the connector FOR iCh := 0 TO numCh - 1 DO //Create a new channel info object and fill it with the address, connector and size of the channel //Connectors is address of field connector in this case like EtherCAT slave //Address is the address of the IOMap //Size is the size of channel data in bits in IOMap channelInfo := __NEW(ADVChannelInfo); channelInfo^.addr := connector^.pChannelMapList[iCh].pbyIecAddress; channelInfo^.connectorField := connector^.pConnector; channelInfo^.size := connector^.pChannelMapList[iCh].wSize; //We put the channel info a temporary ordered list //Order is based on the address of IOMap lastE := TO_DINT(_tmpConnList.CountElements()) - 1; FOR i := 0 TO lastE DO _tmpConnList.GetElementAt(udiPosition := TO_UDINT(i), itfElement => itf); __QUERYINTERFACE(itf, elem); {warning disable C0033} tmpCh := TO___UXINT(elem.UlintValue); {warning restire C0033} //If the address of the channel is smaller than the address of the channel in the list IF tmpCh^.addr > channelInfo^.addr THEN //Insert the channel in the list at the current position _tmpConnList.InsertElementAt(TO_UDINT(i), ulintFactory.Create(TO_ULINT(channelInfo))); //Clear the channel info pointer channelInfo := 0; //Exit the loop i := lastE + 1; END_IF END_FOR //If the channel info is not 0, it means that the channel was not inserted in the list IF channelInfo <> 0 THEN //Add the channel to the end of the list elem := ulintFactory.Create(TO_ULINT(channelInfo)); _tmpConnList.AddElement(elem); END_IF END_FOR //Iterate temporary list and add the channels to the input or output list lastE := TO_DINT(_tmpConnList.CountElements()) - 1; FOR i := 0 TO lastE DO _tmpConnList.GetElementAt(udiPosition := TO_UDINT(i), itfElement => itf); __QUERYINTERFACE(itf, elem); {warning disable C0033} tmpCh := TO___UXINT(elem.UlintValue); {warning restire C0033} //If type is input, add the channel to the input list IF tType = TaskMapTypes.TMT_INPUTS THEN e := inputChannels.AddElement(ulintFactory.Create(TO_ULINT(tmpCh))); //If type is output, add the channel to the output list ELSIF tType = TaskMapTypes.TMT_OUTPUTS THEN e := outputChannels.AddElement(ulintFactory.Create(TO_ULINT(tmpCh))); ELSE __DELETE(tmpCh); END_IF END_FOR //Clear the temporary list _tmpConnList.RemoveAllElements(); END_FOR END_FOR END_METHOD
Last updated: 2024-02-13
PLC (Lenze with CoDeSysy) as MODBUS TCP Slave to connect a 3th party touchscreen
CODESYS Forge
talk
(Thread)
PLC (Lenze with CoDeSysy) as MODBUS TCP Slave to connect a 3th party touchscreen
Last updated: 2017-01-02
I want to control a industrial machine with "CODESYS Control Win V3" and a Profibus_DP slave
CODESYS Forge
talk
(Thread)
I want to control a industrial machine with "CODESYS Control Win V3" and a Profibus_DP slave
Last updated: 2018-09-24
Raspberry Pi 3 Modbus TCP Master and Arduino Mega Modbus TCP Slave
CODESYS Forge
talk
(Thread)
Raspberry Pi 3 Modbus TCP Master and Arduino Mega Modbus TCP Slave
Last updated: 2021-03-06
Connect a I/O module (EAP Module 2020) as a slave to Revolution PI
CODESYS Forge
talk
(Thread)
Connect a I/O module (EAP Module 2020) as a slave to Revolution PI
Last updated: 2018-03-09
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.