Post by pernockham on Linking to IO during runtime with hot swap?
CODESYS Forge
talk
(Post)
I have a project where a single PLC shall control multiple nodes (up to 10 units?) with IO connected through profinet. Ideally each node should be identical however with time I see situations were different setups/configurations will be used. Codesys PLC (GVLs) |Profinet | |--PNIO-node-1--| | | AIO, | | DIO, | | CNT etc. | |--PNIO-node-2--| | | AIO, | | DIO, | | CNT etc. Ideally I think of a configuration through yaml/xml-files (the assignment/linking of the profinet nodes towards GVL-variables in the PLC as well as scaling, channel configration etc.). Would be grateful if someone could suggest library/-ies that can handle the following: - Verify what IO is connected to a device/node. - Hot-swap/assign link for IO towards GVLs, either automatically or through a HMI.
Last updated: 2024-10-11
Post by kezicris on (no subject)
CODESYS Forge
talk
(Post)
Bonjour, J'essaie de tester cette application : Je suis bloqué sur les 2 chapitres suivants : Pour la toute premiÚre configuration de communication : ajout de la passerelle Spécification du canal de communication En suivant le tutoriel, j'ai bien le point vert disant que la passerelle est OK en localhost sur mon PC Ensuite, en choisissant le chemin vers le controleur et en faisant un scan réseau à partir de cette boite de dialogue, ça ne trouve rien et je finis par avoir un message d'erreur disant que la passerelle n'est pas configuré... De plus, Je ne comprends pas pourquoi il faut passer par une pseudo connexion alors que toute l'appli et donc la simu est sur mon PC... Merci pour vos lumiÚres Bonne soirée Désolé, ça plante quand je joins un fichier
Last updated: 2024-10-20
Post by timvh on Modbus TCP & RTU with Control for Linux SL
CODESYS Forge
talk
(Post)
It seems you have 2 network interfaces. Did you try eth1? Did you already configure the IP address for this interface in Linux? If yes, then maybe undo this. - or only set eth0 in the Nic configuration without anything else (so no IP address, because this is already set in Linux). For more information about the Nic settings, see (probably already read it?): https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_obj_deploy_control_sl_configuration.html PS, if you only want to run CODESYS Control SL, you don't necessarily need the Virtual PLC variant. You could also install and run the CODESYS Control SL Runtime in the Host operating system. This way you should also be able to access the serial port and directly access all ethernet ports. Maybe this is easier?
Last updated: 2024-10-23
Post by gediminas on Datasource OPC UA client system failure
CODESYS Forge
talk
(Post)
I am using CODESYS v3.5 SP20 Patch 3 / Control for BeagleboneBlack SL v4.13 and after some time the OPC UA Server crashes. However, Runtime still works without any issues. The events leading up to the OPC server crash are the most suspicious: 1) Mutex deadlock detected - owner thread died, and 2) Runtime received SIGABRT. And it seems very similar with this topic except used versions - issues should be fixed with previous SP's. I can't seem to find any information about these events. Need some pointers in the right direction on how I can fix this problem.
Last updated: 2024-10-25
Post by pistola on Case Function - Multiple Conditions, Is it possible?
CODESYS Forge
talk
(Post)
Looking at the help (https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_st_instruction_case.html). I don't think it is possible but I figured I'd ask. I'm looking at have a case that evaluates two variables, instead of having multiple If Else statements I was hoping I could just use a case. Example * Case Var1 & Var 2 of 10 & 10: Instruction Code 10 & 20: Instruction Code 20 & 20: Instruction Code End_Case Obviously I tried typing as noted above and Codesys threw an error. But I was wondering if there was a different way of programming to make something like this work? If not I'll just use a bunch of If Else Statements, Thanks.
Last updated: 2024-11-03
Post by bertcom on Converting each character to a string into ASCII
CODESYS Forge
talk
(Post)
Good afternoon, I have a project where i need to split a string and send it in ascii code to an Domino Printer. Concept: i get an String from an Zebra scanner looking like this : " R002043;5410761402862;Oil Plus 2C Comp.A - Gris Belge;1286193824;" To start is the ";" the seperator. i found some functions to delete the ";" in a string. this is okay but now i want to convert each digit in the string into ascii like this: R=82 0=48 0=48 2=50 0=48 ... This because the printer wants to receive a string like this: <esc>OQ001TE 82 48 48 50 48 ...<eot></eot></esc> Anyone who can help me with setting me on the right track with some advice?
Last updated: 2024-11-08
Post by bertcom on Converting each character to a string into ASCII
CODESYS Forge
talk
(Post)
Good afternoon, I have a project where i need to split a string and send it in ascii code to an Domino Printer. Concept: i get an String from an Zebra scanner looking like this : " R002043;5410761402862;Oil Plus 2C Comp.A - Gris Belge;1286193824;" To start is the ";" the seperator. i found some functions to delete the ";" in a string. this is okay but now i want to convert each digit in the string into ascii like this: R=82 0=48 0=48 2=50 0=48 ... This because the printer wants to receive a string like this: <esc>OQ001TE 82 48 48 50 48 ...<eot></eot></esc> Anyone who can help me with setting me on the right track with some advice?
Last updated: 2024-11-08
Post by lsislsis on SIGABRT Error
CODESYS Forge
talk
(Post)
2024-11-08T13:39:07.354Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state* We recommend a reboot of the controller now! 2024-11-08T13:39:07.354Z, 0x00000111, 8, 260, 3, #### Exception: More than 2 exceptions in CH_COMM_CYCLE: Stop logging 2024-11-08T14:36:33.126Z, 0x0000100d, 1, 0, 0, Demo mode expired. 2024-11-08T15:35:49.253Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-08T15:42:54.664Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! *
Last updated: 2024-11-08
Post by gatto on Undertanding Application Based Licenses
CODESYS Forge
talk
(Post)
Hi, i think you are right. Did you press the key shopping cart? Codesys tells you the license. What I don't appreciate is that i need an additional license for communication. The system reports opc ua but this cheats you. This is communication that also concerns the tag symbols that codesys eth v3 exchanges with an operator panel. Attached is a screenshot of my case where you can see that communication opc ua is cheating you. 512 tags included in the program license are few. So, I had to buy 2 licenses. one for the program and one for communication. I don't like this policy.
Last updated: 2024-11-11
Post by cihangur on OpC UA server on Raspberry Pi 64 SL runtime
CODESYS Forge
talk
(Post)
After my tests, I noticed two issues. 1- WinCC disconnects the connection after receiving the GetEndPointResponse message from CoDeSys. (I found it with UAExpert and Wireshark.) 2- It establishes a connection despite waiting for a while on the network with DNS. As a result of this information: I solved the problem by adding the line "193.193.193.150 t9pac" to the C:\Windows\System32\Drivers\etc\hosts file and making Windows accept messages coming from the IP number 193.193.193.150 as coming from t9pac. (t9pac is the name of my PLC running CoDeSys.) If there is a setting that will allow CoDeSys OPC UA to respond to GetEndPointRequest with its IP address, this problem will not occur.
Last updated: 2024-12-12
Post by ben1 on Help understanding analog in-/outputs
CODESYS Forge
talk
(Post)
Hi there mate Most PLC's have a very similar concept with AI/AO - have you used any other software before? I have not used a Wago before myself, but I assume the concept would very much be: 1. Add the analog in & out cards to your hardware config. 2. Setup the raw input scaling on the hardware (eg. 4 - 20mA = 4000 - 20000) 3. Use a built in or homemade scaling block to scale your input as needed (eg. 4000 - 20000 = -100 - 2000kPa. 4. Write code as required 5. Scale output as needed (eg. 0 - 100% = 0-10000 = 0 - 10V) Is this the information you require?
Last updated: 2024-12-15
Post by manuknecht on Maximum dynamic limits of MC_MoveLinearAbsolute and MC_MoveLinearRelative
CODESYS Forge
talk
(Post)
Hello all I use an axis group with two linear axes in a kinematic system. Using MC_MoveLinearAbsolute and MC_MoveLinearRelative, I am trying to realise dynamic movements (set velocity: 1 m/s, set acceleration: 30 m/s^2) with the highest possible jerk, as I want to compare this with a movement with a trapezoidal velocity profile. However, my measurements show that the axes accelerate with a maximum jerk of approx. 800 m/s^3, even if the value in the function block was set to 10,000 m/s^3. I have already increased the dynamic limits of the two axes accordingly (Velocity: 5000 u/s, Acc-/Deceleration: 250'000 u/s^2, Jerk: 100'000'000 u/s^3, where 1 u = 1 mm), but this had no effect. I have checked the input parameters of the function blocks and the VelFactor, AccFactor and JerkFactor factors are all set to the maximum (value 1). Reducing the cycle time has resulted in a higher jerk, but as we are already working with a cycle time of 1 ms, there is nothing more that can be done here. The axes themselves are still a long way from drawing the maximum current, which is why I assume that this should not be a problem either. Are there other factors or parameters that influence the dynamic limits and therefore allow faster movements? The PLC I am using is a Raspberry Pi 4 and Codesys V3.5 SP20 with all libraries up to date. Thanks in advance Manuel
Last updated: 2024-05-08
Post by anonymous on Hi, I try to send and receive data using a UDP connection via SysSocket 3.5.17.0. While sending data works fine, I have problems with the receiving part. I am able to capture the received data of client side in wireshark But unable to capture it on the codesys
CODESYS Forge
talk
(Post)
Hi, I try to send and receive data using a UDP connection via SysSocket 3.5.17.0. While sending data works fine, I have problems with the receiving part.I am able to capture the data of client side in wireshark but i am unable to capture it in the codesys. Heres the below part of code of client side. PROGRAM POU_udpclient_program VAR istep : INT := 1;//step variable for state machine xStart: BOOL;// Flag to start the UDP protocol iecSocketId: syssocket_interfaces.RTS_IEC_HANDLE;//socket handle for receiving iecCreateResult: syssocket_interfaces.RTS_IEC_RESULT; ipAddr: syssocket.SOCKADDRESS;//Socket address structure for receiving sIpAddress : STRING := '192.168.0.2'; wPort: WORD:= 12346; iecConnectResult : syssocket_interfaces.RTS_IEC_RESULT;//connect paramters sDataRec : STRING[255];//Buffer for received data xiRecBytes : __XINT;//number of bytes received iecRecResult : syssocket_interfaces.RTS_IEC_RESULT;//receive data parameters iecCloseResult : syssocket_interfaces.RTS_IEC_RESULT; END_VAR syssocket.SysSockInetAddr(sIpAddress,ADR(ipAddr.sin_addr)); ipAddr.sin_family := syssocket.SOCKET_AF_INET; ipAddr.sin_port := syssocket.SysSockHtons(wPort); CASE istep OF 1: //create socket IF xStart THEN iecSocketId:= syssocket.SysSockCreate(syssocket.SOCKET_AF_INET,syssocket.SOCKET_DGRAM,syssocket.SOCKET_IPPROTO_IP,ADR(iecCreateResult)); IF iecSocketId = syssocket_interfaces.RTS_INVALID_HANDLE THEN xStart := FALSE; istep := 1; ELSE istep := 2; END_IF END_IF 2: //connect to socket server using setoption iecConnectResult := syssocket.SysSockSetOption(iecSocketId,syssocket.SOCKET_SOL,syssocket.SOCKET_SO_REUSEADDR,ADR(ipAddr),SIZEOF(ipAddr)); istep := 3; 3: //receive data xiRecBytes := syssocket.SysSockRecvFrom(iecSocketId,ADR(sDataRec),SIZEOF(sDataRec),0,ADR(ipAddr),SIZEOF(ipAddr),ADR(iecRecResult)); istep := 4; 4: //close socket iecCloseResult:= syssocket.SysSockClose(iecSocketId); xStart := FALSE; istep := 1; END_CASE
Last updated: 2024-06-03
Post by thommy54 on CODESYSControl_User cfg richtig konfigurieren
CODESYS Forge
talk
(Post)
Hallo, nach Erwerb eines neueren Raspberry pi 4 (V1.5) musste ich zwangslĂ€ufig von Codesys 3.5.16 hochwechseln - ich habe auf 3.5.20.1 geupdated. Da schlugen mir plötzlich ne Menge EinschrĂ€nkungen entgegen, deren Behebung einige Zeit dauerte. Eine davon ist, das ein SysFile.SysFileOpen nicht mehr funktioniert. Ich habe das Problem mit EintrĂ€gen in der /etc/CODESYSControl.cfg behoben: [SysFile] FilePath.1=/etc/, 3S.dat IecFilePath.1=/proc/, cpuinfo IecFilePath.2=/proc/, iomem PlaceholderFilePath.1=/sys/devices/w1_bus_master1, $OneWire$ PlcLogicPrefix=1 ; ; ---------------------- ; selbst eingefĂŒgt PlaceholderFilePath.2=/home/root, $my_home_root$ PlaceholderFilePath.3=/etc/init.d, $my_conf$ PlaceholderFilePath.4=/var/lib/mpd, $my_music$ PlaceholderFilePath.5=/root/Rasp_SPS_Filesystem, $my_Rasp$ Ob die EintrĂ€ge sich etwas ĂŒberlappen, kann mir gern jemand sagen, das ist aber nicht das Problem. Ich habe bei den vielen Versuchen, das Teil zum Laufen zu bringen, bemerkt, daĂ die EintrĂ€ge auch ganz schnell mal verschwinden. Das ist ja auch so beschrieben, wenn die nĂ€chste Version kommt, sind meine EintrĂ€ge weg. Da ich Ă€hnliche Probleme mit dem Funktionieren von "SysProcessExecuteCommand2()" hatte, die ich ebenfalls mit EintrĂ€gen in die /etc/CODESYSControl.cfg hĂ€tte beheben können, habe ich gelesen, das man "private" EintrĂ€ge lieber in die Datei /etc/CODESYSControl_User.cfg machen soll. Gesagt getan und "SysProcessExecuteCommand2()" lief: [SysProcess] Command=AllowAll Command.0=shutdown Aber auch irgendwo stand, das so ein Beteichner wie [SysFile] oder [SysProcess] nur einmal in den beiden Files /etc/CODESYSControl.cfg oder(!) /etc/CODESYSControl_User.cfg vorkommen darf. Das ist nun die eigentliche Frage! Ist das so ? Bei [SysProcess] ist das kein Problem, das gibt es in /etc/CODESYSControl.cfg nicht. Aber bei [SysFile] sieht das anders aus. Da sind 5 Zeilen schon in /etc/CODESYSControl.cfg drin. WĂŒrde ich diese in die User-Datei rĂŒberschieben, könnte beim nĂ€chsten Update was fehlen oder, oder... Lasse ich es so wie es ist, sind meine EintrĂ€ge beim Update weg - das sollte ja verhindert werden. Kann da jemand genaue Auskunft geben ?? Vielen Dank Thomas
Last updated: 2024-06-28
Post by sushela on Temu Coupon Code $100 Off â°â†USA [ acq615756]
CODESYS Forge
talk
(Post)
Temu Coupon Code $100 Off â„ [acu577459 & acq615756], TEMU Coupon Code [acu577459 & acq615756]â | $100 OFF & 50% DISCOUNT, TEMU Coupon Code â[acu577459 & acq615756]â ,is an all in one opportunity, which also offers $100 Off & 50% Discount! The TEMU Coupon Code ââȘ acr552049 or acr690202 â«â offers an impressive $100 discount and a 50% discount on purchases for both new and existing customers. This special offer is a fantastic opportunity to save significantly on your TEMU shopping experience. By using the Coupon Code â[acu577459 & acq615756]â, you can unlock the $100 coupon bundle, which provides $120 worth of savings. This means that you can enjoy a $100 discount on your order, as well as access to exclusive deals and additional savings opportunities. ⊠Exclusive Temu coupon Codes ,,,âȘ acr552049 or acr690202 â«,,,,, †Offers â Discounts, Student Deals & More â°â†Best Temu Coupon Codes†[acu577459 & acq615756] âš [acu577459 & acq615756] â„ Up to 50% Off To redeem the TEMU $100 Coupon Code, simply follow these steps: Sign up for a TEMU account on their website or mobile app. Add items worth $100 or more to your shopping cart. During checkout, enter the Coupon Code âacr552049â in the designated field. The $100 discount will be automatically applied, and you can also enjoy an additional 50% off on your purchase. This Coupon Code is valid for both new and existing TEMU customers, making it a great opportunity for everyone to save on their shopping. The $100 coupon bundle can be combined with other available discounts, such as the 30% off code for fashion, home, and beauty categories, allowing you to maximize your savings. â„ Temu Coupon Code $100 Off [acu577459 & acq615756]USA â„ Temu Coupon Code 40 Off [acu577459 & acq615756]USA â„ Temu Coupon Code 50 Off [acu577459 & acq615756]USA â„ Temu Coupon Code 70 Off [acu577459 & acq615756]USA â„ Temu Coupon Code 90 Off [acu577459 & acq615756]USA â„ Temu Coupon Code 30 Off [acu577459 & acq615756]USA â„ Temu Coupon Code First Order [acu577459 & acq615756]USA â„ Temu Coupon Code Existing User[acu577459 & acq615756]USA â„ Temu Coupon Code 90 Off [acu577459 & acq615756]USA Overall, the TEMU Coupon Code [acu577459 & acq615756] is an excellent way to save a significant amount on your purchases, with a $100 discount and a 50% discount on top of that. Take advantage of this fantastic offer and enjoy the benefits of shopping with TEMU. USA Are you looking for the best deals on TEMU? Look no further! The TEMU Coupon Code [acu577459 & acq615756] offers an incredible $100 off and a whopping 50% discount on your purchases. Whether youâre a new customer or a loyal shopper, this code will maximize your savings and enhance your shopping experience. Letâs dive into the details and discover how you can make the most of this fantastic offer. Why Choose TEMU? USA TEMU is a popular online marketplace known for its wide range of products, competitive prices, and excellent customer service. From electronics and fashion to home goods and beauty products, TEMU has something for everyone. With regular promotions and discounts, TEMU ensures that you get the best value for your money. How to Use the TEMU Coupon Code [acu577459 & acq615756] Using the TEMU Coupon Code âacq909783â is straightforward. Follow these simple steps to unlock your $100 off and 50% discount: Visit the TEMU Website or App: Go to the official TEMU website or open the TEMU app on your mobile device. Browse and Shop: Explore the extensive range of products and add your desired items to the shopping cart. Proceed to Checkout: Once youâve finished shopping, click on the cart icon and proceed to checkout. Enter the Coupon Code: In the Coupon Code field, enter âacq909783â and click apply. Enjoy Your Savings: Watch the total amount drop as the $100 off and 50% discount are applied to your order. Benefits of Using TEMU Coupon Code âacq909783â Significant Savings: Enjoy a substantial discount on your total purchase, making it easier to buy more for less. Wide Range of Products: The Coupon Code is applicable to a vast selection of items, ensuring you can use it on the products you need and love. Easy to Use: The straightforward process of applying the Coupon Code ensures a hassle-free shopping experience. Frequent Promotions: TEMU regularly offers promotional codes and discounts, so keep an eye out for more great deals in the future. Tips for Maximizing Your Savings on TEMU Sign Up for the Newsletter: Stay updated on the latest promotions, new arrivals, and exclusive offers by subscribing to the TEMU newsletter. Follow TEMU on Social Media: Follow TEMU on platforms like Facebook, Instagram, and Twitter for real-time updates on sales and special deals. Download the App: The TEMU app often features app-exclusive discounts and offers, making it a great way to save more. Shop During Sales Events: Keep an eye out for major sales events like Black Friday, Cyber Monday, and seasonal sales for additional discounts. â[USA]â TEMU FIRST ORDER COUPON CODE ,,,||âȘ acr552049 or acr690202 â«|| ,,, First Order/Free Shipping TEMU COUPON $100 OFF -[acu577459 & acq615756] .USA Temu Free Gift Code â [acu577459 & acq615756] .USA TEMU Free Gift Code FOR EXISTING CUSTOMERS [acu577459 & acq615756] .USA TEMU Free Gift Code FIRST ORDER -[acu577459 & acq615756] .USA TEMU Free Gift Code REDDIT -[acu577459 & acq615756] .USA TEMU Free Gift Code FOR EXISTING CUSTOMERS REDDIT -[acu577459 & acq615756] .USA TEMU COUPON $100 Free Gift Code OFF NEW USER -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FOR EXISTING CUSTOMERS 2024 -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF CODE -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FIRST ORDER FREE SHIPPING -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FOR EXISTING CUSTOMERS FREE SHIPPING USA -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF HOW DOES IT WORK -[acu577459 & acq615756] . USA TEMU COUPON $100 OFF FOR EXISTING CUSTOMERS CANADA -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF 2024 -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FOR NEW CUSTOMERS -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF CANADA -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FOR EXISTING CUSTOMERS FIRST ORDER â [acu577459 & acq615756] .USA TEMU 300 OFF COUPON BUNDLE -[acu577459 & acq615756] .USA 300 Coupon CodeS -[acu577459 & acq615756] .USA 1 BUCKS TO PHP -[acu577459 & acq615756] .USA IS THERE A COUPON IN THE PHILIPPINES -[acu577459 & acq615756] .USA 300 BUCKS TO PHP -[acu577459 & acq615756] .USA TEMU $100 OFF COUPON -[acu577459 & acq615756] .USA TEMU $100 OFF CODE -[acu577459 & acq615756] .USA TEMU 300 VALUE COUPON BUNDLE -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF FOR EXISTING CUSTOMERS FREE SHIPPING -[acu577459 & acq615756] .USA TEMU Free Gift CODE LEGIT -[acu577459 & acq615756] .USA TEMU Free Gift CODE REDDIT -[acu577459 & acq615756] .USA TEMU 300 OFF Coupon Code FOR EXISTING USERS -[acu577459 & acq615756] .USA TEMU Free Gift Code UK -[acu577459 & acq615756] .USA TEMU Coupon Code $100 OFF FREE SHIPPING -[acu577459 & acq615756] .USA TEMU Coupon CodeS 300 PERCENT OFF -[acu577459 & acq615756] .USA WHAT IS A HIGH COUPON RATE -[acu577459 & acq615756] .USA HOW TO CALCULATE COUPON RATE WITHOUT COUPON PAYMENT -[acu577459 & acq615756] .USA WHAT IS THE COUPON RATE -[acu577459 & acq615756] .USA HOW TO CALCULATE COUPON VALUE -[acu577459 & acq615756] .USA USING COUPONS AND REBATES TO LOWER THE PRICE OF AN ITEM IS AN EXAMPLE OF â [acu577459 & acq615756]USA TEMU 300 DOLLAR OFF COUPON â [acu577459 & acq615756] .USA DOMINOS Coupon Code 300 OFF -[acu577459 & acq615756] . USA DOMINOâS 300 RS OFF Coupon Code -[acu577459 & acq615756] .USA TEMU COUPON $100 OFF EXISTING CUSTOMERS -[acu577459 & acq615756] .USA WHAT IS 10 OFF 300 DOLLARS -[acu577459 & acq615756] .USA 300 OFF Coupon Code â [acu577459 & acq615756]USA 1 CASHBACK ON 300 DOLLARS â [acu577459 & acq615756] .USA IS TEMU 300 OFF COUPON LEGIT â [acu577459 & acq615756]USA TEMU COUPON $100 OFF â [acu577459 & acq615756]USA TEMU COUPON $100 OFF LEGIT â [acu577459 & acq615756]USA WHAT IS A GOOD COUPON RATE â [acu577459 & acq615756]USA TEMU 300 VALUE COUPON â [acu577459 & acq615756]USA 300 DOLLAR OFF SHEIN CODE â [acu577459 & acq615756]USA WHAT IS A ZERO COUPON NOTE â [acu577459 & acq615756] USA TEMU 300 PERCENT OFF COUPON REDDIT â [acu577459 & acq615756]USA USA TEMU 300 OFF COUPON REAL â [acu577459 & acq615756]USA TEMU 300 OFF Coupon Code â [acu577459 & acq615756]USA TEMU COUPON $100 OFF SOUTH AFRICA â [acu577459 & acq615756]USA TEMU COUPON $100 OFF FREE SHIPPING â [acu577459 & acq615756]USA TEMU COUPON $100 OFF FIRST TIME USER â [acu577459 & acq615756]USA TEMU Coupon Code $100 OFF FIRST TIME USER -[acu577459 & acq615756]USA IS THE TEMU 300 OFF COUPON LEGIT -[acu577459 & acq615756]USA TEMU COUPON $100 OFF UK -[acu577459 & acq615756] .USA TEMU Coupon Code 300 OFF UK â [acu577459 & acq615756] .USA HOW MUCH IS 20 OF 300 DOLLARS -[acu577459 & acq615756] .USA TEMU Coupon Code 300 OFF -{[acu577459 & acq615756]USA Final Thoughts The TEMU Coupon Code [acu577459 & acq615756] offering $100 off and a 50% discount is an incredible deal you donât want to miss. Whether youâre shopping for yourself or looking for the perfect gift, this code will help you save big on a wide range of products. Donât wait â start shopping on TEMU today and enjoy unbeatable savings!
Last updated: 2024-10-26
Post by ihatemaryfisher on Sorting array of any-sized structure
CODESYS Forge
talk
(Post)
In my machine's operation, I need to display multiples tables containing arrays of structured variables. The arrays change during operation, and my supervisor has advised me to write a new bubble-sort for each array. I think I can make a function to sort an array of any data type. This was my own project, and I'm a relatively new coder. I want to know the weaknesses in my approach, and a better method, if one exists. As far as I can test, the function accepts an array of a structured variable of any size, and sort it by any VAR in that structure. But it relies heavily on pointers, which I've heard are bad practice? Function call: // SORT BY BYTE-SIZED VAR IF xDoIt[6] THEN FUNBubbleSortSansBuffer( IN_pbySourcePointer := ADR(astArray[1]), // address of first byte in first element of array IN_pbyComparePointer:= ADR(astArray[1].byCompByte), // points to first byte of the comparing variable (variable you sort by) IN_uiStructureSize := SIZEOF(TYPE_STRUCTURE), // size, in bytes, of the structured variable IN_uiCompareSize := SIZEOF(astArray[1].byCompByte), // size, in bytes, of the comparing variable (variable you sort by) diArrayElements := UPPER_BOUND(astArray,1), // number of elements in array IN_xSmallToLarge := xSortOrder // whether to sort by small2large or large2small ); END_IF Function: FUNCTION FUNBubbleSortSansBuffer : BOOL VAR_INPUT IN_pbySourcePointer : POINTER TO BYTE; // points to beginning of array (first byte of first element) IN_pbyComparePointer: POINTER TO BYTE; // points to first byte of the comparing variable (variable you sort by) IN_uiStructureSize : UINT; // size, in bytes, of the structured variable IN_uiCompareSize : UINT; // size, in bytes, of the comparing variable (variable you sort by) diArrayElements : DINT; // number of elements in array IN_xSmallToLarge : BOOL; // whether to sort by small2large or large2small END_VAR VAR j : DINT; // repeat iteration over array until array ends i : DINT; // iterarte over array, swapping when necesary k : DINT; // iterator from 1 to size of structure (stepping 'through' a single element in array) dwSize : DWORD; // internal var for use in MEMUtils.MemCpy(<size>) // FOR SORTING BY BYTE VAR pbySourcePointer : POINTER TO BYTE; pbySourcePointer2 : POINTER TO BYTE; pbyComparePointer : POINTER TO BYTE; pbyComparePointer2 : POINTER TO BYTE; pbyPointerToBuffer : POINTER TO BYTE; // pointer to single byte buffer byBufferByte : BYTE; // single byte buffer END_VAR dwSize := UINT_TO_DWORD(IN_uiStructureSize); // get structure size (number of bytes) pbyPointerToBuffer := ADR(byBufferByte); // assign pointer to address of buffer byte (because MEMUtils.MemCpy requires a pointer input) CASE IN_uiCompareSize OF // depending on the size of the VAR to sort by (current functionality for BYTE and WORD/INT 1: // BYTE (8 BIT) FOR j := 1 TO diArrayElements DO // for number of elements in array FOR i := 1 TO (diArrayElements-1) DO // same thing, but row[i+1] row is included in swap logic pbySourcePointer := IN_pbySourcePointer + dwSize*(i-1); // point at #1 byte in array element[i] pbySourcePointer2 := pbySourcePointer + dwSize; // point at #1 byte in array element[i+1] // NOTE: because of memory locations, each array element is offset from one another by a number of bytes equal to the size of the structure // We can "walk" from array[i] to array[i+1] via steps equal to the size of the structure // e.g., ADR(array[i+1]) == ADR(array[i]) + SIZEOF([array datatype]) pbyComparePointer := IN_pbyComparePointer + dwSize*(i-1); // point to sorting variable in array element[i] pbyComparePointer2 := pbyComparePointer + dwSize; // point to sorting variable in array element[i+1] // using sort order (small -> large/large -> small) IF SEL(IN_xSmallToLarge, (pbyComparePointer2^ > pbyComparePointer^),(pbyComparePointer2^ < pbyComparePointer^)) THEN // This is where it gets tricky. We've identified pointers for the starting bytes of aArray[i] and aArray[i+1] // and we know the size of aArray[i]. We are going to swap individual bytes, one at a time, from aArray[i] and aArray[i+1] // this allows us to use only a single byte var as a buffer or temporary data storage // e.g., consider a structure consisting of a word, a byte, and a string. it is stored like this // |------WORD-------| |--BYTE-| |STRING------...| // astArray[1] == 1000 0100 0010 0001 1100 0011 1010 1010.... etc // astArray[2] == 0001 0010 0100 1000 0011 1100 0101 0101.... etc // performing a single swap (copy into a buffer, etc.) of the first byte of each array element creates this // astArray[1] == 0001 0100 0010 0001 1100 0011 1010 1010.... etc // astArray[2] == 1000 0010 0100 1000 0011 1100 0101 0101.... etc // incrementing the pointer adresses for the swap by 1 and swapping again swaps the next byte in each array element // astArray[1] == 0001 0010 0010 0001 1100 0011 1010 1010.... etc // astArray[2] == 1000 0100 0100 1000 0011 1100 0101 0101.... etc // continuing this from k to SIZEOF(TYPE_STRUCTURE) results in a toally swapped row FOR k := 1 TO IN_uiStructureSize DO // copy single byte[k] of array element 1 to buffer MEMUtils.MemCpy(pbyDest := (pbyPointerToBuffer), pbySrc := (pbySourcePointer+k-1), dwSize := 1); // copy single byte[k] of array element 2 to 1 MEMUtils.MemCpy(pbyDest := pbySourcePointer+k-1, pbySrc := (pbySourcePointer2+k-1), dwSize := 1); // copy buffer to byte[k] array element 2 MEMUtils.MemCpy(pbyDest := (pbySourcePointer2+k-1), pbySrc := pbyPointerToBuffer, dwSize := 1); END_FOR END_IF END_FOR END_FOR
Last updated: 2023-08-17
Post by rita56re on âTemu Coupon Code $100 Off [^âą^''act892435^âą^''] First Order in Canadaââ
CODESYS Forge
talk
(Post)
The TEMU $100 Off Coupon Code "act892435" Canada is an all-in-one opportunity that offers a $100 off and 50% discount! The TEMU $100 Off Coupon Code "act892435" offers an impressive $40 Off and a 40% discount on purchases for both new and existing customers in Canada. This special offer is a fantastic opportunity to save significantly on your TEMU shopping experience in Canada. By using the 40 Off Coupon Code "act892435" Canada, you can unlock the $100 coupon bundle, which provides $120 worth of savings. This means that you can enjoy a $100 discount on your order in Canada, as well as access to exclusive deals and additional savings opportunities in Canada. ⊠Exclusive Temu coupon Codes Canada, ,,,act892435 ,,, †Offers Canada â Discounts, Student Deals & More Canada â°â†Best Temu $100 Off Coupon Code Canada †"act892435" âš "act892435" â„ Up to 50% Off Canada To redeem the TEMU $100 40 Off Coupon Code Canada, simply follow these steps: Sign up for a TEMU account on their website or mobile app in Canada. Add items worth $100 or more to your shopping cart in Canada. During checkout, enter the 40 Off Coupon Code "act892435" Canada in the designated field. The $100 discount will be automatically applied, and you can also enjoy an additional 50% off on your purchase in Canada. This 40 Off Coupon Code is valid for both new and existing TEMU customers in Canada, making it a great opportunity for everyone in Canada to save on their shopping. The $100 coupon bundle Canada can be combined with other available discounts, such as the 30% off code for fashion, home, and beauty categories, allowing you to maximize your savings in Canada. â„ Temu Coupon Code $100 Off Canada {act892435} â„ Temu Coupon Code 40 Off Canada {act892435} â„ Temu Coupon Code 50 Off Canada {act892435} â„ Temu Coupon Code 70 Off Canada {act892435} â„ Temu Coupon Code 90 Off Canada {act892435} â„ Temu Coupon Code 30 Off Canada {act892435} â„ Temu Coupon Code First Order Canada {act892435} â„ Temu Coupon Code Existing User Canada {act892435} Overall, the TEMU 40 Off Coupon Code "act892435" Canada is an excellent way to save a significant amount on your purchases in Canada, with a $100 discount and a 50% discount on top of that. Take advantage of this fantastic offer in Canada and enjoy the benefits of shopping with TEMU in Canada. Are you looking for the best deals on TEMU in Canada? Look no further! The TEMU 40 Off Coupon Code "act892435" Canada offers an incredible $100 off and a whopping 50% discount on your purchases in Canada. Whether you're a new customer in Canada or a loyal shopper, this code will maximize your savings and enhance your shopping experience in Canada. Letâs dive into the details and discover how you can make the most of this fantastic offer in Canada. Why Choose TEMU Canada? TEMU is a popular online marketplace in Canada, known for its wide range of products, competitive prices, and excellent customer service in Canada. From electronics and fashion to home goods and beauty products, TEMU has something for everyone in Canada. With regular promotions and discounts in Canada, TEMU ensures that you get the best value for your money in Canada. How to Use the TEMU 40 Off Coupon Code "act892435" Canada Using the TEMU 40 Off Coupon Code "act892435" Canada is straightforward. Follow these simple steps to unlock your $100 off and 50% discount in Canada: Visit the TEMU Website or App: Go to the official TEMU website or open the TEMU app on your mobile device in Canada. Browse and Shop: Explore the extensive range of products and add your desired items to the shopping cart in Canada. Proceed to Checkout: Once youâve finished shopping, click on the cart icon and proceed to checkout in Canada. Enter the 40 Off Coupon Code: In the 40 Off Coupon Code field in Canada, enter "act892435" and click apply. Enjoy Your Savings: Watch the total amount drop as the $100 off and 50% discount are applied to your order in Canada. Benefits of Using TEMU 40 Off Coupon Code "act892435" Canada Significant Savings: Enjoy a substantial discount on your total purchase in Canada, making it easier to buy more for less. Wide Range of Products: The 40 Off Coupon Code is applicable to a vast selection of items in Canada, ensuring you can use it on the products you need and love. Easy to Use: The straightforward process of applying the 40 Off Coupon Code ensures a hassle-free shopping experience in Canada. Frequent Promotions: TEMU regularly offers promotional codes and discounts in Canada, so keep an eye out for more great deals in the future. Tips for Maximizing Your Savings on TEMU Canada Sign Up for the Newsletter: Stay updated on the latest promotions, new arrivals, and exclusive offers by subscribing to the TEMU newsletter in Canada. Follow TEMU on Social Media: Follow TEMU on platforms like Facebook, Instagram, and Twitter for real-time updates on sales and special deals in Canada. Download the App: The TEMU app in Canada often features app-exclusive discounts and offers, making it a great way to save more. Shop During Sales Events in Canada: Keep an eye out for major sales events like Black Friday, Cyber Monday, and seasonal sales for additional discounts in Canada.
Last updated: 2024-10-26
Post by rita56re on Temu coupon code â ââ â {act892435}: ~||$100 off in Canada
CODESYS Forge
talk
(Post)
The TEMU $100 Off Coupon Code "act892435" Canada is an all-in-one opportunity that offers a $100 off and 50% discount! The TEMU $100 Off Coupon Code "act892435" offers an impressive $40 Off and a 40% discount on purchases for both new and existing customers in Canada. This special offer is a fantastic opportunity to save significantly on your TEMU shopping experience in Canada. By using the 40 Off Coupon Code "act892435" Canada, you can unlock the $100 coupon bundle, which provides $120 worth of savings. This means that you can enjoy a $100 discount on your order in Canada, as well as access to exclusive deals and additional savings opportunities in Canada. ⊠Exclusive Temu coupon Codes Canada, ,,,act892435 ,,, †Offers Canada â Discounts, Student Deals & More Canada â°â†Best Temu $100 Off Coupon Code Canada †"act892435" âš "act892435" â„ Up to 50% Off Canada To redeem the TEMU $100 40 Off Coupon Code Canada, simply follow these steps: Sign up for a TEMU account on their website or mobile app in Canada. Add items worth $100 or more to your shopping cart in Canada. During checkout, enter the 40 Off Coupon Code "act892435" Canada in the designated field. The $100 discount will be automatically applied, and you can also enjoy an additional 50% off on your purchase in Canada. This 40 Off Coupon Code is valid for both new and existing TEMU customers in Canada, making it a great opportunity for everyone in Canada to save on their shopping. The $100 coupon bundle Canada can be combined with other available discounts, such as the 30% off code for fashion, home, and beauty categories, allowing you to maximize your savings in Canada. â„ Temu Coupon Code $100 Off Canada {act892435} â„ Temu Coupon Code 40 Off Canada {act892435} â„ Temu Coupon Code 50 Off Canada {act892435} â„ Temu Coupon Code 70 Off Canada {act892435} â„ Temu Coupon Code 90 Off Canada {act892435} â„ Temu Coupon Code 30 Off Canada {act892435} â„ Temu Coupon Code First Order Canada {act892435} â„ Temu Coupon Code Existing User Canada {act892435} Overall, the TEMU 40 Off Coupon Code "act892435" Canada is an excellent way to save a significant amount on your purchases in Canada, with a $100 discount and a 50% discount on top of that. Take advantage of this fantastic offer in Canada and enjoy the benefits of shopping with TEMU in Canada. Are you looking for the best deals on TEMU in Canada? Look no further! The TEMU 40 Off Coupon Code "act892435" Canada offers an incredible $100 off and a whopping 50% discount on your purchases in Canada. Whether you're a new customer in Canada or a loyal shopper, this code will maximize your savings and enhance your shopping experience in Canada. Letâs dive into the details and discover how you can make the most of this fantastic offer in Canada. Why Choose TEMU Canada? TEMU is a popular online marketplace in Canada, known for its wide range of products, competitive prices, and excellent customer service in Canada. From electronics and fashion to home goods and beauty products, TEMU has something for everyone in Canada. With regular promotions and discounts in Canada, TEMU ensures that you get the best value for your money in Canada. How to Use the TEMU 40 Off Coupon Code "act892435" Canada Using the TEMU 40 Off Coupon Code "act892435" Canada is straightforward. Follow these simple steps to unlock your $100 off and 50% discount in Canada: Visit the TEMU Website or App: Go to the official TEMU website or open the TEMU app on your mobile device in Canada. Browse and Shop: Explore the extensive range of products and add your desired items to the shopping cart in Canada. Proceed to Checkout: Once youâve finished shopping, click on the cart icon and proceed to checkout in Canada. Enter the 40 Off Coupon Code: In the 40 Off Coupon Code field in Canada, enter "act892435" and click apply. Enjoy Your Savings: Watch the total amount drop as the $100 off and 50% discount are applied to your order in Canada. Benefits of Using TEMU 40 Off Coupon Code "act892435" Canada Significant Savings: Enjoy a substantial discount on your total purchase in Canada, making it easier to buy more for less. Wide Range of Products: The 40 Off Coupon Code is applicable to a vast selection of items in Canada, ensuring you can use it on the products you need and love. Easy to Use: The straightforward process of applying the 40 Off Coupon Code ensures a hassle-free shopping experience in Canada. Frequent Promotions: TEMU regularly offers promotional codes and discounts in Canada, so keep an eye out for more great deals in the future. Tips for Maximizing Your Savings on TEMU Canada Sign Up for the Newsletter: Stay updated on the latest promotions, new arrivals, and exclusive offers by subscribing to the TEMU newsletter in Canada. Follow TEMU on Social Media: Follow TEMU on platforms like Facebook, Instagram, and Twitter for real-time updates on sales and special deals in Canada. Download the App: The TEMU app in Canada often features app-exclusive discounts and offers, making it a great way to save more. Shop During Sales Events in Canada: Keep an eye out for major sales events like Black Friday, Cyber Monday, and seasonal sales for additional discounts in Canada.
Last updated: 2024-10-26
Post by rita56re on Temu coupon code â ââ â {act892435}: ~||$100 off in Canada
CODESYS Forge
talk
(Post)
The TEMU $100 Off Coupon Code "act892435" Canada is an all-in-one opportunity that offers a $100 off and 50% discount! The TEMU $100 Off Coupon Code "act892435" offers an impressive $40 Off and a 40% discount on purchases for both new and existing customers in Canada. This special offer is a fantastic opportunity to save significantly on your TEMU shopping experience in Canada. By using the 40 Off Coupon Code "act892435" Canada, you can unlock the $100 coupon bundle, which provides $120 worth of savings. This means that you can enjoy a $100 discount on your order in Canada, as well as access to exclusive deals and additional savings opportunities in Canada. ⊠Exclusive Temu coupon Codes Canada, ,,,act892435 ,,, †Offers Canada â Discounts, Student Deals & More Canada â°â†Best Temu $100 Off Coupon Code Canada †"act892435" âš "act892435" â„ Up to 50% Off Canada To redeem the TEMU $100 40 Off Coupon Code Canada, simply follow these steps: Sign up for a TEMU account on their website or mobile app in Canada. Add items worth $100 or more to your shopping cart in Canada. During checkout, enter the 40 Off Coupon Code "act892435" Canada in the designated field. The $100 discount will be automatically applied, and you can also enjoy an additional 50% off on your purchase in Canada. This 40 Off Coupon Code is valid for both new and existing TEMU customers in Canada, making it a great opportunity for everyone in Canada to save on their shopping. The $100 coupon bundle Canada can be combined with other available discounts, such as the 30% off code for fashion, home, and beauty categories, allowing you to maximize your savings in Canada. â„ Temu Coupon Code $100 Off Canada {act892435} â„ Temu Coupon Code 40 Off Canada {act892435} â„ Temu Coupon Code 50 Off Canada {act892435} â„ Temu Coupon Code 70 Off Canada {act892435} â„ Temu Coupon Code 90 Off Canada {act892435} â„ Temu Coupon Code 30 Off Canada {act892435} â„ Temu Coupon Code First Order Canada {act892435} â„ Temu Coupon Code Existing User Canada {act892435} Overall, the TEMU 40 Off Coupon Code "act892435" Canada is an excellent way to save a significant amount on your purchases in Canada, with a $100 discount and a 50% discount on top of that. Take advantage of this fantastic offer in Canada and enjoy the benefits of shopping with TEMU in Canada. Are you looking for the best deals on TEMU in Canada? Look no further! The TEMU 40 Off Coupon Code "act892435" Canada offers an incredible $100 off and a whopping 50% discount on your purchases in Canada. Whether you're a new customer in Canada or a loyal shopper, this code will maximize your savings and enhance your shopping experience in Canada. Letâs dive into the details and discover how you can make the most of this fantastic offer in Canada. Why Choose TEMU Canada? TEMU is a popular online marketplace in Canada, known for its wide range of products, competitive prices, and excellent customer service in Canada. From electronics and fashion to home goods and beauty products, TEMU has something for everyone in Canada. With regular promotions and discounts in Canada, TEMU ensures that you get the best value for your money in Canada. How to Use the TEMU 40 Off Coupon Code "act892435" Canada Using the TEMU 40 Off Coupon Code "act892435" Canada is straightforward. Follow these simple steps to unlock your $100 off and 50% discount in Canada: Visit the TEMU Website or App: Go to the official TEMU website or open the TEMU app on your mobile device in Canada. Browse and Shop: Explore the extensive range of products and add your desired items to the shopping cart in Canada. Proceed to Checkout: Once youâve finished shopping, click on the cart icon and proceed to checkout in Canada. Enter the 40 Off Coupon Code: In the 40 Off Coupon Code field in Canada, enter "act892435" and click apply. Enjoy Your Savings: Watch the total amount drop as the $100 off and 50% discount are applied to your order in Canada. Benefits of Using TEMU 40 Off Coupon Code "act892435" Canada Significant Savings: Enjoy a substantial discount on your total purchase in Canada, making it easier to buy more for less. Wide Range of Products: The 40 Off Coupon Code is applicable to a vast selection of items in Canada, ensuring you can use it on the products you need and love. Easy to Use: The straightforward process of applying the 40 Off Coupon Code ensures a hassle-free shopping experience in Canada. Frequent Promotions: TEMU regularly offers promotional codes and discounts in Canada, so keep an eye out for more great deals in the future. Tips for Maximizing Your Savings on TEMU Canada Sign Up for the Newsletter: Stay updated on the latest promotions, new arrivals, and exclusive offers by subscribing to the TEMU newsletter in Canada. Follow TEMU on Social Media: Follow TEMU on platforms like Facebook, Instagram, and Twitter for real-time updates on sales and special deals in Canada. Download the App: The TEMU app in Canada often features app-exclusive discounts and offers, making it a great way to save more. Shop During Sales Events in Canada: Keep an eye out for major sales events like Black Friday, Cyber Monday, and seasonal sales for additional discounts in Canada.
Last updated: 2024-10-26
Post by mubeta on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
Hello everyone, I have a very simple program for the process, but it's driving me crazy and I can't see the problems I'm left with: Short topological description: Dual Core Berghof controller with softmotion runtime version 3.5.19.30; Two axes with servodrive on canopen bus, clocked distributed from master; Ethercat I/O node; 2 ms ethercat task, 2 ms canopen bus cycle time; I/O objects of the canopen master and canopen drives connected to the ethercat task cycle; Problem 1: Two separate programs each manage their own axis and drive, with separate state machines. A first axis moves primarily in velocity, except having to position itself absolutely at a predetermined point at the end of the job; the second axis, on the other hand, is a paper unwinder that changes, for each job cycle, from actions in absolute, relative, and cam displacement with the master axis. Well, the state machine of both axes was written in such a way as to call running the useful FB and change it on state change in this way: CASE i_stateMachine OF 0: o_Power(Enable := TRUE, bRegulatorOn := FALSE, bDriveStart := FALSE, Axis := o_PaperUnwinderAxis); o_MoveAbs(Execute := FALSE, Axis := o_PaperUnwinderAxis); o_MoveRel(Execute := FALSE, Axis := o_PaperUnwinderAxis); o_CamSelect(Execute := FALSE, Master := o_MachineAxis, Slave := o_PaperUnwinderAxis, CamTable := cam_PaperUnwinder); o_CamIn(Execute := FALSE, Master := MachineEncoder, Slave := o_PaperUnwinderAxis); o_CamOut(Execute := FALSE, Slave := o_PaperUnwinderAxis); o_SetPosition(Execute := FALSE, Axis := o_PaperUnwinderAxis); IF ... THEN i_StateMachine := 10; END_IF; 10: o_Power( Enable := TRUE, bRegulatorOn := TRUE, bDriveStart := TRUE, Axis := o_PaperUnwinderAxis ); IF o_Power.Status THEN i_StateMachine := 20; END_IF; 20: (* Avanzamento carta *) o_MoveAbs( Execute := TRUE, Position := o_Somewhere, Velocity := 25.0, Acceleration := 3666.7, Deceleration := 3666.7, Jerk := 48000.0, Direction := MC_DIRECTION.positive, Axis := o_PaperUnwinderAxis ); IF o_MoveAbs.Done THEN o_MoveAbs(Execute := FALSE, Axis := o_PaperUnwinderAxis); i_StateMachine := 30; END_IF 30: d_HomingPosition := ...; o_SetPosition( Execute := TRUE, Position := d_HomingPosition, Mode := FALSE, Axis := o_PaperUnwinderAxis ); (* ... *) IF o_SetPosition.Done = TRUE THEN o_SetPosition(Execute := FALSE, Axis := o_PaperUnwinderAxis ); o_LogServer.Append(sMessage := '...', lscClass := LOGSERVER_CLASS.ALWAYS, sdt := o_CommonsMgrData.systime.sdtLocal); i_StateMachine := 40; END_IF; 50: ... The code above is a sketchy example of what I wanted to write. But it gives me a spot problem: in some, the state change results in a drive error, which is unrecoverable except with a reinitialization via SM3_ReinitDrive(). Things are improved a little if in the program I always run the call of all softmotion blocks in this way: o_Power(Axis := o_PaperUnwinderAxis); o_Jog(Axis := o_PaperUnwinderAxis); o_Halt(Axis := o_PaperUnwinderAxis); o_MoveAbs(Axis := o_PaperUnwinderAxis); o_MoveRel(Axis := o_PaperUnwinderAxis); o_CamIn(Master := MachineEncoder, Slave := o_PaperUnwinderAxis); o_CamOut(Slave := o_PaperUnwinderAxis); If I don't execute all the calls of all the motion FBs used, when exchanging machine state often (but not always), the axis goes into error with event id THE_FB_WASNT_CALL... Done a little diagnostics it seems that the FBs return the bDone, before they are completely terminated. I tried doing the machine state exchange not with the bDone bit of the FBs, but with the 'standstill' state of the axis. It didn't seem to change anything. Problem 2: During the use SM3_ReinitDrive() I get the erro in the log: "NetID 0: SDO read error for object 16#607C..." Assuming that the device involved it's one of the two servodrive, (no others device are present in the network), I don't found any object 0x607C in the 'possible object list in/out' of the two drive, and I don't understand where this object can be listed. So any ideas and suggestions regarding these two issues will be very, very welcome. If you need the source project, I am willing to send it.
Last updated: 2024-07-17
Post by thommy54 on Lizenz wiederherstellen SP20
CODESYS Forge
talk
(Post)
Hallo Edwin, ich brĂ€uchte mal eine schnelle Hilfe. ich testete einen zweiten Raspberry Pi 4 mit meinem Lizenzdongle eines laufenden Raspberry. Der 2. Raspberry ist als Redundanzlösung bei einem Crash gedacht. DIe Schwierigkeiten begannen, als ich mit dem Raspberry 4 V1.5 nicht mehr mit SP16 weiterarbeiten konnte. Ich updatede auf SP20.1. und die Schwerstarbeit begann. Das Image wurde rĂŒbergeschoben und alles auf dem zweiten Rechner soweit zum Laufen gebracht. Der Dongle wurde ebenfalls am 2. Rechner eingesteckt. Ob er ĂŒberhaupt wirkte, kann ich nicht sagen, da fĂŒr diesen Testfall Codesys so oft rauf und runter gefahren wurde, das die 2h-Grenze kaum erreicht wurde. Problem: Beim ZurĂŒckstecken des Dongles in den ursprĂŒcnglichen Rechner ist alles an Lizenzen weg. Der Lizenzmanager hat keinen Container mehr und der Befehl "lsusb" bringt nichts zurĂŒck. ich war der Meinung, das der Dongle genau fĂŒr diesen Zweck gedacht war - die Lizenz von einem Rechner zum anderen mitzunehmen. Liege ich da falsch ? Wie komme ich nun wieder zu einem funktionfĂ€higen Dongle ?? Weitere Versuche unternahm ich mit dem Wiederherstellen des Dongels. Dabei steckte ich ihn in meinen PC (Workstation) und siehe da, es werden noch 3 von ehemals (2020) 6 Lizenzzeilen angezeigt: (siehe Bild Problem_Lizenzen_Raspberry.jpg) Dann versuchte ich das Wiederherstellen ĂŒber eine Lizenzaktualisierungsdatei vom Lizenzserver. Da kommt aber eine Datei mit anderem Dateityp (..WibuCmRaC) als im Lizenzmanager gesucht (WibuCmRaU). Die Datei ist dem Lizenzmanager auch nicht genehm (Bild Problem_Lizenzen_Raspberry_2.jpg). Nun steht Codesys auf besagtem Raspberry alle 2h still. Das soll die Lizenz doch verhindern. Angeblich soll seit SP13 auch kein eigenes Backup mehr nötig sein. Bis zum Erhalt des nicht brauchbaren Linzenzfiles hat da sja geklappt. Ich kann auch im Lizenzmanager keinen Punkt "Lizenz wiederherstellen" finden. Hat sich da mit SP20 etwas geĂ€ndert? Wenn ich mir eine neue Lizenz hole - wie bringe ich sie auf den Dongle (der ja jetzt nicht "nagelneu" ist). Ich fĂŒrchte, das geht auch bloĂ schief. Im Voraus vielen Dank Thomas
Last updated: 2024-07-02
Post by dantheman on Connecting to SoftPLC Only Works By Turning Off Modbus Ethernet Port
CODESYS Forge
talk
(Post)
I have an IPC with 2 ethernet ports and 1 Wi-Fi. I'm using ModbusTCP with the ethernet port named "enp2s0" connected to my remote I/O. This works fine when testing with Python and also works with CODESYS, but CODESYS is only able to scan for the Linux SoftPLC when I turn off the "enp2s0" interface. In other words, I can't get online with the IDE if I want my ModbusTCP comms to run with CODESYS. I'm using a Linux SoftPLC that has the following entry in CODESYSControl.cfg, hoping that this will allow me to connect with "enp1s0" or "wlp3s0", and leave "enp2s0" for field comms, but this seems to only make the source IP of the ModbusTCP comms to be bound to "enp2s0". That last point is the case only if I don't restart the service, but if I do restart the service after changing the config file, the source IP for the ModbusTCP comms then becomes the one for "enp1s0", which is very confusing to me: [SysSocket] Adapter.0.Name="enp2s0" Adapter.0.EnableSetIpAndMask=1 On the device list, I only have "enp2s0" given as the ethernet device that has the ModbusTCP master & slave beneath it, shown in Screenshot 1. On the IPC, I can ping the ModbusTCP client (remote I/O) from "enp2s0", and I've attached a Wireshark capture of running ModbusTCP from the CODESYS runtime as Screenshot 2, 3 & 4 (again, I can't get online when this is running, I have to turn off "enp2s0" to connect even when it's idle and I don't have an active TCP session with my Python tests). Like I explained above, the source IP is "enp1s0", even though the ethernet device on the project is "enp2s0". I was lucky to catch the red message that showed the source IP that makes sense to me (the one for "enp2s0"), but for some reason that connection was reset and I never saw that packet again. I've also tried this with Auto-reconnect both enabled & disabled, for the ModbusTCP Master device. I also have to turn off "enp1s0" and then turn it on, just so that I can have the ModbusTCP comms running from "enp2s0" (which is not intuitive in any way to me, I'd love some help understanding that phenomenon as well) in the weird manner that I've described above. I would be very appreciative if someone can help me figure out this pickle. I'd love to just connect to CODESYS through my Wi-Fi interface and leave my ethernet ports for field comms.
Last updated: 2024-08-01
Post by jari-koivuluoma on Problem trying Net Base Services 3.5.15.0 TCP connection
CODESYS Forge
talk
(Post)
I have a need to send messages between 2 PLCs and I cant use network variables (because of size limit) so I tried writing this simple test program. This seems to work fine. I can send messages back and forth when a first "Start server" and then "Connect client". See the attached image. However, if I disconnect the client by setting ClientConnect to false and try to re-connect then the TCP_Client just gives me TIMEOUT error. When I stop and start the server again, then Im able to reconnect. How is this supposed to work? Why reconnecting wont work. There is not other way of disconnecting the client than setting xEnable of the TCP_Client to false. This is just a testing program and I will try it on 2 seperate devices once this works. PROGRAM PLC_PRG VAR CONSTANT mySize : UDINT := 255; END_VAR VAR Server: NBS.TCP_Server; ServerIpStr: STRING := '127.0.0.1'; ServerIP: NBS.IP_ADDR; ServerPort: UINT := 50000; ServerConnection: NBS.TCP_Connection; Client: NBS.TCP_Client; ServerRead: NBS.TCP_Read; ServerWrite: NBS.TCP_Write; ServerSend: STRING(mySize); ServerReceive: STRING(mySize); ServerConnect: BOOL; bServerSend: BOOL; IP: NBS.INADDR; ConnectedClientIP: STRING; ClientPort: UINT := 50000; ClientIpStr: STRING := '192.168.1.49'; ClientIP: NBS.IP_ADDR; ClientRead: NBS.TCP_Read; ClientWrite: NBS.TCP_Write; ClientSend: STRING(mySize); ClientReceive: STRING(mySize); ClientConnect: BOOL; bClientSend: BOOL; Error: BOOL; Message: BOOL; END_VAR // Server ServerIP.sAddr := ServerIpStr; Server( ipAddr := ServerIP, uiPort := ServerPort ); ServerConnection( xEnable := Server.xEnable, hServer := Server.hServer, ); IP := ServerConnection.IPAddress; ConnectedClientIP := F_Concat7( BYTE_TO_STRING(IP.S_un_b.s_b1),'.', BYTE_TO_STRING(IP.S_un_b.s_b2),'.', BYTE_TO_STRING(IP.S_un_b.s_b3),'.', BYTE_TO_STRING(IP.S_un_b.s_b4)); ServerRead( xEnable := ServerConnection.xActive, hConnection := ServerConnection.hConnection, szSize := SIZEOF(ServerReceive), pData := ADR(ServerReceive) ); IF ServerRead.xReady AND ServerRead.szCount > 0 THEN Message := TRUE; END_IF IF ServerRead.eError > 0 THEN Error := TRUE; END_IF ServerWrite( xExecute := ServerConnection.xActive AND bServerSend, hConnection := ServerConnection.hConnection, szSize := LEN(ServerSend)+1, pData := ADR(ServerSend) ); IF ServerWrite.xDone THEN bServerSend := FALSE; END_IF IF ServerWrite.eError > 0 THEN Error := TRUE; END_IF // Client ClientIP.sAddr := ClientIpStr; Client( xEnable := ClientConnect, ipAddr := ClientIP, uiPort := ServerPort, udiTimeOut := 10000000 ); ClientRead( xEnable := Client.xActive, hConnection := Client.hConnection, szSize := SIZEOF(ClientReceive), pData := ADR(ClientReceive) ); IF ClientRead.xReady AND ClientRead.szCount > 0 THEN Message := TRUE; END_IF IF ClientRead.eError > 0 THEN Error := TRUE; END_IF ClientWrite( xExecute := Client.xActive AND bClientSend, hConnection := Client.hConnection, szSize := LEN(ClientSend)+1, pData := ADR(ClientSend) ); IF ClientWrite.xDone THEN bClientSend := FALSE; END_IF IF ClientWrite.eError > 0 THEN Error := TRUE; END_IF
Last updated: 2024-10-03
Post by sunfloweeerrry on Edgelogix-rpi-1000-cm4102032 SPI port connection to PiFace I/O Driver in CodeSys.
CODESYS Forge
talk
(Post)
Hello, I hv a problem. Couldn't solve this for 2 days now. So I'm quite new at CodeSys and I have to use the spi port x30 on the edgelogix rpi 1000. So what I have to do is just 'add device' at the SPI where I hv to pick the 'SPI master' after that I hv to change the parameters according to the edgelogix I did found in the spidev.h but nothing got updated so I 'add device' again where I pick the PiFace I/O Driver and I put my variables at the I/O Mapping, which i put the input startbit at the in part and led at the out part. I want to make the led blink according to my structured text code but somehow the hardware didn't connected with the CodeSys spi port. Nothing happens. Any idea what I have to do?
Last updated: 2023-08-18
Post by danwoodlock on RPI Zero w - Edge gateway cant install
CODESYS Forge
talk
(Post)
Hello all, First post. I recently acquired an RPI zero W from amazon, and have been using it with Codesys v3.5 SP19 patch 2. I first got it working yesterday, and after installing the runtime on the Pi, I was prompted to install the edge gateway. Installation of the edge gateway failed because of unsupported architecture, undeterred I was able to connect to the pi and program as I wanted. The issue I've noticed is that if I do not load anything to the pi overnight, I can then no longer connect to the pi and download, although I can still ping it from my pc. I found that if I power cycle the PI, I am then able to connect again, and it works as normal. I did some googling and found instances where people recommended downloading the newest edge gateway, which brings me here. Wondering if there are any suggestions, or if this is a known issue. I actually tried installing all 3 versions of edge gateway for science, but all fail with the same message. Thanks -Dan
Last updated: 2023-09-13
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.