Search talk: code compile

 
<< < 1 .. 45 46 47 48 49 .. 54 > >> (Page 47 of 54)

Post by eozupek on problem con file transfer in raspberry CODESYS Forge talk (Post)
I recently acquired the Opus B4 product from topcon company and encountered a "code 7" error in the Web Visu File Transfer application. I have been unable to locate the CFG files mentioned above. However, I have been able to perform streaming. I would appreciate your assistance in resolving this issue. Sincerely, Emre öZÜPEK
Last updated: 2024-09-03

Post by dkugler on User management CODESYS Forge talk (Post)
If the PLC is equieped with a USB socket it's possible to copy the user management file via IEC code to a USB stick and restore it at the new plc. The file is located there: /PlcLogic/visu/app_visuusermgmtdb.csv I use this to reset the user management to default in case of the customer has changed passwords and lost it.
Last updated: 2024-09-04

Post by david3278 on Advice on OOP hardware I/O code structure CODESYS Forge talk (Post)
For anyone struggling with electrical engineering assignment help, I highly recommend seeking professional assignment help. These services offer expert guidance on complex topics like circuit analysis, power systems, and electronics. They can save you time, improve your understanding, and help you meet tight deadlines. Great option for ensuring high-quality work and better grades.
Last updated: 2024-09-30

Post by egau on Hard shutdown: no code on device after power on CODESYS Forge talk (Post)
Hi, thanks for the fast response :) Yes I Have a .err file. Sorry I forgot to upload it. It is a binary file though... "Runtime goes in exception before the shutdown ?" I think it goes into exception at the same time as the power is lost...
Last updated: 2024-10-03

Post by davidmic on What is this ST syntax? CODESYS Forge talk (Post)
I found some structured text code which contained this statement: bHidden:= TRUE(*NOT _somevariable*) I haven't seen TRUE() used like a function before, and I also haven't seen the enclosing asterisks * * before. What do they do? (sorry if this is a duplicate question, I don't know what words to use to search for this syntax)
Last updated: 2024-10-11

Post by csu-chris on No file found CODESYS Forge talk (Post)
I'm having trouble getting started with the SysFile library. I tried copying and running the code found here: https://forge.codesys.com/forge/talk/Engineering/thread/f17c3d0e64/ Every time I try to run the file handle pointer returns: 16#FFFFFFFFFFFFFFFF <dereference of="" invalid="" pointer=""></dereference> I can see the file when I look in the Device -> Files window Any idea what I'm doing wrong?
Last updated: 2024-10-15

Post by js123 on csv datei einlesen und verarbeiten CODESYS Forge talk (Post)
hallo zusammen, bin leider in codesys ein absoluter Neuling, brauche deshalb ein wenig Hilfe Ich möchte gern eine Excel-CSV Datei in codesys einlesen und die Daten weiter verarbeiten. Kann mir jedemand diesbezüglich helfen bzw. zeigen wie man vorgehen muss oder hat jemand sogar schon einen fertigen Code?! Grüße und Dankeschön
Last updated: 2024-10-28

Post by pixsys on loading delay with the option "check client animations and overlay of native elements" CODESYS Forge talk (Post)
Hi, the option "Support client animations and overlay of native elements" needs a very powerful graphics accelerator in the system. I'm using the Pixsys srl "TC series" HMI with the code "P3" (so a 4+4 cores CPU) that runs very well also with this option active.
Last updated: 2024-11-06

Post by bertcom on Converting each character to a string into ASCII CODESYS Forge talk (Post)
@TimvH, Thank you, i think this way i can seperate the complete string to characters. Next part of the topic is converting the characters to an ASCII code. Is there an standerd function in Codesys for this? I alredy searched a few hours for it on the internet. no succes.
Last updated: 4 days ago

Post by ragarcia on Error while using UpdateConfiguredIPSettings to change IP address CODESYS Forge talk (Post)
Hello everyone, I am trying to change dynamically by code the IP address of a Weidmuller controller. So I am basically using IoDrvEthernet library to use UpdateConfiguredIPSettings function but I am getting constantly the 'INVALID_STATE' error. Even though I am following a procedure it should work: * First I added on the config file of codesys the following: [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpAndMask=1 Adapter.1.Name="eth1" Adapter.1.EnableSetIpAndMask=1 * Secondly I am first disabling the ethernet interface by using Ethernet_0.Enable = FALSE and then executing DED.Reconfigure. After that, I run the Ethernet_1.updateConfiguredIPSettings Code: Ethernet_1.Enable:= EnableDisable; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1, xError=> ErrorReconfigure, eError=> ErrorCodeReconfigure); IF Reconfigure.xDone THEN ErrorCodeIP:= Ethernet_1.UpdateConfiguredIPSettings(IPAddress:= newIP, SubnetMask:= newMask, Gateway:= newGW); END_IF IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Ethernet_1.Enable:= TRUE; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1); IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Can someone help me? Thank you. All I am trying is to find a way to change dynamically with code, the IP addresses of my controller (2 ethernet ports).
Last updated: 2023-12-11

