The new TwinCAT 4026 will add those default parameters, as TwinCAT drinks from Codesys I guess that will be implemented soon (or maybe, it already is given what tvm says in the previous post).
Hello all, I am working in a project in which there are multiple Modbus TCP slaves. I need to be able to change the IP addresses of those devices from the HMI and I was planning to use the process depicted here: https://faq.codesys.com/display/CDSFAQ/Modbus+TCP+Slave%3A+Dynamic+Setting+of+the+IP+Address I can see the port number is what is used to specify which slave device we want to modify the IP address of. This said, can I freely set arbitrary port numbers to each device? I mean, can I set the...
Hi all, Is it possible to hide or show tabs from the PLC code? I have created a few tabs in my visualizations to configure the program behavior, I'd like to be able to hide some of them if the related option in the main tab has been disabled. Is that possible? if so, how should I do it? Thank you all in advance.
OK, just found out I can just set simulation mode on in my project and then VISU works flawlessly.
Yep, that works well. Thanks for posting!
Hello all, Mistakenly I thought the integer value was working while it is not. corrected the question... Codesys 3.5 sp15 patch 1 (64 bits) here. Let's say I have an alarm A with: DIGITAL observation type DETAILS: "arr[3].arrfb[1,1].bFault = TRUE" MESSAGE: "text %s more text." LATCH VAR: myString And an alarm B With: DIGITAL observation type DETAILS: "arr[12].bFault = TRUE" MESSAGE: "text %d more text." LATCH VAR: myInteger In the alarm table I get the right alarms. The B type alarm show "text %d...
Hello all, Let's say I have an alarm A with: DIGITAL observation type DETAILS: "arr[3].arrfb[1,1].bFault = TRUE" MESSAGE: "text %s more text." LATCH VAR: myString And an alarm B With: DIGITAL observation type DETAILS: "arr[12].bFault = TRUE" MESSAGE: "text %d more text." LATCH VAR: myInteger In the alarm table I get the right alarms. The B type alarm show "text 123 more text." because myInteger value is 123. The A type alarm show "text %s more text." even the myString value is "abc". Is Codesys capable...
2 months ago I posted this and nobody answered. The project is the same, how come libraries are a problem then? Do I need a license to test the HMI in my own development PC? Should I remove all libraries and start adding them from scratch? How do you cope with this kind of problem? Thank you all.
Hello all, Lately I've been working in a project where visualizations are used extensively. The target PLC is an embedded display/PLC all-in-one device. I've got some strange behavior in the program (sure it's my fault) and I need to test it at the office. As I can't connect to the usual target PLC I've copied the program and updated the device to Codesys Control Win V3 x64 but when I rebuild the project I am getting 502 errors coming from the libraries included. i.e. The library 'element collections...
Hello all, I am working with a few IFM devices connected to an edgecontroller (a PLC from IFM). I have a problem in the second device (or maybe something in the first device is killing the first communication variable of the second one). The first device A is different than the second one B. The second device B is giving me several REAL values. Teh second device B has 17 modbus channels configured. 8 input channels (information I get from sensors) and then 10 output channels (values I can send to...
Hello all, I am working with a few IFM devices connected to an edgecontroller (a PLC from IFM). I have a problem in the second device (or maybe something in the first device is killing the first communication variable of the second one). The first device A is different than the second one B. The second device B is giving me several REAL values. Teh second device B has 17 modbus channels configured. 8 input channels (information I get from sensors) and then 10 output channels (values I can send to...
Hello all, I am working with a few IFM devices connected to an edgecontroller (a PLC from IFM). I have a problem in the second device (or maybe something in the first device is killing the first communication variable of the second one). The first device A is different than the second one B. The second device B is giving me several REAL values. Teh second device B has 17 modbus channels configured. 8 input channels (information I get from sensors) and then 10 output channels (values I can send to...
Hello all, I am working with a few IFM devices connected to an edgecontroller (a PLC from IFM). I have a problem in the second device (or maybe something in the first device is killing the first communication variable of the second one). The first device A is different than the second one B. The second device B is giving me several REAL values. Teh second device B has 17 modbus channels configured. 8 input channels (information I get from sensors) and then 10 output channels (values I can send to...
Well, it seems I can't activate that, BUT, I can double click any tab and then VOILΓ it becomes a floating tab... ^^Β‘
Hi all, I am working in a project which requires me to check multiple windows at once. I have 2 external monitors and I would like to be able to drag an editor to another monitor vie right clicking the editor tab and selecting FLOAT to drag that new window to the other monitor. In my Codesys IDE I can't do this. It is disabled. How can I enable it? Codesys 3.5 SP15 patch 1 64bit. As always, thank you in advance.
Found the better way: just use the condition to multiply the font color and if the text is '' then I can BOOL_TO_INT the condition (1) and * it for the transparent font color + BOOL_TO_INT (0) the <> '' condition to * it for the black font color without transparency. :)
Hello all, I have a series of rectangles emulating a table control. 6 columns x 6 rows. Odd rows are white background and even rows are grey (mimicking a table too). This said, this gets populated automatically, and the first column has the name of the item and the other columns have the values related to that item. Sometimes not all the rows are filled and the item name (first column) is an empty string ('') which looks like an empty cell. But all the other columns show "0.00000": Name Value 1 Value...
Hello all, I have a series of rectangles emulating a table control. 6 columns x 6 rows. Odd rows are white background and even rows are grey (mimicking a table too). This said, this gets populated automatically, and the first column has the name of the item and the other columns have the values related to that item. Sometimes not all the rows are filled and the item name (first column) is an empty string ('') which looks like an empty cell. But all the other columns show "0.00000": Name Value 1 Value...
Thanks for your comment @ludecus, in any case, I'm very familiar with pointers and use them extensively in my daily basis, but it's not the solution I'm after now. Thanks again.
Hi all, Gosh, just noticed I've placed this in the wrong section... it should be in the Visualization section, if any moderator could move it... Thanks. I am using a combobox array to select a text. Not a super complicated thing, but. In case after touching the combobox to unfold the list with all texts, I can't just close it clicking somewhere else without selecting an item. That will force me to add an "No selection" as an option to be selected. Is it possible to cancel the selection after showing...
Hi all, I am using a combobox array to select a text. Not a super complicated thing, but. In case after touching the combobox to unfold the list with all texts, I can't just close it clicking somewhere else without selecting an item. That will force me to add an "No selection" as an option to be selected. Is it possible to cancel the selection after showing the combobox list? If so, how can I do it? Thank you all.
@tvm it seems that you can't pass myArray[3] (from your example code) into a function that expects to get an array of 10 INTs. Not a big deal, but seems strange.
Answering myself just in case other people gets stuck here: I should have declared the array like this: arrRawData : ARRAY [1..6] OF ARRAY[1..38] OF WORD; Then my syntax does not make the compiler to go nuts. So it is solved.
Hello all, I am working on a program in which I have declared one two dimensional array like this: arrRawData : ARRAY [1..6,1..38] OF WORD; This array holds 38 words of raw data for 6 machine parts. I need to pass the second dimension array to a function: FUNCTION myDataReceiverFunction : BOOL VAR_INPUT arrRawDataWords : ARRAY[1..38] OF WORD; END_VAR ... But, when I try to call the function like this: myDataReceiverFunction(arrRawData[1]); The compiler alerts me that: Cannot convert type 'WORD' to...
A label to overlay the table is not a good option as the table has a vertical scroll bar. Thanks anyway for your answer dkugler.
Sure I will! :D:D:D:D I really had no idea. I will finish this work and then I will try it. Thanks.
I wish I could, but the device I am working on now is not compatible with it... persistent area is not working as expected and it gets downsized to an extent I can't use the PLC. Clearly it's the device manufacturer's fault but this forces me sticking to SP15. :( Looking at raw numbers the AMD processor should be more than enough but who knows. Well, thanks again for your posts.
Hi h-hermsen, With "improving responsiveness" I mean reducing the time you spend watching the display waiting for the program to end doing silent things. When I have written "slow" I meant I fail to see why the processor and resources of my computer are almost idle and I am waiting for the program to do something. I am compiling, not trying to connect to a device... so it's only Codesys and the computer what is involved here. I guess those compiling operations are sub-optimized, but I wanted to ask...
Hello all, Codesys 3.5 sp15 patch 1. I got a new computer recently: Thinkpad P14s Gen 2 AMD. Ryzen 7 5850U. 32GB RAM dual channel. 2TB SSD SAMSUNG EVO PLUS (NVME PCIe 3.0 x4). Laptop is plugged and the performance profile is "Maximum performance". Windows 10 pro x64. Even with that thing, compiling times are slow while the used resources are below 20%. Can Codesys responsiveness be improved somehow? PS: It can't be a CPU throttling issue as temperatures are low. As always, thank you in advance.
Hello all, Codesys 3.5 sp15 patch 1. I have several tables that are used to fill arrays of structures with values (to configurate a machine parameter set). I would like to know if it is possible to replace the table row header (1, 2, 3, 4...) for a text from a text list. That way I would be able to set a text the operator would understand. I know I could set a string into the structure and show it as the first column, but that struct is used extensively in the code for 6 tables more which don't need...
SUPER! Thank you very much Marcel!
Hello all, I must show the alarms in the Alarm configuration on VISU. I have a structure like: arrA1 : ARRAY[1..50] OF FB1; And FB1 has a variable named bFault. I must therefore create one line for each array position, but I guess / hope I could use an array and automate the message to be shown. Currently I can create an alarm group, and add observation type digital, add each array position = TRUE and add the message... Can I make all the alarms of that array at once? Is that possible? and if it...
Hello all, I'm making a project in whihc I have to show and edit a lot of values inside an array of structures: the structure has 3 reals inside: ST_DATA_ITEM { rFault : REAL := 0.0; rWarning : REAL := 0.0; rMinimum : REAL := 0.0; } And the array of structures: arrdataToShowAndModify : ARRAY[1..50] OF ST_DataItem; This makes a table (in the visualization) with 50 rows and 3 columns which is perfect. This said, how can I edit the values when touching them? I've been trying to find how to do it for...
OK, solved... in TWinCAT you MUST put the variable you want to connect to any IO channel as %I / %Q or similar... it looks like in Codesys you MUST NOT. After reading the message slowly (good for me) I've been able to solve it and now I can directly assign the structure to the beginning of the Modbus channel. ^^Β‘
Hello all, INTRODUCTION Started using Codesys this week, been using TWinCAT for years though. Programming is not an issue given my background, but the configuration part changes a little and I have a doubt about the ModbusTCPSlave I/O Mapping. I have to communicate the PLC (Modbus TCP master) to a small device (slave) which will send me 1 BYTEs, 1 WORDs, 1 BYTEs and 15 REALs (64 bytes or 32 words in total). I have put all those variables are inside a structure: TYPE ST_MODBUS_DATA_FROM_DEVICE_1 :...
Hello all, INTRODUCTION Started using Codesys this week, been using TWinCAT for years though. Programming is not an issue given my background, but the configuration part changes a little and I have a doubt about the ModbusTCPSlave I/O Mapping. I've got some information from the manufacturer of the device I'm programming and the device will send me 1 BYTEs, 1 WORDs, 1 BYTEs and 15 REALs (64 bytes or 32 words in total). Those variables are inside a structure: TYPE ST_MODBUS_DATA_FROM_DEVICE_1 : STRUCT...
Hello all, INTRODUCTION Started using Codesys this week, been using TWinCAT for years though. Programming is not an issue given my background, but the configuration part changes a little and I have a doubt about the ModbusTCPSlave I/O Mapping. I've got some information from the manufacturer of the device I'm programming and the device will send me 1 BYTEs, 1 WORDs, 1 BYTEs and 15 REALs (64 bytes or 32 words in total). Those variables are inside a structure: TYPE ST_MODBUS_DATA_FROM_DEVICE_1 : STRUCT...