Please find in attachement. Oryginally I have only one Ethernet devices. Now, can I do two devices "Ethernet" and "Ethernet_f" with the same adress ip my PFC200 controller ? In this way devices under "Ethernet" will be with 200ms cycle time , and devices under "Ethernet_f" will be scanned with 10ms ? Configuration like in attachements ,should I sense?
Please find in attachement. Oryginally I have only one Ethernet devices. Now, can I do two devices "Ethernet" and "Ethernet_f" with the same adress ip my PFC200 controller ? In this way devices under "Ethernet" will be with 200ms cycle time , and devices under "Ethernet_f" will be scanned with 10ms ? Configuration like in attachements ,should I sense?
I have three tasks: -MainTask - 200ms -rfid_task - 10ms -task_50ms - 50ms In this application: -communicate with 8 modbus slaves by embeded COM port, -communicate with 8 modbus slaves by gate (Modbus TCP - RTU.) -I use about 60 psyhical IO, -I sending a lot of SMS. -I share variables by Symbol Configuration Object to HMI Weintek My wago: 750-8207, I wonder why in Device -> Bus cycle task I have "unspecyfied"? Is it OK ?
I have three tasks: -MainTask - 200ms -rfid_task - 10ms -task_50ms - 50ms In this application: -communicate with 8 modbus slaves by embeded COM port, -communicate with 8 modbus slaves by gate (Modbus TCP - RTU.) -I use about 60 psyhical IO, -I sending a lot of SMS. -I share variables by Symbol Configuration Object to HMI Weintek My wago: 750-8207, I wonder why in Device -> Bus cycle task I have "undefined"? Is it OK ?
I have three tasks: -MainTask - 200ms -rfid_task - 10ms -task_50ms - 50ms In this application: -communicate with 8 modbus slaves by embeded COM port, -communicate with 8 modbus slaves by gate (Modbus TCP - RTU.) -I use about 60 psyhical IO, -I sending a lot of SMS. -I share variables by Symbol Configuration Object to HMI Weintek My wago: 750-8207, I wonder why in Device -> Bus cycle task I have <unspecyfied>? Is it OK ?</unspecyfied>
I have three tasks: -MainTask - 200ms -rfid_task - 10ms -task_50ms - 50ms In this application: -communicate with 8 modbus slaves by embeded COM port, -communicate with 8 modbus slaves by gate (Modbus TCP - RTU.) -I use about 60 psyhical IO, -I sending a lot of SMS. -I share variables by Symbol Configuration Object to HMI Weintek My wago: 750-8207,
Probably I have bad cycles settings. Not optimated to my application. I prepared cycles settings to my device like in atatchement . @eschwellinger what do you think about this ? So I don't understand what will be cycle time Pfc200bus ? you can explain it to me?
Probably I have bad cycles settings. Not optimated to my application. I prepared cycles settings to my device like in atatchement . @eschwellinger what do you think about this ?
Probably I have bad cycles settings. I prepared cycles settings to my device like in atatchement . @eschwellinger what do you think about this ?
So, If in Wago PFC200 internal bus (attachment set 1.jpg) I set "Use parent bus cycle setting", that it is from a cycle : Device->PLC Setting -> Bus cycle task?
can code optimization help?
Hi, In my application in Codesys I have to high % CPU - about 60%. What can I do to decrease usage CPU ? My project is not big - look in atatchement. what can generate high CPU load?
Hi, In my application in Codesys I have to high % CPU - about 60%. What can I do to decrease usage CPU ? My project is not big - look in atatchement. what can generate high CPU load?
I was using firefox-esr but worked much worse. I came back to chromium browser: @chromium-browser --kiosk --start-fullscreen --incognito --disk-cache-size=1 --app=http://localhost:8080/webvisu.htm In my application on this webbrowser the memory rise about 4% around the clock. So I restarting webbrowser everyday on midnight (takes up to about 5 seconds). To this function I use script: 1 2 3#!/bin/bash pkill -o chromium chromium-browser --kiosk --start-fullscreen --incognito --disk-cache-size=1 --app=http://localhost:8080/webvisu.htm...
Hi, I have two variables: sStr: STRING(1024); wsStr: WSTRING(1024); When I use function STRING_TO_WSTRING, the wstring data are cutting. the max is 255 ? is other function to convert string to wstring more then 255?
It works! I forgot set my global variable GPL_JSON_16 in edited above line. Now it works.
Both HMIVarAsString and AsString have truncated characters.
sorry my fault, now it works. but still cuts characters. For example I put WSTRING: 艁艢臉贸艣u膮Q贸艣艢艅艅N艃 but after Parase in JSON variable is : "艁艢臉贸艣u膮Q贸[" what can still limit the length of the variable?
ok, now it works. but still cuts characters. For example I put WSTRING: 艁艢臉贸艣u膮Q贸艣艢艅艅N艃 but after Parase in JSON variable is : "艁艢臉贸艣u膮Q贸[" what can still limit the length of the variable?
ok, now it works. but still cuts characters. For example I put WSTRING: 艁艢臉贸艣u膮Q贸艣艢艅艅N艃 but after Parase in JSON variable is : "艁艢臉贸艣u膮Q贸["
udiCount:= (_Size+1) * 2 this line does not affect the result at all
udiCount:= (_Size+1) * 2 ta linia nie wp艂ywa w og贸le na wynik
Effect is like in attachement. Last special characters in "description" variable are bad decode ...
Effect is like in attachement. Last characters are bad decode ...
In new function WSTRING_TO_JSONVALUE I have like you wrote. In property JSONVAR_16.CharString: {attribute 'monitoring':='call'}PROPERTY CharString : WSTRING(GPL_JSON_16.MAX_VALUE_SIZE) JSONVAR_16.CharString.Get: VAR TempVar: WSTRING(255); END_VAR SysMemCpy( pDest:= ADR(TempVar), pSrc:= ADR(_InternalValue), udiCount:= _Size+1 ); CharString:= TempVar; JSONVAR_16.CharString.Set: _ValueType:= JSONVALUETYPE_16.json_wstring; _Size:= INT_TO_UINT(WLEN(CharString)); //clear memory SysMemSet( pDest:= ADR(_InternalValue),...
In new function WSTRING_TO_JSONVALUE I have like you wrote. In property JSONVAR_16.CharString: {attribute 'monitoring':='call'}PROPERTY CharString : WSTRING(GPL_JSON_16.MAX_VALUE_SIZE) JSONVAR_16.CharString.Get: SysMemCpy( pDest:= ADR(TempVar), pSrc:= ADR(_InternalValue), udiCount:= _Size+1 ); CharString:= TempVar; JSONVAR_16.CharString.Set: _ValueType:= JSONVALUETYPE_16.json_wstring; _Size:= INT_TO_UINT(WLEN(CharString)); //clear memory SysMemSet( pDest:= ADR(_InternalValue), udiValue:= 0, udiCount:=...
In new function WSTRING_TO_JSONVALUE I have like You write, but I in property JSONVAR_16.CharString: {attribute 'monitoring':='call'}PROPERTY CharString : WSTRING(GPL_JSON_16.MAX_VALUE_SIZE) JSONVAR_16.CharString.Get: SysMemCpy( pDest:= ADR(TempVar), pSrc:= ADR(_InternalValue), udiCount:= _Size+1 ); CharString:= TempVar; JSONVAR_16.CharString.Set: _ValueType:= JSONVALUETYPE_16.json_wstring; _Size:= INT_TO_UINT(WLEN(CharString)); //clear memory SysMemSet( pDest:= ADR(_InternalValue), udiValue:= 0,...
it's better with this change. In HMIVarAsWStrin I have all data from variable, but in AsWString is still to small. Please find in attachement.
it's better with this change. In HMIVarAsWStrin I have all data from variable, but in AsWString is still to small.
According with described above logic, I created JSONVAR_16 and change like this: {attribute 'pack_mode' := '4'} {attribute 'reflection'} {attribute 'symbol' := 'none'} FUNCTION_BLOCK JSONVAR_16 VAR_INPUT Names: ARRAY[1..GPL_JSON_16.MAX_LEVELS] OF JSONVARNAME_16; //variable path as an array. [1] is variable name, [2..x] are higher level structures END_VAR VAR {attribute 'instance-path'}{attribute 'noinit'} {attribute 'hide'}_VarNameFull: WSTRING(GPL_JSON_16.MAX_VAR_NAME); //JSON name uses the variable...
I do not can edit library. In my project create structs, fb, fun with with a "_ 16" note to the original name. My global variables : GPL_JSON_16 and ther I chcnege value.
I increased this values but without effect. Actually it is a number of WORD : NameStringPtr: POINTER TO ARRAY[1..GPL_JSON_16.MAX_VAR_NAME] OF WORD; OR {attribute 'monitoring':='call'}PROPERTY AsWString : WSTRING(GPL_JSON_16.MAX_VALUE_SIZE)
When Iuse HMIVarAsWString variable is better, but still not full values in variables
When I increased MAX_FILE_SIZE is better, but still not full values in variables
You talking about this function ?: FUNCTION WSTRING_TO_JSONVALUE VAR_INPUT In_WString: WSTRING; Out_JSON: POINTER TO JSONVAR_16; END_VAR VAR TempBool: BOOL; TempReal: REAL; TempInt: DINT; TempString: WSTRING(255); END_VAR IF (Out_JSON^.ValueType = JSONVALUETYPE_16.json_null) THEN //if the type is not explicitly configured, make a guess at the type IF ISINTEGER_16(ADR(In_WString)) THEN Out_JSON^.ValueType:= JSONVALUETYPE_16.json_integer; ELSIF ISNUMBER_16(ADR(In_WString)) THEN Out_JSON^.ValueType:=...
I rewrited all Your library changing all STRING datatypes to WSTRING, and change functiona like LEN, DELETE etc to WLEN, WDELETE etc ... and partially works. It looks like that finde the tag's but it have a problem witch data lenght. For example it is my test data in WSTRING JSON: {"id":25,"Tag":"RRWWQQAAQQ","description":"艁艢臉贸艣u膮Q贸艣艢","comment":"test1"} After parsing I have good data but not all length - please find in attachement ... Any idea what should i change ?
For tests I will change only BYTE to WORD like you said, but in my STRUCT's (NewJSONObj) I won't use JSONVAR only WSTRING. And calling ParseJSON would be: ParseJSON( Execute:= EXECUTE_JSON_DATA, JSONString:= ADR(http_sys.hTTPClient_0.httpResult.wsContent), JSONStringSize:= SIZEOF(http_sys.hTTPClient_0.httpResult.wsContent), JSONVars:= ADR(NewJSONObj), NumberOfVars:= SIZEOF(NewJSONObj) / SIZEOF(WSTRING) ); What do you think ? it enought ?
For tests I will change only BYTE to WORD like you said, but in my STRUCT's (NewJSONObj) I won't use JSONVAR only WSTRING. And calling ParseJSON would be: ParseJSON( Execute:= EXECUTE_JSON_DATA, JSONString:= ADR(http_sys.hTTPClient_0.httpResult.wsContent), ///tu zmiana na wstring JSONStringSize:= SIZEOF(http_sys.hTTPClient_0.httpResult.wsContent), ///tu zmiana na wstring JSONVars:= ADR(NewJSONObj), NumberOfVars:= SIZEOF(NewJSONObj) / SIZEOF(WSTRING) ); What do you think ? it enought ?
In library is: {attribute 'displaymode':='hex'}JSONString: POINTER TO ARRAY[1..GPL_JSON.MAX_JSON_STRING] OF BYTE; //pointer to JSON string I should change to: {attribute 'displaymode':='hex'}JSONString: POINTER TO ARRAY[1..GPL_JSON.MAX_JSON_STRING] OF WORD; //pointer to JSON string Ho change it in library function ? It is no edited ...
Someone tried Parse JSON from WSTRING by PRO_JSON library ?
When I use .wsContent teh JSON Parse doesn't work. In JSON struct we not have a WSTRING data , only STRING. Please find in attachement. I use PRO_JSON library: https://forge.codesys.com/lib/pro-json/home/Home/
When I use .wsContent teh JSON Parse doesn't work.
Hi, I have a problem. I get data from http get request in JSON format. When I use http_sys.hTTPClient_0.httpResult.wsContent (WSTRING) everything with chars (UTF-8) is ok. But for the needs JSON Parse I must use http_sys.hTTPClient_0.httpResult.sContent (STRING) data and in this case I have problem with Polish characters. After parse I create variables to print on HMI(webvisu): description:= STRING_TO_WSTRING(NewJSONObj.description.AsString); And the result is that I have no Polish characters. How...
Hi, I have a problem. I get data from http get request in JSON format. When I use http_sys.hTTPClient_0.httpResult.wsContent (WSTRING) everything with chars (UTF-8) is ok. But for the needs JSON Parse I must use http_sys.hTTPClient_0.httpResult.sContent (STRING) data and in this case I have problem with Polish characters. After parse I create variables to print on HMI(webvisu): description:= STRING_TO_WSTRING(NewJSONObj.description.AsString); And the result is that I have no polisch characters. How...
Hi, I have a problem. I get data from http get request in JSON format. When I use http_sys.hTTPClient_0.httpResult.wsContent (WSTRING) everything with chars (UTF-8) is ok. But for the needs JSON Parse I must use http_sys.hTTPClient_0.httpResult.sContent (STRING) data and in this case I have problem with Polish letters. After parse I create variables to print on HMI(webvisu): description:= STRING_TO_WSTRING(NewJSONObj.description.AsString); And the result is that I have no polisch letters. How resolve...
Hi, I have a problem. I get data from http get request in JSON format. When I use http_sys.hTTPClient_0.httpResult.wsContent (WSTRING) everything with chars (UTF-8) is ok. But for the needs JSON Parse I must use http_sys.hTTPClient_0.httpResult.sContent (STRING) data and in this case I have problem with Polish letters. After parse I create variables to print on HMI(webvisu): description:= STRING_TO_WSTRING(NewJSONObj.description.AsString); And the result is that I have no polisch letters. How resolve...
so, what should I do on event the power failure to keep my values ?
Hi, I need one variable and array to writ臋, read during program working and remember them after power failure, so I create Persistentvars: {attribute 'qualified_only'} VAR_GLOBAL PERSISTENT RETAIN mem_trans_arr: ARRAY[0..99, 0..1] OF STRING; id_trans:BYTE; END_VAR Read and write form my PLC_PRG works fine. But after restart/ turn off my RPi and run my variable and array are empty , why ?
Now I tests firefox-esr. I should run kiosk mode in this way on firefox: @firefox -kiosk -private-window http://localhost:8080/webvisu.htm OR @firefox -kiosk -private-window http://localhost:8080/webvisu.htm & ?
Looks like after a few days of work in the browser in RPi there is a lack of resources, because: -from codesys I can login -I can't login to Pi by SSH Probably problem with web browser cache. Oryginally I run my app by command: @chromium-browser --kiosk --start-fullscreen http://localhost:8080/webvisu.htm Now I try run in incognito mode, with command: @chromium-browser --kiosk --start-fullscreen --private-window --app=http://localhost:8080/webvisu.htm @eschwellinger - Can you think that can be solution...
Looks like after a few days of work in the browser in RPi there is a lack of resources, because: -from codesys I can login -I can't login to RPi by SSH Chrome webbrowswer can insert something into ram? It is possible to resolwet this problem ?
So far, 12h works without a problem ... We are still waiting Do you know any PLC working with Codesys with two or more RS232 - where all ports are programmed by SysCom form Codresys ?
I do not see any errors. It is possible to export logger ? In attachments I send three screen but without errors... On another browswer I will check next time.
Hi, I done my HMI+PLC apllication on RPi using - ComfilePi - Industrial Raspberry Pi Panel PC. It possible that this soultion provide work stability on web browser ? http://comfilewiki.co.kr/en/doku.php?id=comfilepi:codesys:codesys7 I run my application. Works perfectly for several hours, but next day my browser page is suspended. the reason can be is the browser? what do you guys think?
some example of your own slider?
Is it possible to change color in slider element ?
right
Hi, How can I do countdown timer in codesys visualization ? Example please find in attachement.
Hi, Haw can I do countdown timer in codesys visualization ? Example please find in attachement.
Thanks, but what do you think about other conversion. I would like to change byte array :0x44, 0x44, 0x46, 0xFF, 0xFF on string value : '444446FFFF' ? How do this ?
So, maybe have you idea how convert this 1D Array : ASCIIarray : STRING(255) := 'AFDFAFFFFF'; to 2D ARRAY: ASCIIarray2 : ARRAY[0..0, 0..4] OF STRING := ['AF', 'DF', 'AF', 'FF', 'FF']; ?
So how do I pass a single character from string to my function named: ASCIIstring_TO_BYTE?
... This examle works: byteMy:=ASCIIstring_TO_BYTE('A','F'); But in this example is problem: VAR ASCIIarray:STRING:='DFAFFF0001'; bytes_array: ARRAY[0..100] OF BYTE; END_VAR FOR iCount:=0 TO 10 DO IF (iCount MOD 2) = 0 THEN bytes_array[iCountTT] := ASCIIstring_TO_BYTE((ASCIIarray[iCount]),(ASCIIarray[iCount+1])); iCountTT:=iCountTT+1; END_IF END_FOR The error is: Cannot convert type 'BYTE' to type 'STRING(1)' ... Function STRING_TO_BYTE not resolved problem. How do I pass one character from STRING...
... This examle works: byteMy:=ASCIIstring_TO_BYTE('A','F'); But in this example is problem: VAR ASCIIarray:STRING:='DFAFFF0001'; bytes_array: ARRAY[0..100] OF BYTE; END_VAR FOR iCount:=0 TO 10 DO IF (iCount MOD 2) = 0 THEN TLV_bytes_array[iCountTT] := ASCIIstring_TO_BYTE((ASCIIarray[iCount]),(ASCIIarray[iCount+1])); iCountTT:=iCountTT+1; END_IF END_FOR The error is: Cannot convert type 'BYTE' to type 'STRING(1)' ... Function STRING_TO_BYTE not resolved problem. How do I pass one character from STRING...
My temporary solution: FUNCTION ASCIIstring_TO_BYTE : BYTE VAR_INPUT InputVal1: STRING(1); InputVal2: STRING(1); END_VAR VAR CharAsByteH:BYTE; CharAsByteL:BYTE; state1:BYTE; state2:BYTE; END_VAR state1 := 0; state2 := 0; IF InputVal1 = '0' THEN state1 := 1; END_IF; IF InputVal1 = '1' THEN state1 := 2; END_IF; IF InputVal1 = '2' THEN state1 := 3; END_IF; IF InputVal1 = '3' THEN state1 := 4; END_IF; IF InputVal1 = '4' THEN state1 := 5; END_IF; IF InputVal1 = '5' THEN state1 := 6; END_IF; IF InputVal1...
My temporary solution: FUNCTION ASCIIstring_TO_BYTE : BYTE VAR_INPUT InputVal1: STRING(1); InputVal2: STRING(1); END_VAR VAR CharAsByteH:BYTE; CharAsByteL:BYTE; state1:BYTE; state2:BYTE; END_VAR state1 := 0; state2 := 0; IF InputVal1 = '0' THEN state1 := 1; END_IF; IF InputVal1 = '1' THEN state1 := 2; END_IF; IF InputVal1 = '2' THEN state1 := 3; END_IF; IF InputVal1 = '3' THEN state1 := 4; END_IF; IF InputVal1 = '4' THEN state1 := 5; END_IF; IF InputVal1 = '5' THEN state1 := 6; END_IF; IF InputVal1...
Hi, Please help me how create the function to convert STRING variable e.g: 'AFDA0909090909' to byte array: 0xAF, 0xDA, 0x09, 0x09, 0x09, 0x09, 0x09 ?
Someone have a library to encode TLV data to Codesys?
Hi, Someone have use Type鈥搇ength鈥搗alue coding in Codesys ? I need function to decode data from string. Someone heard about similar solution?
I done something like this. It works. But probably it not an optimal solution: //timeout to receive complete message tonRcv(IN:= (iCountG>0) AND NOT tonRcv.Q, PT:=T#20S); IF hCom <> RTS_INVALID_HANDLE AND bReadCom THEN // Complete the data numberOfbytes := SysComRead(hCom:= hCom, pbyBuffer:= ADR(temp_rdData), ulSize:= SIZEOF(temp_rdData), ulTimeout:= 100, pResult:= ADR(Result)); IF numberOfbytes > 0 THEN FOR iCount :=0 TO numberOfbytes-1 DO rdData[iCountG]:=temp_rdData[iCount]; iCountG:= iCountG...
Hi, I try do communication on RS232. I do write Data but I have a problem with read Data. Someone can hel me with code to read data form RS232 ? In the following code: VAR rdData: ARRAY[0..41] OF BYTE; //buf END_VAR IF hCom <> RTS_INVALID_HANDLE AND bReadCom THEN // Read data dwRead := SysComRead(hCom:= hCom, pbyBuffer:= ADR(rdData), ulSize:= SIZEOF(rdData), ulTimeout:= 100, pResult:= ADR(Result)); IF dwRead > 0 THEN ///?? END_IF bReadCom:=FALSE; END_IF I would like save bytes to my bufor beggining...
Hi, Where I can download AgavaLibraries ?
Hi, I have module 750-653 serial interface. Anybody can give me a example of use this module in Codesys V3.5 ? For example how send several bytes and recive ?
Any idea? when I extend cycle time to 200ms that everything is ok. Do you have any ide how come back to 10ms cycle time and recive all bytes form UART?
works perfectly
Hi, What is the best way to recognize pulses digital input with 20ms width in ST ? Timer (TON) to measure state time this input ?
Any idea?
It is other problem - not a wrong order of bytes. I should wait for all bytes, how do this in above example ?
Hi I tried communication with serial port device with SysCom library. I was read four bytes like this : IF hCom <> RTS_INVALID_HANDLE AND bReadCom THEN //Read data dwRead := SysComRead(hCom:=hCom,pbyBuffer:=ADR(byteRead), ulSize:=SIZEOF(byteRead), ulTimeout:=100, pResult:=ADR(Result)); END_IF I get the bytes but still in bad order. What should I do to get byte in appropriate order?
It works: //JSON // JSON data container jsonDataFactory : JSON.JSONDataFactory; // Factory to create a JSONData function block. pJSONData : POINTER TO JSON.JSONData := jsonDataFactory.Create(); // Result of Create is a pointer to JSONData // Reader JSONByteArrayReader_0: JSON.JSONByteArrayReader; xRead : BOOL; xFindValue : BOOL; exampleData : WSTRING(1024) := "{$"dev$": $"HOUSE-RR$", $"id$": 66,$"com$": $"OPEN DOOR$",$"val$":9,$"uid$": $"6655334455$"}"; wsKey : WSTRING := "id"; FindFirstValueByKey_0:...
My soultion: POU: (one of them row) 27 for example: my_fb1 (pNumberChecked:= ADR(checked_options[27,0 ]) ); FB: VAR_INPUT pNumberChecked: POINTER TO BOOL; END_VAR VAR ii: BYTE:=0; phone_Nr_checked:ARRAY[0..2] OF BOOL ; END_VAR FOR ii := 0 TO 2 BY 1 DO phone_Nr_checked[ii] := pNumberChecked[ii]; END_FOR;
I can't change 2D ARRAY. They are a data form SCADA. Too much work. What do you think about below solution ? FB: FUNCTION_BLOCK my_fb VAR_INPUT pNumberChecked: POINTER TO ARRAY[0..2] OF BOOL; END_VAR POU: VAR checked_options : ARRAY[0..199, 0..2] OF BOOL := [200(0),3(0)]; my_fb : my_fb1; END_VAR For example, one of row (25) transfer to FB : my_fb1 (pNumberChecked:= ADR(checked_options[25,0])) will it work ?
My FB: FUNCTION_BLOCK my_fb VAR_INPUT pNumberChecked: POINTER TO BOOL; END_VAR In POU: VAR checked_options : ARRAY[0..199, 0..2] OF BOOL := [200(0),3(0)]; my_fb : my_fb1; END_VAR my_fb1 (pNumberChecked:= ADR(checked_options[0, .. ]) ); Is posssible in this way assign only one row to my FB instance ?
Hi, I have this two dimensional array in main POU: checked_options : ARRAY[1..200, 1..3] OF BOOL := [200(0),3(0)]; How can I send to my function block only one row from my array (in FB i would like to 1D ARRAY)in short notation ? checked_options[1,1] , checked_options[1,2] and checked_options[1,3] ....
I did as you said. Please find in atatchement. But I still do not know how get variables form JSON to my program in ST ? Can you give me a hints ?
Hi, I would like to convert my STRING data exampleData (writed according with JSON format) to JSON format. I would like to get easly access form Codesys to data in JSON format ... What I done wrong ? Please find in attachement my example. Regards
Now you can adds channel to communicate with your slave Modbus RTU by modbus function 3,4,6,16 etc .... (look on attachment4)
If you want communicate with Modbus RTU slave by Modbus TCP you should connected RS485 to device server and Ethernet to yours Codesys device. Next in codesys you should add Ethernet adapter (IP addres like you use to connect by Codesys environment- look on attachement1), next add Modbus TCP Master (look on attachement2), next you can add several Modbus TCP Slave's. For example if you want communicate with slave 9600/8 / N / 1 and number 2, you should add add Modbus TCP Slave like in attachement3....
If you want communicate with Modbus RTU slave by Modbus TCP you should connected RS485 to device server and Ethernet to yours Codesys device. Next in codesys you should add Ethernet adapter (IP addres like you use to connect by Codesys environment- look on attachement1), next add Modbus TCP Master (look on attachement2), next you can add several Modbus TCP Slave's. For example if you want communicate with slave 9600/8 / N / 1 and number 2, you should add add Modbus TCP Slave like in attachement3....
Do you want use modbus RTU encapsulation on Ethernet ? Or do you want use modbusRTU <=> modbus TCP ? This can be do by MGAte MOXA devices (rich solution). Recently I used cheap solution (https://pl.aliexpress.com/item/32903944684.html) This can be work in both mention configuration. In attachements I send example how I do communication with modbus RTU Slave by Modbus TCP.
I runned my application like "Modbus TCP Master" together with MODBUS TCP to MODBUS RTU gateway. Works great. I have next device with RS485. This device send automatically data frame - 20 bytes periodically. To read this device I can use 750-653 module ? How can read all frame when I have only 4 bytes in receive data in my conffiguration -please find in attachement.
So I have a problem. I must have several Modbus Master. Please tell me if is available in Codesys store some library to using Modbus Master RTU over TCP. I have a MOXA devices work as port server with RS485 (TCP<->RS485). Is it some a simple way send Modbus RTU command by TCP from Codesys ?
So, is it available some module on that i can doing second modbus master RTU?
Look on the 'print screen' in attachment. One of the article in internet (but polish language) is described that it is possible. What do you think?
So how can I use Modbus Master RTU on this module ? Several weeks ago I use PFC200 but wago runtime , programed by eCocpit and I had two this modules. First of them had COM2, and second of them had COM3 number. Why is not possible in Codesys Runtime ?
Please help. I should somethig edit in /etc/CODESYSControl.cfg file ? But what ?
any news ? where can I check com port number ?
Actually I use RS485 (Modbus Master RTU) build in CPU on PFC200 and it is assigned as COM1, but COM4 I use to GSM modem. So I wonder how identify COM number my new module (750-653), I should do this by enter in to linux console on my PFC200 ?
Hi, I added new module 750-653 (RS485). I would like to add to my project new Modbus RTU Master but I do not have which one number COM is assigned to new module ? How check it ?
Hi, Last week I updated runtime and codesys environment to 3.5.16.20 After week work , my PLC has stop. Probably the reason for the detention wasby exceptions like in attachments. What can be wrong ?