Post by vipul on Multicast udp CODESYS Forge talk (Post)
Hi, Good afternoon can anybody help me with UDP Multicast code. I am not able to send or recieve data when code is dumped on linux device. Below is my code. Declaration: PROGRAM udp_multicast VAR oneTimeFlag :UINT :=0; state: INT:=0; driver: UDP.UDPDriver; //port : UDP.Port;//moved to GVL src_ipAddr_ud: UDINT; src_ipAddr_st:STRING := '192.168.127.155';//'192.168.1.155';//ipms ip address dst_ipAddr_ud:UDINT; group_ipAddr_st:STRING := '239.1.5.10'; //group_ipAddr_ud:UDINT; result: SysTypes.RTS_IEC_RESULT; //result of recieve function. bind: UDINT; //result of binding. resultCreate:SysTypes.RTS_IEC_RESULT;//result of port creation. timer:BLINK; temFlag :INT:= 0; post:INT :=0; checksumFunc:checksumXor; localStringBuf:STRING[500]; chksum:BYTE; dataBuffer:POINTER TO BYTE; checksumString:ARRAY[0..5] OF BYTE; recvSize:__XINT; errorCode:UDINT; joinGroupErrorCode:UDINT; END_VAR ************8 Implementation: IF oneTimeFlag <> 1 THEN oneTimeFlag:=1; resultCreate := driver.CreatePort(ADR(GVL.port)); src_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIPAddress:= src_ipAddr_st); GVL.group_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIpAddress:= group_ipAddr_st); GVL.port.IPAddress := src_ipAddr_ud; GVl.port.ReceivePort:= GVL.src_port;//port on which messages are expected. GVl.port.SendPort := GVL.dest_port; GVl.port.OperatingSystem := 0; //0- any system GVL.port.Socket :=3; //3- socket type is multicast bind := GVL.port.Bind(udiIPAddress:=src_ipAddr_ud,); GVl.port.JoinGroup(udiGroupAddress:= GVL.group_ipAddr_ud,udiInterfaceAddress:= src_ipAddr_ud,eLogCode=>joinGroupErrorCode); END_IF timer(ENABLE:=TRUE,TIMELOW:=T#100MS,TIMEHIGH:=T#100MS); IF timer.OUT = TRUE THEN GVL.port.Send(udiIPTo:=GVL.group_ipAddr_ud,GVL.dest_port,pbyData:=ADR(GVL.writeData),diDataSize:=SIZEOF(GVL.writeData)); ELSE SysMemSet(ADR(GVL.readData[0]),0,SIZEOF(GVL.readData)); result := GVl.port.Receive(ADR(GVL.readData),diDataSize:=SIZEOF(GVL.readData),udiIPFrom=>dst_ipAddr_ud,diRecvSize=>recvSize,eLogCode=>errorCode); SysMemMove(ADR(GVL.readDataBuf[0]),ADR(GVL.readData[0]),SIZEOF(GVL.readData)); END_IF post:=LEN(GVL.readDataBuf);
Last updated: 2024-01-14

