As you have 4 distinct parameters, it will not be possible to map them to a BIT variable from the mapping dialog. You could try testBytes AT %QB200 : Output_Union; OR testBytes AT %QB400 : Output_Union; Depending on which addressing mode your PLC uses. You could also use Util.Pack() / Util.Unpack() somewhere in your code
As you have 4 distinct parameters, it will not be possible to map them to a BIT variable from the mapping dialog. You could try testBytes AT %QB200 : Output_Union; OR testBytes AT %QB400 : Output_Union; Depending on which addressing mode your PLC uses. You could also use Util.Pack() somewhere in your code
Try testBools : ARRAY [0..9] OF BOOL;
In Library Manager, add the Net Base Services library. In your program declare a variable of type NBS.ResolveHostname Call this instance to resolve the hostname.
In Library Manager, add the Net Base Services library. In your program declare a variable of type NBS.ResolveHostName Call this instance to resolve the hostname.
Update the IP address here: https://help.codesys.com/webapp/_mod_lib_modbustcpslave;product=core_modbus_configuration_editor;version=3.5.16.0#method-updatecommunicationsettings Resolve the hostname here: https://help.codesys.com/webapp/18ac1JTkIbRdFRUVoKkJs8xQKxc%2FResolveHostname;product=NetBaseServices;version=3.5.16.0
task 2 of 4 - DONE https://forge.codesys.com/forge/wiki/IO%20Drivers/ DONE https://forge.codesys.com/drv/io-drivers/database/Home/ Todo https://forge.codesys.com/drv/io-drivers/doc/Generic/ The last page is not publicly editable, so it is still todo. Should we also update the list of existing drivers, or just leave them as 0004?
Home
IO Drivers
While the PLC's Key is stuck in the IDE, go to http://localhost:22352 Go to Containers >> All Containers >> select the dongle Under "Licences" you should have the 101599 entry Under this 101599 entry, you should see your unique product code.
It says how to enable in the link, right? An example with a generic editor is: https://forge.codesys.com/drv/io-drivers/code/HEAD/tree/trunk/ - IoDrvFB.devdesc.xml - IoDrvFB.library It does not have any enums, you can look at the enum in the following example, with parameter EthernetProtocol which is only available in the generic editor view An example with an Automation Platform editor is: Tools > Device Repository > Fieldbuses > Ethernet Adapter > Ethernet > Export
The parameters listed in your device description can be seen by turning on the Show generic device configuration views To create a custom editor like you see for example with Ethernet IP Scanner, you will need to purchase Automation Platform, or have CODESYS or their System Partners program such an editor for you.
For your exact formatting requirements you will need to make your own time to string function (and string to time). Otherwise you can use the time formatting like: %t[hh:mm tt] online help
If it is unencrypted then wireshark is useful for showing which request caused it to fall over.
They are defined by the standard, so I usually just Google for OPC UA 0x80010000
The hint about the consuming application path being invalid suggests the class instance attribute does not match for the consumer. If I compare your two configs, you have: Scanner: O-->T Instance = 0x65 Adapter: AdapIn_Scanout Instance = 0x66 Now the 'O' is Originator, and is the one that opens the connection. I would try swapping the two instance IDs in your scanner config.
Hehe, you chopped the message! "... Class 1 Connections as Target not supported." So you would not be able to add the CODESYS as a slave (i.e. Target) to the third party PLC. But you can have Class 1 Connections as Originator (a.k.a. Scanner). I would say it is more of an info message than an error. If you do want the functionality of CODESYS as both Class 1 Target and Class 1 Originator, you must add the two Devices under the Ethernet Device: Ethernet/IP Scanner and Ethernet/IP Adapter. For troubleshooting,...
FB_Init happens when you boot up the application. ARRAY [0..ArrLen] OF INT; happens at compile time. What you are looking at is allocating (and hopefully deallocating memory during runtime). This is described in "B.)"here: https://help.codesys.com/webapp/fb_factory;product=LibDevSummary;version=3.5.15.0
Yes. As you can imagine, the runtime is multithreaded.
Hello, View > Devices or Alt+0 or maybe your window locations have been messed up, in which case you can reset it with: Window > Reset Window Layout Ian
You need to have selected the PFC200 in Device > Communication Settings.
Hi @skyefire, By default, no values are transferred to the %I and from the %Q areas, unless they are used somewhere in the code. If you really want to see them even though they are not used in the code, you can in the IO mapping tab, change the "Alway Update Variables" to "Enabled 1".
Hello you three, I hope you are all well. If you like documentation then you're going to love documentation documentation! It's documentation for documentation! https://help.codesys.com/webapp/documentation;product=LibDevSummary;version=3.5.15.0 I do not know if this was publicly documented 7 years ago, which answers the real question why no-one copied and pasted a link to the online help until today.
Which language are you using? In SFC you right click one of the objects and select insert macro after. For ST, you would right click in the device tree and add an action or method. Really this works for any of the languages.
Are you in simulation mode? This only works when not in Simulation mode. You can use the Soft PLC that comes with the IDE installer. Just start it from the Systray.
Ah ok. I guess a REAL value will still work as good, I just find it strange to use a REAL when I will never have any decimal places. Here is another one, which does exactly the same thing as the first. PROGRAM PLC_PRG_1 VAR Format : WSTRING := "RUNA%05d"; ID : UDINT := 254; wsBatchID : WSTRING := "UNDEFINED"; END_VAR //Requires StringUtils library StuSprintfW( wstFormat:= ADR(Format), pVarAdr:= ADR(ID), udiVarType:= __SYSTEM.TYPE_CLASS.TYPE_UDINT, pBuffer:= ADR(wsBatchID), dwBufferSize:= SIZEOF(...
Why is your batchid a real, if you only have integer values? Anyway, for a REAL you can do: PROGRAM PLC_PRG VAR Format : WSTRING := "RUNA%05.0f"; ID : REAL := 254.0; wsBatchID : WSTRING := "UNDEFINED"; END_VAR //Requires StringUtils library StuSprintfW( wstFormat:= ADR(Format), pVarAdr:= ADR(ID), udiVarType:= __SYSTEM.TYPE_CLASS.TYPE_REAL, pBuffer:= ADR(wsBatchID), dwBufferSize:= SIZEOF(wsBatchID));
Does possible to use the same RPI as a Edge Gateway and run the application? (in other words: connect RPI direct to Automation Server without a PC with Edge Gateway). Yes, it is OK to install the Edge Gateway on the same Raspberry as a CODESYS Control for Raspberry Pi SL or MC SL.
In the Update Edge Gateway tool, there is a button to enable config mode.
Hello. Standard is a closed source library, so you will not be able to go to the exact place. You can use Menu > View > Call Stack to see where in YOUR code the last call was. The screenshot shows it was a watchdog exception, which comes on when your task runs for longer than it should. I think you have guessed correctly that the problem was your timer in a loop.
You might have to enable device diagnostics:
Try using sysMem instead of sysmem23. I imagine you only get that message in simulation mode in your 64-bit IDE, right? If you need to use simulation mode with 32-bit controllers, you can use the 32-bit version of the IDE, or shuffle your libraries so you aren't using the ones that only support 32-bit controllers, like sysmem23 does.
With SP17 (March 2021 maybe?) the modbus TCP slave device will ignore the unit-ID, if a serial gateway is not enabled. So you will be able to use any unit-id you like. Currently Unit-ID 0 (really a broadcast to all addresses) and Unit-ID 255 work. I am curious, do you have some modbus-master device, which cannot use unit-id 0 nor 255?
Hello, I saw this post about it https://www.linkedin.com/posts/codesys_codesys-activity-6742429821541855232-l5m2 So previously Control SL 3.5.16.0 would be released at the exact same time as IDE 3.5.16.0 This meant that if there was an urgent bug, you would have to wait until 3.5.16.10 is released before the fix is received. With 4.0.0.0 they have decoupled the Control SL, so they can release whenever they want.