Activity for Ton

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi, I guess you don't have the right xml file. Download Beckhoff_EtherCAT_BKxxx_MDP.zip from https://download.beckhoff.com/download/configuration-files/io/ethercat/xml-device-description and install these in Device Repository.

  • Ton Ton posted a comment on discussion Deutsch πŸ‡©πŸ‡ͺ

    Ich habe das gleiche problem. Losch mal die '.precompile cache’ datei und ΓΆffne dass project. Ich habe dan keine fehler meldung und kann ohne probleme online.

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    If you use LTIME() you will be very accurate and be able to have a normal task cycle time.

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi, i guess you want to make a hour counter. You need to store the measured value. Try to use a retain variable, but need a graceful shutdown, or save it your self. see https://forge.codesys.com/forge/talk/Runtime/thread/278e325579/ Succes.

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    One i wrote this to measure elepse time When xMeasure is true is starts en when false it stops and time is messured. FUNCTION_BLOCK FB_ElapseTime VAR_INPUT xMeasure: BOOL; END_VAR VAR_OUTPUT xRisingEdge: BOOL; xFallingEdge: BOOL; tElapsed: TIME; ltElapsed: LTIME; ltPrev_Elapsed: LTIME; ltElapsedMax: LTIME; END_VAR VAR xLastValue: BOOL; LTIMEStart: LTIME; LTIMEEnd: LTIME; tonReset: TON:= (IN:= TRUE, PT:= TIME#30S0MS); END_VAR ------------------------------------------- xRisingEdge:= (xLastValue XOR...

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    You have to declare some inputs. declaration: SdoRead_RU01: ETC_CO_SdoRead; wRU01: WORD; code: SdoRead_RU01( xExecute:= , usiCom:= 1, //index of master 1: first ETC master uiDevice:= DRIVE_400U1.PhysSlaveAddr, wIndex:= 16#2C01, bySubindex:= 16#00, udiTimeOut:= 500, pBuffer:= ADR(wRU01), szSize:= SIZEOF(wRU01));

  • Ton Ton posted a comment on discussion Visualization πŸ‡¬πŸ‡§

    This solution takes a lot of performance. When for example two alarm bits comes at the same time the second has a delay of few seconds. I quess my visu do also get translated, so not a good solution. For now i just take default language.

  • Ton Ton posted a comment on discussion Visualization πŸ‡¬πŸ‡§

    Hi Kislov, This is what i was looking for. Many thanks!!!

  • Ton Ton posted a comment on discussion Visualization πŸ‡¬πŸ‡§

    Hi Ludecus, Thanks for your input. With this function i have the same problem. I want a specific language ('en') and not the activated language (might be unreadable if 'jp'). I don't thinks this function exist. Thanks, Ton.

  • Ton Ton posted a comment on discussion Visualization πŸ‡¬πŸ‡§

    Hi, For my logger i need to get the text from 'en' language. To see items in my logger in Japanese or polisch doesn't tell me much. To get the text from the Text list i use cmpDynamictext library: sText:= cmpDynamictext.DynamicTextGetText(ADR(sAlarmGroup), ADR(sAlarmID))^; //Get name, language dependent sDefaultText:= cmpDynamictext.DynamicTextGetDefaultText(ADR(sAlarmGroup), ADR(sAlarmID))^; //Get default name The easy way is to put the 'en' text in the default, but this is my alarm ID. Is there...

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    ulSize?

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    What is you're pbyBuffer and ulSize in SysComRead?

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    To convert this number to bytes you can use an Union. TYPE UN_Test : UNION dwValue: DWORD; arrValue: ARRAY[0..3] OF BYTE; END_UNION END_TYPE

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    How large is you're receive buffer? I quess it is an array of 16 bytes.

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    If TCPRead2_MessageRX is a STRING you have to end it with a null terminator. Try: IF fbTcpRead2.xReady THEN //Add this line TCPRead2_MessageRX[fbTcpRead2.szCount]:= 0;//End terminator TCPRead2_loop:=TRUE; TCPRead2_MessageTemp:=TCPRead2_MessageRX; ....

  • Ton Ton posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi, My solution: Create program: PROGRAM Ethercat_INode VAR pApp: POINTER TO CmpApp.APPLICATION; result: RTS_IEC_RESULT; xInit: BOOL:= TRUE; xRestartApp: BOOL; //Visu END_VAR VAR RETAIN xAutoRestart: BOOL; END_VAR IF xInit THEN pApp:= AppGetCurrent(pResult:= result); xInit:= FALSE; xAutoRestart:= FALSE; END_IF IF xRestartApp THEN xRestartApp:= FALSE; CmpApp.AppReset(pApp:= pApp, usResetOption:= CmpApp.RTS_RESET); xAutoRestart:= TRUE; END_IF Create function: FUNCTION SysEvent_StopDone : DWORD VAR_INPUT...

  • Ton Ton posted a comment on discussion Runtime πŸ‡¬πŸ‡§

    I think you should change the token. There might be a problem with the string you send. Maybe you have to encode it with the FUNCTION URLDecoder. I use webclient sl now. Changes are: change: HTTPClient: HTTP.HttpClient; with webClient: WEB_CLIENT.WebClient:= (udiTimeOut:= 50000000, eRequestType:= WEB_CLIENT.REQUEST_TYPE.POST); and change: sTitle:= CONCAT(STR1:= '&title=', STR2:= title); with sTitle:= CONCAT(STR1:= '&title=', STR2:= WEB_CLIENT.URL_ENCODE_STRING(pbIn:= ADR(title))); and change: sMessage:=...

  • Ton Ton posted a comment on discussion Engineering

    I'm working on a Ethercat commissioning and diagnose program. Making good progress but i have one issue. I cannot get the name of the slave in the device tree. For now i manage it by a little python script who enumerates the devicetree names but this is not very reliable because the enumeration of the tree is not always sequentially. Any advice is welcome. Thanks, Ton.

  • Ton Ton posted a comment on discussion Engineering

    Maybe you can use System Events. https://help.codesys.com/webapp/_cds_obj_task_config_sys_event;product=codesys;version=3.5.15.0

1