Post by sanacfu on looking for v2.3 libraries on v3.5.19 CODESYS Forge talk (Post)
Hi all, I'm new to Codesys and Wago but well versed in Rockwell. I've been tasked with upgrading old Wago 750-880 PLCs that run Codesys v2.3. All I was giving is the original PLC program in v2.3 and the currently running machine. I've spec out to what I believe is a suitable upgrade, the PFC100 2ndGen, 750-8111. As I'm rewriting this code on the Codesys I can't find the same library functions blocks for ethernet settings PLC functions. Currently I'm working on code to get/set the PLC ethernet IP address and HMI IP addresses from the HMI screen. One other function I'm looking for is a warm reset function to the PLC. When googling for this stuff I see a lot of code not in ladder logic. Are these functions now not available to implement in ladder logic? Where can I get more information on finding and implementing this functions? Do I have to buy a license from Codesys to use these functions? The PLC I ordered should be arriving in 2-3 weeks.
Last updated: 2024-03-25

Post by kblundy on Change the Opening Position of the Dialog using VU.FbOpenDialog CODESYS Forge talk (Post)
I hope the community can help me with this. I need to use the Visu Utils FbOpenDialog to control the opening and closing of a dialog. I have the Opening and Closing working, but I can’t get the dialogue's position to be controlled. The code looks like this: PROGRAM OPEN_DIALOG VAR xOpenLatchSettingDialog : BOOL; TopLeftDialog : VisuStructPoint ; fbOpenLatchSettingsDialog : VU.FbOpenDialog ; END_VAR IF xOpenLatchSettingDialog THEN xOpenLatchSettingDialog:= FALSE ; TopLeftDialog.iX := 100; TopLeftDialog.iY := 23; fbOpenLatchSettingsDialog(sDialogName := 'visu_AlarmLatchSettings', xExecute := xOpenLatchSettingDialog , xModal := TRUE, itfClientFilter := VU.Globals.OnlyTargetVisu, pTopLeftPosition := ADR(TopLeftDialog)); CloseVisuDialog(sDialogName:= 'visu_AlarmLatchSettings'); ELSE xOpenLatchSettingDialog:= TRUE ; IF fbOpenLatchSettingsDialog.xError THEN xOpenLatchSettingDialog := FALSE; END_IF END_IF I can't seem to work out a way to make the values in TopLeftDialog.iX and TopleftDialog.iY be passed correctly in the call and for it to change the position of the dialogue box. The code is compiled, but the position has not been changed. Any guidance or suggestions for revising this code would be incredibly valuable. Your insights could be the key to solving this issue.
Last updated: 2024-05-05

Post by bschraud on Code erzeugen mit kryptischer Fehlermeldung mit GVL_Io_dd05d808 CODESYS Forge talk (Post)
Hallo, beim Codeerzeugen bekomme ich wiederholt Fehlermeldungen, bei denen nicht mit einem Klick in das betroffene Modul gewechselt werden kann. Die Fehlermeldung tritt allerdings nach "Gerät aktualisieren" nicht mehr auf. Wenn ich das Projekt speichere, Codesys schließe, anschließend Codesys wieder starte und Code erzeugen will, tritt der Fehler wieder auf: ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... [FEHLER] PAC: C0032: Typ 'Unbekannter Typ: 'ADR(GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7.Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7)'' kann nicht in Typ 'POINTER TO IoConfigParameter' konvertiert werden [FEHLER] PAC: C0077: Unbekannter Typ: 'GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7.Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7' [FEHLER] PAC: C0046: Bezeichner 'GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7' nicht definiert Kompilierung abgeschlossen -- 3 Fehler, 1 Warnungen Übersetzung abgeschlossen -- 3 Fehler, 1 Warnungen : Kein Download möglich Die Recherche nach der Bedeutung von "HPS_7" oder "GVL_Io_dd05d808" verlief leider ergebnislos. Ich habe nur einen ähnlich erscheinenden Thread gefunden, der aber nicht gelöst wurde: https://forge.codesys.com/forge/talk/Engineering/thread/0666dce94f/ Ich verwende Codesys 3.5 SP20 (64bit) mit CODESYS Control for Raspberry Pi MC SL 4.11.0.0. Alle anderen Geräte sowie die Projektumgebung sind frisch aktualisiert. Kennt jemand die Bedeutung dieser Fehler bzw. wie man sie beheben kann? Vielen Dank für die Hilfe
Last updated: 2024-05-16

