Search talk: Object reference not set to an instance of an object

 
<< < 1 .. 9 10 11 12 13 .. 234 > >> (Page 11 of 234)

Post by tk096 on SMC_Interpolator + SMC_controAxislbyPos CODESYS Forge talk (Post)
Hi, you can define a start position for your GCode. How the start position can be defined depends on the CompileMode: For File and SMC_CNC_REF: Set the start position input of SMC_NCInterpreter (https://content.helpme-codesys.com/en/libs/SM3_CNC/Current/SM_CNC_POUs/NC2/Interpreter/SMC_NCInterpreter.html) For SMC_OutQueue: * Right-click on the CNC object in the project tree * Select Properties * Select the tab 'CNC' * Set the start position Concerning your second question: If the new set position cannot be reached with the given velocity limit (AXIS_REF_SM3.fSWMaxVelocity), SMC_controlAxisByPos will report bStopIpo and close the 'gap' with the given gap dynamics (SMC_controlAxisByPos.fGap*).
Last updated: 2024-02-07

FBERROR 14 REGULATOR OR START NOT SET .? CODESYS Forge talk (Thread)
FBERROR 14 REGULATOR OR START NOT SET .?
Last updated: 2021-10-05

irq-set piority is not working in plc-shell CODESYS Forge talk (Thread)
irq-set piority is not working in plc-shell
Last updated: 2024-01-05

Post by mxj262 on FB having single input but initialized with Array CODESYS Forge talk (Post)
I am adding elements of an ARRAY using pointer to access each element inside a FOR loop and the FOR loop does not stop! What is the right way to use pointers in such case?? I have another loop that is not using pointer and it stops but the loop using pointer keep on adding. METHOD FB_Init: BOOL VAR_INPUT bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold) bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change) END_VAR VAR_IN_OUT // basically REFERENCE TO window_buffer: ARRAY [*] OF INT; // array of any size END_VAR THIS^.windowPtr := ADR(window_buffer[0]); THIS^.windowSize := UPPER_BOUND(window_buffer, 1) - LOWER_BOUND(window_buffer, 1) + 1; FUNCTION_BLOCK FB500 VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR windowPtr: POINTER TO INT; windowSize: DINT; currentIndex: UINT; element1:INT; element2:INT; i:INT; j:INT; sum:DINT:=0; END_VAR element1:=windowPtr[0]; // read the first element of the Array dynamic memorry element2:=windowPtr[1]; FOR i:=0 TO (TO_INT(windowSize-1)) BY 1 DO // this loop does not stop Sum:=sum + windowPtr[i]; END_FOR FOR j:=0 TO 5 BY 1 DO // this loop stops j:=j+1; END_FOR https://ibb.co/k3DhkZT
Last updated: 2024-05-06

Post by turndapage on Can't Add Symbol Configuration CODESYS Forge talk (Post)
I've got a Weintek HMI with CodeSYS built-in. I've got it connecting to CodeSYS and downloaded. The connection guide says I need to add a symbol configuration by right-clicking on the application and adding it, but it does not show up in the available objects. Is there something else I have to do to create a symbol configuration object?
Last updated: 2023-10-04

Post by jdjennings1962 on Trouble accessing Math functions in OSCAT library CODESYS Forge talk (Post)
Hi all, I am trying to utilize the ARRAY_SDV standard deviation function, part of the Math group in the OSCAT library downloaded from the CODESYS store. My Codesys version is 3.5.19.10. When I add the OSCAT to my Library, it shows a subset of the library (Standard) as fully installed and signed (see pic). However, the Math functions are not in this Standard group. The Math functions I need can be viewed as source code in the full OSCAT_BASIC, though this the symbol next to this library suggests it is source only and not fully installed. When I try to declare an instance of the ARRAY_SDV function in a program, it is not known. I have tried reinstalling and Building . . . Any help would be greatly appreciated. Jeff
Last updated: 2024-01-06

Post by alexgooi on Modbus writing on value change CODESYS Forge talk (Post)
Hi Duvan, You could make this in 1 single object (FB), Indeed don't use a function for this beacuse you need some memory to keep the old value. For i := 0 TO 200 BY 1 DO //Check if the value has been changed IF Old_Value[i] <> Value[i] THEN //Set the trigger to TRUE Trigger[i] := TRUE; Old_Value[i] := Value[i]; END_IF END_FOR If you define the Value array as an In_Out and the Trigger as an In_Out you arn't claiming any aditional memory to your system. You ofcourse then need to add some code arround it that does something with the trigger and writes it back to FALSE again. If you want more flexability you also could use pointers instead of using the IN_OUT FOR i := 0 TO 200 BY 1 DO address := address_Input + i * SIZEOF(*Put type here); IF Address^ <> Old_Value[i] THEN Trigger[i] := TRUE; Old_Value[i] := Address^; END_IF END_FOR
Last updated: 2024-04-02

