Search talk: var static

 
<< < 1 .. 3 4 5 6 7 8 > >> (Page 5 of 8)

Post by talhaali on Active alarm access in ST CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Can't read Alarm Class from Alarm Storage CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Can't read Alarm Class from Alarm Storage CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Can't read Alarm Class from Alarm Storage CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Active alarm access in ST CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Alarm Manager: CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Alarm Table Issues CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Alarm status in logic CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by thommy54 on Raspi-Cam: CameraStream.project nicht zum Laufen zu bringen CODESYS Forge talk (Post)
Hallo, Ich bringe das CameraStream.project nicht zum Laufen. Ich sehe die Ursache darin, das das Beispielprogramm sehr sparsam mit Programm-Kommentaren umgeht (von der Hilfe gar nicht zu reden). Ich habe beide Varianten bei der zu ändernden Zielvariable getestet: //copy video.htm to the webserver; //the location of the webserver depends on the used Apache version as mentioned in online help hDirHtmlTest:=SysDirOpen( szDir:='/var/www', pDirInfo:= ADR(dirInfo), diMaxDirEntry:=iMaxDirEntry, szDirEntry:=szDirEntry, pResult:=ADR(iDirHtmlError)); IF (iDirHtmlError = 0) THEN SysDirClose(hDir:=hDirHtmlTest); SysFileCopy('/var/www/video.htm', '$$PlcLogic$$/Application/video.htm', ADR(dwCopySize)); ELSE .... als auch hDirHtmlTest:=SysDirOpen( szDir:='/var/www/html', pDirInfo:= ADR(dirInfo), diMaxDirEntry:=iMaxDirEntry, szDirEntry:=szDirEntry, pResult:=ADR(iDirHtmlError)); IF (iDirHtmlError = 0) THEN SysDirClose(hDir:=hDirHtmlTest); SysFileCopy('/var/www/html/video.htm', '$$PlcLogic$$/Application/video.htm', ADR(dwCopySize)); ELSE .... Die Url-Streams habe ich gelassen wie sie vorgegeben waren: urlStream := CONCAT('http://', CONCAT(sIPAddress, '/video.htm')); urlPicture := CONCAT('http://', CONCAT(sIPAddress, '/cam_pic.php')); In der Webvisu im Browser komme ich maximal dahin wie im Screeshot Video_Visu_1 zu sehen. Also scheint der Link zu video.htm zu klappen. Das der zu cam_pic.php nicht klappt, wundert mich nicht, denn es existiert nicht und wird auch nicht evtl. am rechten Ort angelegt. Ich bin mir vollkommen im Unklaren: muss da was auf dem Raspberry Pi im Hintergrund laufen , z.B. raspivid . Welcher Programmteil bedient die Cam ? Ich erkenne auch nicht, wo ein einzelnes picture entstehen soll. Wäre dankbar, wenn ich hier etwas Hilfe bekommen könnte. Evtl. gibt es Probleme mit der von mir verwendeten Codesys-Version 3.5.20.1 ? Ich benutze einen Raspberry 4 Rev.1.2. Grüße Thomas
Last updated: 2024-07-04

Post by timvh on Configuring a 2's compliment CODESYS Forge talk (Post)
You could create a DUT of the Type Union and add an array of 2 bytes + an Int. Then write the byte values in the array of the Union and read the Int. Or VAR iInt : INT; byHigh : BYTE := 2#1111_1111; byLow : BYTE := 2#1111_1111; END_VAR iInt := TO_INT(byHigh*16#100 + byLow);
Last updated: 2024-09-28

Post by timvh on Converting each character to a string into ASCII CODESYS Forge talk (Post)
Nice puzzle for a Saturday afternoon :-). Here my suggestion: VAR sInput : STRING := 'R123'; byChar : BYTE; sOutput : STRING; i: INT; END_VAR sOutput := ''; IF LEN(sInput) = 0 THEN RETURN; END_IF FOR i := 0 TO LEN(sInput) - 1 DO byChar := sInput[i]; sOutput := Concat(sOutput, TO_STRING(byChar)); END_FOR
Last updated: 5 days ago

Post by ihatemaryfisher on Sorting array of any-sized structure CODESYS Forge talk (Post)
With that I could make an array of varying size, but would still have to define the array type in the function's declaration VAR_IN_OUT stArray: array [*..*] of <pre-defined data type> END_VAR I wanted a function that could take an array of any type (e.g., a structured VAR) as an input. That way I could call it in multiple POUs to handle different arrays structures.
Last updated: 2023-08-18

Post by siggi95 on Übersetzungsfehler J1939 changeAdress (4.1.0.0) CODESYS Forge talk (Post)
Hallo zusammen, für den Aufruf VAR deviceDiag: J1939.IJ1939LocalECU; END_VAR deviceDiag.ChangeAddress(5); gibt es mit der Version 4.1.0.0 der Lib IoDrvJ1939 Übersetzungsfehler - C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'deviceDiag.ChangeAddress' erwartet - C0004: 'ChangeAddress' ist keine Komponente von 'IJ1939LocalECU__Union' Mit der bisher verwendeten Lib-version 3.5.17.0 nicht und auch das Setzen der device adress hat funktioniert. Lt. Release notes ("J1939: ChangeAddress method does not work properly.") wurde hier verbessert. Leider habe ich keine Beschbreibung dazu gefunden. Wie muss der Aufruf angepasst werden? Vieeln Dank und beste Grüße Siggi
Last updated: 2023-11-29