Post by trusty-squire on CNC - How to manipulate SMC_GeoInfo objects CODESYS Forge talk (Post)
I have an application using CNC GCode interpolation, but I need to modify the GCode provided to the PLC based on certain parameters. I am currently attempting to modify the SMC_GeoInfo objects in the SMC_OutQueue using the code below. Note that all the other code is pretty standard and works fine, but when I add the below it errors. PROGRAM TEST VAR fbReadCncFile : SMC_ReadNCFile2; fbCncInterpreter : SMC_NCInterpreter; arrCncInterpreter : ARRAY[1..99] OF SMC_GeoInfo; pGeoInfo: POINTER TO SMC_GeoInfo; giGeoInfo: SMC_GeoInfo; // ... END_VAR // ... Some code here in order to read CNC file using SMC_ReadNCFile2 and provide to SMC_NCInterpreter pGeoInfo := SMC_GetObj(poq:=ADR(fbCncInterpreter.poqDataOut), n:=1); IF pGeoInfo <> 0 THEN giGeoInfo := pGeoInfo^; // Do some manipulation here, then update the queue at the same position MC_SetObj(poq:=ADR(fbCncInterpreter.poqDataOut) , n:=0 , pgi:=ADR(giGeoInfo) ); END_IF It throws an error when I get to the line giGeoInfo := pGeoInfo^; Error: EXCEPTION [AccessViolation] occured: App=[Sim.Device.Application], Task=[PathTask] How do I use SMC_GetObj and access the data? It creates a pointer with the value as shown in the photo, but all the dereferenced values say dereference of invalid pointer.
Last updated: 2024-07-26

Post by egau on Hard shutdown: no code on device after power on CODESYS Forge talk (Post)
Hi, We have a machine running Codesys on a Windows IPC (CODESYS Control Win v3 - x64). When we hard shutdown the machine, the code on the PLC sometimes becomes "corrupted" after a power on (When trying to login to the PLC, we get the message "The application 'Application' does not exist on device."). I've noticed these errors in the logs, but I'm not sure what to make of them. We are not using any RETAIN variables in our code, although I'm not sure about referenced librairies. (we are using the persistence manager). I'm pretty sure that not doing a graceful shutdown is the root cause of this. This being said, what is the proper way of doing a graceful shutdown? Is putting the Codesys application in "stop" sufficient? I know how to implement this, so if it works then it would be a quick fix. However, I think we need to add a UPS, which would detect power loss and inform the PLC that it needs to initiate its shutdown, and then the PLC would shutdown gracefully. Any help with this will be greatly appreciated :)
Last updated: 2024-10-03

Post by dominggus on when going online, stuck on "Syncing file "visuelemsdatetime.tl_datetime.txt" CODESYS Forge talk (Post)
Hi, We are currently using a Raspberry Pi 4 CM4 module in a EdgeBox RPI 200 - Industrial Edge Controller running the latest CODESYS Runtime Package 4.11.0.0. On the PC (actually an Intel Macbook Pro running Windows 10 in Parallels) we run CODESYS V3.5.19.50. Yesterday end of day when I was about to logoff and head home, I wanted to send the latest build to the Raspberry I clicked the Login button to compile a new version and then sync the application and all the files, it get's stuck on the last file to sync (see attached screenshot). This takes eternally, although sometimes, when I use my SFTP client (Cyberduck) and go into the raspberry and refresh the directory /var/opt/codesys/PlcLogic/visu/, or when I open the actual file visuelemsdatetime.tl_datetime.txt, it gets un-stuck (forcing a refresh, which might fix the syncing issue) and CODESYS continues and I can click the Start button to start the application. But this SFTP force refresh trick does not always help either... What could be the issue here? network connectivity? Can someone please help me out?
Last updated: 2024-03-02

Post by brubingh on Download Missing Libraries not working CODESYS Forge talk (Post)
We are working on a project and the customer required 3.5.16 BF4. After working on the project for a few weeks I opened it the next morning and it could not access libraries. IecVarAccess could not be accessed. I checked if windows updated - it did not. So no explanation for why it lost access other than that I shut down the computer for the night. Note that I am using a demo license. I still haven't figured out any reason to purchase a license. So I spent the next hour reinstalling CodeSys. Note that I did NOT uninstall first. After install I waited another 5 minutes for it to open the first time. I clicked File->Open to open the project. Previously I had selected File->Recent Projects - not sure if that makes and difference. But after this process it did open the project and compile it just fine. This is miserable. If this had happened when I went on site to a customer I would have lost hours of work doing the reinstall. Is there a different and quicker fix?
Last updated: 2024-06-13