Post by timvh on Troubles with using CAN API CODESYS Forge talk (Post)
In the example project, you can see that a CAN.CANAreaReceiver is used which has an VAR_IN_OUT reference to a RECEIVER_AREA structure. This structure has a dwIdStart and dwIdEnd to filter a range of ID's and process them through the referenced msgProcessor.
Last updated: 2023-09-19

how to set custom from/to timestamp in Trend CODESYS Forge talk (Thread)
how to set custom from/to timestamp in Trend
Last updated: 2020-03-31

Post by niallel on CamBuilder and first boundary position not zero CODESYS Forge talk (Post)
Hi, I've read the CamBuilder documentation and it shows to use the left boundary of the first segment as SMCB.BoundImplicit(), so that the transition is as smooth as possible. With this it sets X and Y to 0. My first slave position is not 0 (say for example it's 100), so I would set it with SMCB.Bound(0,100). My question is that when the cam goes back to the start (Periodic := TRUE) , will it blend with the last position (360, 100) if I do this? I imagine it will, but the documentation isn't clear as the information in the Periodic Cams only says to set Smooth Transition in the cam properties - but when I'm defining it with code there isn't an option for Smooth Transition to be set. Hope this makes sense? Many thanks,
Last updated: 2024-10-23

Is CODESYS webserver not up running before the DHCP client has got an ip-address? CODESYS Forge talk (Thread)
Is CODESYS webserver not up running before the DHCP client has got an ip-address?
Last updated: 2023-07-13

Post by wistaro on How to use PLC_Open FBs with PROFINET servodrive (PROFIdrive layer) CODESYS Forge talk (Post)
Hello, I would like to know if there is a PROFIdrive layer in CODESYS. I am already familliar with Codesys's SoftMotion on CANOpen/EtherCAT (to control PLC Open FBs), and I need the same kind of stuff for PROFINET-IO devices; In my configuration, I have a CIFX board from Hischer to enable IRT, the SoftPLC "Codesys Control RTE V3 x64", and a servo-drive from INFRANOR that implements PROFINET / PROFIdrive (with IRT) protocol. This drive works well with the Object Technology of Tia Portal, but some customers use Codesys. Do you have an idea how to do that? Thanks in advance. Regards, William ROMIGUIERES INFRANOR France
Last updated: 2024-10-29

Post by phoward131 on Alarm State Icon CODESYS Forge talk (Post)
I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?
Last updated: 2024-04-23

is there a way to convert pointer to interface reference CODESYS Forge talk (Thread)
is there a way to convert pointer to interface reference
Last updated: 2018-11-14

Post by mondinmr on Direct Pointers in IOMapping for EtherCAT with IoDrvEthercatLib.ETCSlave_Dia CODESYS Forge talk (Post)
Using SDO, I can read the EtherCAT mappings and offsets from various registers like 0x1c12, 0x1c13, etc. When I obtain registers mapped in the PDOs and various offsets, I could technically access directly to the statusword, controlword, etc., if they are mapped. I have noticed that on IoDrvEthercatLib.ETCSlave_Diag I can find pointers to the input and output buffers. However, although the input buffer can be easily read by referring to what has been obtained from the SDOs, it is not possible to write to the output buffer, as it is overwritten in each cycle by the data from the IOMapping task. Is there a way, knowing an instance of IoDrvEthercatLib.ETCSlave_Diag, to obtain the pointer to the first data in the IOMapping? The offsets are identical to those of the PDOs, but obviously the data is a copy. For me, the cleanest thing would be to access the pointers on IOMapping, for DS402a devices to retrieve the key data and point them to internal references. I need to know this as, having developed our own motion library, I would like to simplify the initial setup by eliminating unnecessary and nonsensical mappings that can lead users to unnecessary errors. In the current version that we have been using for years, we have to map everything manually. I would like to pass only the slave reference to the FB_init constructors and eliminate the mapping.
Last updated: 2024-02-12

How to connect Codesys Control win v3 to an ethercat device CODESYS Forge talk (Thread)
How to connect Codesys Control win v3 to an ethercat device
Last updated: 2021-04-26

How to connect Codesys Control win v3 to an ethercat board-card(hilscher) CODESYS Forge talk (Thread)
How to connect Codesys Control win v3 to an ethercat board-card(hilscher)
Last updated: 2018-11-26

How to create an alias or other parallel definition to a structure CODESYS Forge talk (Thread)
How to create an alias or other parallel definition to a structure
Last updated: 2022-10-27

Not able to create an OPC UA certificate in my Beaglebone Black (linux Debian) on CODESYS 3.5 SP19 CODESYS Forge talk (Thread)
Not able to create an OPC UA certificate in my Beaglebone Black (linux Debian) on CODESYS 3.5 SP19
Last updated: 2023-05-28