Post by voffi on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
There are some ways. One is to use SHR and SHL and it depends on your byte order in the data array. For Motorola byte order: PROGRAM PLC_PRG VAR u : UINT; byte_array_in : ARRAY [1..8] OF BYTE := [16#11, 16#12, 16#13, 16#14, 16#15, 16#16, 16#17]; byte_array_out : ARRAY [1..8] OF BYTE; END_VAR u := SHL(TO_UINT(byte_array_in[2]), 8) + TO_UINT(byte_array_in[1]); byte_array_out[1] := TO_BYTE(u); byte_array_out[2] := TO_BYTE(SHR(u, 8)); If it's Intel byte order just change 1 and 2 in the array indexes.
Last updated: 2023-12-07

Post by nz-dave on Bool turning on in case stament in wrong state? CODESYS Forge talk (Post)
I have a case statement running a process. during one of the steps it has started calling a bool var that is 2 steps further on in the case? i have even tried //commenting it out but it still turns on at the same point in the case. i have also run a trace but cant see anything that would trigger it. Any Ideas? Cheers
Last updated: 2023-12-15

Post by rodberna on Library for arrays CODESYS Forge talk (Post)
Hi, I'm creating a program where I need to handle arrays, like: - Declare lenght variable arrays - [array(1..var) of "sometype"]. This is not possible in pure codesys, right? - Know array lenght, min, max, avg values in runtime - append/delete itens in an array - and so on Is there a library know for this in codesys. Is it possible to build our own libraries using some high level language like python or java script?
Last updated: 2024-01-10

Post by wehling-h on PI Input value CODESYS Forge talk (Post)
Hi geoweil, have you tried to save changed values to remanent area or using a VAR RETAIN? After restart you have to initialize Counter with last remanent value. Depending on changes per cycle and the possibilitiy of your control unit to write remanent storage. Otherwise you need a buffering system to ensure save backup of last PI_Counter value. May you could read this Thread to get further help: https://forge.codesys.com/forge/talk/Engineering/thread/31e1c8349e/#bf48
Last updated: 2024-01-12

Post by wiresplus on INT_TO_WORD function not working CODESYS Forge talk (Post)
Hello, I need to take an INT input, and convert it to a WORD value. VAR DRV2Speed : WORD; //IO card takes a WORD where 16000 = full 10V output (equivalent to 50Hz) PumpFillSpeed : INT; //Users enter a value between 0 and 50 END_VAR IF <conditions> THEN DRV2Speed :=INT_TO_WORD((PumpFillSpeed/50)*16000); END_IF </conditions> According to me this should work - but it stays at 0, no matter what. What am I doing wrong?
Last updated: 2024-01-26

Post by rpostwvu on Shared Memory Access Issues CODESYS Forge talk (Post)
I got the shared memory example. I'm pretty sure I'm successfully created a memory space, CreateResult returns 18. szName:='CodesysDataShare'; hShm := SysSharedMemoryCreate(szName, 0, ADR(uxiSize), ADR(CreateResult)); I'm trying to access this memory with a C# application, but I get "Unable to Find Specified File". I suspect that Codesys and/or Visual Studio code alters the name I choose? Being in Windows, I cant find a way to see the mapped memory list. ~~~ using (var mmfRead = MemoryMappedFile.OpenExisting("CodesysDataShare",MemoryMappedFileRights.ReadWrite)) ~~~
Last updated: 2024-01-29

Post by richard-wang on Codesys recipe manager - what does it do? CODESYS Forge talk (Post)
Hi All Thanks for sharing this information. For whom may not know why always get error code 16#4000 or 16#4002 while performing Recipe commands, the root cause is There is a line need to be inserted in CODESYSControl.cfg file, which is PlaceholderFilePath.1=/var/opt/codesys/PlcLogic/ I am using Pi, therefore the above path is set to my pi unit, after adding above line to my cfg file, all the Recipe commands work fine. But I still do not know how and when this file got modified though.
Last updated: 2024-04-29

Post by fless on FB having single input but initialized with Array CODESYS Forge talk (Post)
Why will it retain the sum value from the last call? This is how PLC work. Usually variables only get initialized after a download or a reset (i.e. power loss). RETAIN variables are saved in a special kind of RAM and keep their value after a power loss. To initialize variables on every call of your FB use the VAR TEMP block. VAR_TEMP sum : INT; END_VAR
Last updated: 2024-05-07

Post by paro on send appliaction files to wago plc (codesys 3.5) via ssh CODESYS Forge talk (Post)
Hi, it is enough to copy the files to /home/codesys/PlcLogic/Application and adding the lines [CmpApp] Application.1=Application to the eRUNTIME.cfg, if your Application in your program is also called "Application". Reboot -> Bootapp should be loaded. If not please check the log /var/log/runtime.log There should be a line which explains why the bootproject is not loaded.
Last updated: 2024-05-29

Post by talhaali on Create an alarm list without use of Alarm config CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Create an alarm list without use of Alarm config CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by rafael on Access to user group IDs CODESYS Forge talk (Post)
Hello, I'm trying to access the group IDs of the connected user. "CurrentUserGroupId" var shows only the first group ID that the user is assigned, I need the other group IDs that the user is in. I find some structs but I can't find where they are used, like "VUM_User" scruct from visuusermgmt, where can I find this vars? https://content.helpme-codesys.com/en/libs/VisuUserMgmt2%20Interfaces/Current/VUM_User.html abyUserGroupIDs seens perfect but I can't find a GVL where it is used.
Last updated: 2024-07-08

<< < 1 .. 3 4 5 6 7 8 > >> (Page 5 of 8)

Showing results of 187

Sort by relevance or date