Post by mp9876 on Problem using MeasureFrequence FB CODESYS Forge talk (Post)
Hi everyone, new at Codesys and PLC programming in general. I am using Codesys Win V3.5 SP20 I would like to measure an encoder's frequency output (obtaining that pulse train from Factory IO) and intended to use the MeasureFrequence FB (Intern/CAA/Utilities/CAA Mathematics/3.5.19.0). As mentioned in the title what I need to measure is low frequency, such as lower than 40hz (a cycle every 25mS) or so; I could even go lower frequency if required as this is for test purposes) therefore I am not expecting problem measuring a low frequency with that FB The library in question appears to be installed as I can retrieve it from the Library Repository. I can also see it from the Device's Library Manager. Problem arises when I am trying to instantiate this particular FB. I go like this: VAR MeasF:MeasureFrequence; END_VAR Please note that as soon as I start typing the "MeasureFrequence", the MeasureFrequence comes out as a viable option in auto-typing; seems to indicate that the FB is recognized somehow. But there is no way I can compile this as it comes back with the following: C0046: Identifier 'MeasureFrequence' not defined. Tried to rename that to ABC instead of MeasF; same issue. Possibly that the library is not properly installed ? Placeholder ? I would greatly appreciate a bit of guidance if possible. Thank you and regards, Mike
Last updated: 2024-06-24

Post by to-ke on Errors with VisuUserManagement library CODESYS Forge talk (Post)
Hallo zusammen, hi all, ich habe den gleichen Fehler. Auf einem Raspberry Pi geht der Fehler weg, wenn ich alles bereinige und dann vollständig übersetze. Wenn das Projekt im Codesys Development System wieder neu geladen wird ist der Fehler aber wieder da. Mit eine Win V3 x64 PLC kann ich den Fehler nur unterbinden wenn ich auf der HMI das VUM_Login einbinde. Dieses brauche ich aber nicht, da ich die HMI für das User Management selbst gestaltet habe. Das funktioniert auch. I have the same error. On a Raspberry Pi the error goes away if I clean everything and then compile completely. When the project is reloaded in the Codesys Development System, the error returns. With a Win V3 x64 PLC I can only prevent the error if I integrate the VUM_Login on the HMI. But I don't need this because I designed the HMI for user management myself. That works too. Anyone have an idea to fix this problem. Many thanks
Last updated: 2024-07-09