Post by herbasso88 on WebVisu flickering CODESYS Forge talk (Post)
Good morning, I'm new on Codesys Forge, so I'm not sure if this is the right place to talk about my problem. When I open my WebVisu pages with Microsoft Edge, or Chrome, the background and also some rectangles blinking without reason!!! The application is developed with Codesys 3.5.17.10 and run on Codesys HMI, same version (3.5.17.10). After several experiments I discover that the problem happens when I made dynamic the "End of area" property of a meter object, but I can't understand why this blinking problem happens. Also, the problem is only at the WebVisu page, the "normal" VISU pages (the ones opened when Codesys HMI start) work always perfectly. Another strange thing is that the problem happens only if on the same page, where there is the meter object, there is also a trend object!?!? Codesys HMI is running on a Virtual Machine (VMware Workstation 15 player, v.15.5.6) running Windows 10 Pro N 64-bit. The blinking problem happen also if I convert the project to Codesys 3.5.20.0. This version of Codesys and Codesys HMI are installed on a Virtual Machine running Windows Server 2019 Standard 64-bit. In attachment the archive of my project. The attached project has only one page, if "Enable Counter" is not pressed the "End of area" variable of the meter is not updated in the software, and everything work well, normal VISU and WebVisu; if "Enable Counter" is pressed, the "End of area" variable of the meter is updated in the software, and the WebVisu page start blinking. I tried also to enable the "Support client animations and overlay..." property at VisualizationManager, this seems stop the blinking problem, but that property also destroy my WebPage, moving almost all the graphical object, that also seem not working anymore. I really need help to understand what I'm doing wrong, I have to develop a bigger project and I have to understand if trend objects and animated meters cannot stay in the same page. In the final project the WebVisu will be very important because the customer will use this way to access the application to monitor the process. Regards
Last updated: 2024-05-06

Post by manuknecht on Creating softmotion axis dynamically CODESYS Forge talk (Post)
Hi I was wondering the same thing. I managed to dynamically add an EtherCat Slave but I could not find out how to add a softmotion axis to it. Does anyone have an answer to this? Thanks in advance!
Last updated: 2024-02-21

Post by otdeveloper on IEC 61499 CODESYS Forge talk (Post)
It is being worked on by many companies and its even-driven function blocks seem like a natural evolution of the object oriented industrial programming I have seen Gary Pratt (author of the Book of CODESYS and much more) so expertly implement and explain. I would expect CODESYS to have this front and center on their sights and, if they do not, I would be very interested in learning why.
Last updated: 2024-02-09

Post by davidbo on How to switch between dynamic IP address and dynamic? CODESYS Forge talk (Post)
I want to make an application with a UI for CODESYS Control for Raspberry Pi MC SL which make it possible to switch between dynamin and fixed IP address and to set the IP address. However I do not know whether that is possible?
Last updated: 2023-11-06

Post by john-robinson on Limiting Memory Access of an Array to Within its Bounds CODESYS Forge talk (Post)
Recently we had an issue regarding some simple code to calculate a rolling average. The code indexes from zero to 199 to properly store the current input into a circular buffer which then allows us to calculate a rolling average: VAR input_5s : REAL; outs_arr : ARRAY[0..199] OF REAL; i : USINT := 0; END_VAR ___ //this code runs every five seconds, calculating a rolling average outs_arr[i] := input_5s; i := i + 1; output := OSCAT_BASIC.ARRAY_AVG(ADR(outs_arr), SIZEOF(outs_arr)); IF i >= SIZEOF(outs_arr) THEN i := 0; END_IF There is a simple bug in this code where the index will be set to 0 when it has surpassed the length of the array in bytes (800 in this case) rather than larger than the number of reals in the array (200). The solution here is simple, replacing i >= SIZEOF(outs_arr) with i >= SIZEOF(outs_arr)/SIZEOF(outs_arr[0]). In this example when the index increased to 201 and the line outs_arr[201] := input_5s was called, codesys arbitrarily wrote to the address in memory that is where outs_arr[201] would be if the array was that long. I would like to find a way to wrap the codesys array inside of a wrapper class that checks if an input is within the bounds of an array before writing to that value. I know how I would implement that for a specific array, I could create a method or class that takes an input of an array of variable length, ie. ARRAY[*] OF REAL, but I don't know how to make this for any data type. I am wondering if anyone has ever done anything similar to this, or has any better suggestions to ensure that none of the programmers on this application accidentally create code that can arbitrarily write to other locations in memory.
Last updated: 2024-03-05

Post by transmin01 on SafetyApp - "Invalid ERR Ack input" CODESYS Forge talk (Post)
Hi, I am trying to get a basic safety application to download but I keep getting an "Invalid ERR Ack input" and "The Standard Inputs Size of zero is not allowed". I am simply using 2 safety inputs through an "AND" block to 2 safety outputs. Any help would be appreciated. Regards Trevor.
Last updated: 2023-09-27

<< < 1 .. 9 10 11 12 13 .. 234 > >> (Page 11 of 234)

Showing results of 5839

Sort by relevance or date