Post by mogam on Internal error:System.NullReferenceException: The object reference was not set to an object instance. CODESYS Forge talk (Post)
Hi everyone, I have a my App that reads values from a shared memory than 2 variables x,y were calculated. here as you can see in my code: PROGRAM PLC_PRG VAR szName : STRING := '/SM'; ( Name of the shared memory.) uxiSize : __UXINT := 646 * 2 * SIZEOF(REAL); ( Size of the shared memory. ) hShm : RTS_IEC_HANDLE; ( Handle to the shared memory ) pStart : POINTER TO REAL; ( Pointer to the first element in the memory ) pData : POINTER TO REAL; ( Pointer, which is incremented until the last sign in the memory is reached. ) shared_data :ARRAY[0..645, 0..1] OF REAL; velocity : ARRAY[0..2] OF REAL; ( Velocity array ) position : ARRAY[0..2] OF REAL; ( Position array ) angleDepth : ARRAY[0..645, 0..1] OF REAL; ( Angle and depth array ) xEndOfMemory : BOOL; x : ARRAY[0..645] OF REAL := 1.0; y : ARRAY[0..645] OF REAL := 1.0; (* Result of actions at the memory. *) OpenResult : RTS_IEC_RESULT; ReadResult : RTS_IEC_RESULT; PointerResult : RTS_IEC_RESULT; DeleteResult : RTS_IEC_RESULT; CloseResult : RTS_IEC_RESULT; i : INT; END_VAR ( Open the shared memory ) hShm := SysSharedMemoryOpen2(szName, 0, ADR(uxiSize), ADR(OpenResult)); IF hShm <> RTS_INVALID_HANDLE THEN (* Read the entire shared memory table *) SysSharedMemoryRead(hShm:= hShm, ulOffset:= 0, pbyData:= ADR(shared_data), ulSize:= uxiSize, pResult:= ADR(ReadResult)); (* Fetch the pointer from the shared memory. The pointer is pointing to the first element address *) //pStart := SysSharedMemoryGetPointer(hShm, ADR(PointerResult)); (* Close the shared memory *) //CloseResult := SysSharedMemoryClose(hShm := hShm); (* Read velocity and position data from the shared memory *) FOR i := 0 TO 2 DO velocity[i] := shared_data[i, 0]; position[i] := shared_data[i, 1]; END_FOR; (* Read angle and depth data from the shared memory *) FOR i := 0 TO 645 DO angleDepth[i, 0] := shared_data[(i + 6), 0]; angleDepth[i, 1] := shared_data[(i + 6), 1]; END_FOR; FOR i := 0 TO 645 DO x[i] := angleDepth[i, 1]*COS(angleDepth[i, 0]); y[i] := angleDepth[i, 1]*SIN(angleDepth[i, 0]); END_FOR; END_IF For these values an XY-CHART needs to be done and when i create a visualisation and set the x data and y data when i try to compile, i recieve this error: ------ Übersetzungslauf gestartet: Applikation: Device.Read_App ------- Code typisieren ... [FEHLER] Internal error:System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei _3S.CoDeSys.LanguageModelManager.LDateType.Accept(ITypeVisitor typvis) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IArrayType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei _3S.CoDeSys.Compiler35140.Compiler.(_ICompileContext , _IPreCompileContext , _ICompileContext , IProgressCallback ) bei _3S.CoDeSys.Compiler35140.Compiler.(_ICompileContext , Boolean , Boolean , _IPreCompileContext , _IPreCompileContext , _ICompileContext , Boolean , Boolean& , IProgressCallback ) bei _3S.CoDeSys.Compiler35140.Compiler.(Guid , Boolean , Boolean , Boolean , Boolean& , _ICompileContext& , _ICompileContext& , IProgressCallback , Boolean , Boolean ) Kompilierung abgeschlossen -- 1 Fehler, 0 Warnungen Übersetzung abgeschlossen -- 1 Fehler, 0 Warnungen : Kein Download möglich!
Last updated: 2024-05-24

Post by mogam on Internal error:System.NullReferenceException: The object reference was not set to an object instance. CODESYS Forge talk (Post)
Hi everyone, I have a my App that reads values from a shared memory than 2 variables x,y were calculated. here as you can see in my code: PROGRAM PLC_PRG VAR szName : STRING := '/SM'; ( Name of the shared memory.) uxiSize : __UXINT := 646 * 2 * SIZEOF(REAL); ( Size of the shared memory. ) hShm : RTS_IEC_HANDLE; ( Handle to the shared memory ) pStart : POINTER TO REAL; ( Pointer to the first element in the memory ) pData : POINTER TO REAL; ( Pointer, which is incremented until the last sign in the memory is reached. ) shared_data :ARRAY[0..645, 0..1] OF REAL; velocity : ARRAY[0..2] OF REAL; ( Velocity array ) position : ARRAY[0..2] OF REAL; ( Position array ) angleDepth : ARRAY[0..645, 0..1] OF REAL; ( Angle and depth array ) xEndOfMemory : BOOL; x : ARRAY[0..645] OF REAL := 1.0; y : ARRAY[0..645] OF REAL := 1.0; (* Result of actions at the memory. *) OpenResult : RTS_IEC_RESULT; ReadResult : RTS_IEC_RESULT; PointerResult : RTS_IEC_RESULT; DeleteResult : RTS_IEC_RESULT; CloseResult : RTS_IEC_RESULT; i : INT; END_VAR ( Open the shared memory ) hShm := SysSharedMemoryOpen2(szName, 0, ADR(uxiSize), ADR(OpenResult)); IF hShm <> RTS_INVALID_HANDLE THEN (* Read the entire shared memory table *) SysSharedMemoryRead(hShm:= hShm, ulOffset:= 0, pbyData:= ADR(shared_data), ulSize:= uxiSize, pResult:= ADR(ReadResult)); (* Fetch the pointer from the shared memory. The pointer is pointing to the first element address *) //pStart := SysSharedMemoryGetPointer(hShm, ADR(PointerResult)); (* Close the shared memory *) //CloseResult := SysSharedMemoryClose(hShm := hShm); (* Read velocity and position data from the shared memory *) FOR i := 0 TO 2 DO velocity[i] := shared_data[i, 0]; position[i] := shared_data[i, 1]; END_FOR; (* Read angle and depth data from the shared memory *) FOR i := 0 TO 645 DO angleDepth[i, 0] := shared_data[(i + 6), 0]; angleDepth[i, 1] := shared_data[(i + 6), 1]; END_FOR; FOR i := 0 TO 645 DO x[i] := angleDepth[i, 1]*COS(angleDepth[i, 0]); y[i] := angleDepth[i, 1]*SIN(angleDepth[i, 0]); END_FOR; END_IF For these values an XY-CHART needs to be done and when i create a visualisation and set the x data and y data when i try to compile, i recieve this error: ------ Übersetzungslauf gestartet: Applikation: Device.Read_App ------- Code typisieren ... [FEHLER] Internal error:System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei _3S.CoDeSys.LanguageModelManager.LDateType.Accept(ITypeVisitor typvis) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IArrayType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IPointerType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei ..(_ISignature , _IPreCompileContext ) bei ..( ) bei ..(String ) bei ..(String , IVariable[]& , ISignature[]& ) bei ..(String , IVariable[]& , ISignature[]& , IScope& ) bei ..visit(_IVariableExpression , AccessFlag ) bei ..(_IUserdefType ) bei ..(_IVariable , IScope5 , _ICompileContext , _ISignature ) bei ..(_ISignature , IScope5 , _ICompileContext ) bei _3S.CoDeSys.Compiler35140.Compiler.(_ICompileContext , _IPreCompileContext , _ICompileContext , IProgressCallback ) bei _3S.CoDeSys.Compiler35140.Compiler.(_ICompileContext , Boolean , Boolean , _IPreCompileContext , _IPreCompileContext , _ICompileContext , Boolean , Boolean& , IProgressCallback ) bei _3S.CoDeSys.Compiler35140.Compiler.(Guid , Boolean , Boolean , Boolean , Boolean& , _ICompileContext& , _ICompileContext& , IProgressCallback , Boolean , Boolean ) Kompilierung abgeschlossen -- 1 Fehler, 0 Warnungen Übersetzung abgeschlossen -- 1 Fehler, 0 Warnungen : Kein Download möglich!
Last updated: 2024-05-24

Post by rossanoparis on After un upgrade of "CODESYS Control for Raspberry Pi MC SL" from v4.7 to v4.9 SysFileOpen function stopped working CODESYS Forge talk (Post)
For those who will step on this thread. Everything is fine, I had only to increase by 1 my place holders number. For sure the system is occupying the number 1 without being declared ... Below the modification I made to get my code working. [SysFile] PlaceholderFilePath.2=/home/pi/hpca/bin, $hpcabin$ PlaceholderFilePath.3=/home/pi/hpca/cfg, $hpcacfg$ PlaceholderFilePath.4=/home/pi/hpca/logs, $hpcalogs$ PlaceholderFilePath.5=/home/pi/hpca/resources, $hpcares$
Last updated: 2023-08-22

Post by e60newbie on NETVAR_UDP CODESYS Forge talk (Post)
Hallo Forums Gemeinde, hat jemand von euch eine Idde ob und wie es möglich sein könnte die Einstellungen was für die Netzwerk variablen Liste nötig sind, also Broadcast IP, Port usw., über die Application einzustellen? Ich müsste je nach Projekt immer die IP anpassen, da auf den Anlagen die Software Identisch bleibt, wäre es für mich viel einfache diese Einstellungen über den Code einzustellen. Wenn man so im Forum sucht gibt es nicht viel was NetVar angeht... Grüße Andy
Last updated: 2023-08-29

Post by ofey on Device parameter - ‘ModbusTCP Configuration’ CODESYS Forge talk (Post)
Hi! Do anybody know how I can add and enable the parameter 'Default Modbus TCP slave' on a device? I am currently writing a program where the PLC shall be set up as a Modbus TCP client, but I dont know how to add parameters to devices in codesys. I'm pretty new to the codesys environment. The picture in the attachment is on a similar PLC project where I have not written the code. my goal is to add this parameter in another project.
Last updated: 2023-10-04

<< < 1 .. 45 46 47 48 49 .. 54 > >> (Page 47 of 54)

Showing results of 1340

Sort by relevance or date