Post by timvh on Modbus TCP & RTU with Control for Linux SL
CODESYS Forge
talk
(Post)
Most likely your IP address is set to 172.... because you use a VPN connection to your device. Probably best to use the other Ethernet interface for your modbus communication.
Last updated: 2024-10-24
Post by ben1 on How to write multiple coils (Modbus FC15)
CODESYS Forge
talk
(Post)
Yeah that is odd - sometimes you have to do what you have to do unfortunately. Have you tried sending consecutive bits in the word instead - ie. instead of [0].0. [1].0, [2].0 etc, send [0].0,[0].1, [0].2 etc. ?
Last updated: 22 hours ago
Post by lsislsis on Alarms Placeholder
CODESYS Forge
talk
(Post)
Hello. When i put placeholders at "/etc/codesyscontrol/CODESYSControl.cfg" : [SysFile] FilePath.1=/etc/codesyscontrol/, 3S.dat IecFilePath.1=/proc/, cpuinfo IecFilePath.2=/proc/, iomem PlaceholderFilePath.1=/sys/devices/w1_bus_master1, $OneWire$ PlcLogicPrefix=1 PlaceholderFilePath.2=/data/persistence, $ac_persistence$ PlaceholderFilePath.2.Volatile=1 PlaceholderFilePath.2.View=1 PlaceholderFilePath.3=/data/alarms, $alarms$ PlaceholderFilePath.3.Volatile=1 PlaceholderFilePath.3.View=1 Where "Data" are my USB Flash. I take these attachment errors at run time. What i am doing wrong.
Last updated: 2024-10-15
Post by kamalsingh on Temu Coupon $100 off [acr552049] or [acr552049] For New And Existing Users
CODESYS Forge
talk
(Post)
To get $100 off, sign up as a new user using referral code [acr552049] or [acr552049] and enter the coupon during checkout when making your first purchase at Temu. You will receive the benefit once the coupon applied. Looking to save some extra cash on your favorite items? Look no further than Temu promo and coupon codes! Take advantage of these great deals to get the items you love at a discounted price. Don't miss out on these savings opportunities. Get a $100 discount on your Temu order with the promo code '[acr552049] or [acr552049]'. You can get a discount by clicking on the item to purchase and entering the code. Redeem $100 Off Temu Coupon Bundle Code [[acr552049] on TEMU App is a shopping platform that provides us with the best-branded items at discounted prices. You will also notice that TEMU offers users to save extra by applying the TEMU coupon code during checkout. You can get $100 off Temu by using the coupon code '[acr552049] or '. Existing customers can use this code. Temu existing user coupon code: [[acr552049] or new Using Temu's coupon code [[acr552049] or [acr552049]] will get you $100 off, access to exclusive deals, and benefits for additional savings. Save 40% off with Temu coupon codes. New and existing customer offers. What is Temu $100 Coupon Bundle? New Temu $100 coupon bundle includes $120 worth of Temu coupon codes. The Temu $100 Coupon code [[acr552049] or [acr552049]] can be used by new and existing Temu users to get a discount on their purchases. Temu $100 Coupon Bundle Code [[acr552049] or [acr552049]] Temu Coupon Code France: {acr552049} Temu Coupon Code Sweden: {acr552049} Temu Coupon Code Australia: {acr552049} Temu Coupon Code United Kingdom: {acr552049} Temu Coupon Code Spain: {acr552049 }or {acr552049} Temu Coupon Code Italy: {acr552049} Temu Coupon Code Germany: {acr552049} Temu Coupon Code Saudi Arabia: {acr552049} Temu Coupon Code Austria: {acr552049} Temu Coupon Code Belgium: {acr552049} Temu Coupon Code Thailand: {acr552049} Temu Coupon Code Kuwait: {acr552049} Temu Coupon Code United Arab Emirates: { acr552049} Temu Coupon Code Switzerland: {acr552049} Temu Coupon Code Mexico: {acr552049} Temu Coupon Code New Zealand: {acr552049} Temu Coupon Code Poland : {acr552049} Temu Coupon Code United States: {acr552049} Temu Coupon Code Portugal: {acr552049} Temu Coupon Code Netherlands: {acr552049} Temu Coupon Code Brazil: {acr552049} Temu Coupon Code Norway: {acr552049} Temu coupon $100 off for existing customers There are a number of discounts and deals shoppers can take advantage of with the Teemu Coupon Bundle [[acr552049] or [acr552049]]. Temu coupon $100 off for existing customers'[acr552049] or [acr552049]' will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. You can think of it as a supercharged savings pack for all your shopping needs Temu coupon code 80% off β [[acr552049] or [acr552049]] Free Temu codes 50% off β [[acr552049] or [acr552049]] Temu coupon $100 off β [[acr552049] or [acr552049]] Temu buy to get $39 β [[acr552049] or [acr552049]] Temu 129 coupon bundle β [[acr552049] or [acr552049]] Temu buy 3 to get $99 β [[acr552049] ] or [acr552049]] Exclusive $100 Off Temu Coupon Code Temu $100 Off Coupon Code: ([acr552049] or [acr552049]) Temu Coupon Code $100 Bundle[acr552049] or [acr552049]) Free Gift On Temu: ([acr552049] or [acr552049]) Temu $100 off coupon code for Exsting users: ([acr552049] or [acr552049]) Temu coupon code $100 off free shipping You will save $100 when you use Temu's 90% OFF promo code [[acr552049] or [acr552049]]. Enter the discount code when purchasing an item How Does Temu $100 Coupon Work Temu Coupon Code Colombia: {acr552049}or {acr552049} Temu Coupon Code Chile: {acr552049}or {acr552049} Temu Coupon Code Israel: {acr552049}or {acr552049} Temu Coupon Code Egypt: {acr552049}or {acr552049 } Temu Coupon Code Peru {acr552049}or {acr552049} Temu Coupon Code Ireland: {acr552049}or {acr552049} Temu Coupon Code Hungary: {acr552049}or {acr552049} Temu Coupon Romania code: {acr552049 }or {acr552049} Temu's $100 promo code isn't just one big coupon you use all at once. Instead, think of it as a welcome package filled with different discounts and offers worth $100. New customers are welcome. Temu coupon code $100 off Temu 90% OFF promo code '[acr552049] or [acr552049]' will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code β[acr552049] or [acr552049]β for first time users. You can get a $100 bonus plus 30% off any purchase at Temu with the $100 Coupon Bundle at Temu if you sign up with the referral code [[acr552049] or [acr552049]] and make a first purchase of $100 or more. How Do Apply Temu Coupon Code [[acr552049] or [acr552049]]? 1.Download the TEMU app and create a new account. 2.Fill in basic details to complete account verification. 3.Select the item you want to purchase and add it to your cart Minimum of $100. 4.Click on the Coupon Code option and enter the TEMU Coupon Code. 5.Once the coupon has been applied, you will see the final discount. 6.price Select your payment method and complete your purchase. Temu coupon code $100 off first time user yes, If you're a first-time user, Temu offers $100 off with coupon code '[acr552049] or [acr552049]' Temu offers first-time users a $100 discount. Here are some Temu coupons! The fact that new users can benefit from such generous discounts is great. How do you redeem Temu $100 coupon code? Yes, To redeem the Temu $100 coupon code, follow these steps: 1.Sign Up: If you haven't already, sign up for a Temu account on their website or app. 2.Add Items to Cart: Browse through the products you'd like to purchase. Add items worth $100 or more to your cart. 3.Apply Coupon Code: During checkout, enter the coupon code β[acr552049] or [acr552049]β in the designated field. This will unlock the $100 coupon bundle. You can also use the referral code β[acr552049] or [acr552049]β when signing up to receive the same benefit. 4.Enjoy Savings: The discount will be applied, and you'll enjoy additional savings on your purchase. Plus, you can combine this with other available discounts, such as the 30% off code for fashion, home, and beauty categories. Temu coupon code $100 off Yes, You can use the coupon code [[acr552049] or [acr552049]] to get the $100 coupon bundle. On your next purchase, you will also receive a 50% discount. If you use Temu for your shipping, you can save some money by taking advantage of this offer. Temu Coupon $100 off For New And Existing Users New users at Temu receive a $100 discount on orders over $200 Use the code [[acr552049] or [acr552049]] during checkout to get Temu Coupon $100 off For New And Existing Users. You can save $100 off your first order with the coupon code available for a limited time only. Extra 30% off for new or existing customers. Up to 40% off, $100 discount & more. what are temu codes - [acr552049] or [acr552049] does temu give you $100- [[acr552049] or [acr552049]] Conclusion The $100 Temu Coupon Bundle is an excellent opportunity to unlock substantial discounts on a wide range of products and services if you're a savvy shopper. Temu 90% OFF promo code [[acr552049] or [acr552049]] will save you $100 on your order. To get a discount, click on the item to purchase and enter the code FAQs How to use a $100 dollar coupon on Temu Yes, you can use Temu's $100 coupon. There is a code for Temu that saves money on purchases called '[[acr552049] or [acr552049]]'. Where can I get a temu coupon code $100 off? Yes, by using the special legit Temu coupon code '[acr552049] or [acr552049]' during checkout after downloading the app, you can get a $100 Temu coupon code. You can also enjoy discounts of up to 90% off on selected items along with the $100 bundle coupon. Is there any $100 Temu coupon code available? TEMU offers high-quality products at low prices, with free shipping. You can use the coupon code β[[acr552049] or [acr552049]]β to get $100 off your first purchase of $100 or more and enjoy free shipping when you sign up for TEMU! Temu coupon code $100 off free shipping TEMU offers high-quality products at low prices, with free shipping. You can use the coupon code β[[acr552049] or [acr552049]]β to get $100 off your first purchase of $100 or more and enjoy free shipping when you sign up for TEMU! Get a $100 off coupon for Temu, you can use the coupon code [[acr552049] or [acr552049]] at checkout. This code is specifically for existing customers. How can I redeem the Temu $100 coupon? Type in the special coupon code [[acr552049] or [acr552049]] where it asks for it .Press the βRedeemβ or βApplyβ button to make your $100 coupon bundle active How To use your Temu $100 coupon [[acr552049] or [acr552049]] at checkout: Use our Temu promo code [[acr552049] or [acr552049]] during checkout and enjoy up to 90% off and a $100 welcome bonus. GRAB your discount and keep shopping
Last updated: 2024-10-26
Post by ggarcia94 on IMAGE DISPLAY ACCORDING TO INPUT VARIABLE
CODESYS Forge
talk
(Post)
Reopening this thread as I need to make a few images visible depending on the value of a variable. However, in the properties of the image I do not have the option to make the image visible (see attached image). IΒ΄m using Codesys V3.5 SP19. However, when I use V3.5 SP17 I have the option to make the images visible. Can someone help me achieve this with V3.5 SP19? EDIT: Fixed. Just had to uncheck Support client animations in the Visualization manger settings
Last updated: 2023-09-12
Post by ernesto881124 on ernesto881124
CODESYS Forge
talk
(Post)
Hello good morning everyone I would like to ask a question, is it possible to directly connect a device that only contains modbus RTU communication through an R-45 connector, directly to the PC? Or would you need an intermediate device to achieve communication? It would be of great help to me because I cannot achieve communication between the Codesys simulator plc and a Fuji Frenic mini VFD, please help me if anyone has had the same experience. Thank you so much
Last updated: 2023-09-13
Post by timvh on When Keyboard Key is in Hold, then Webvisu is extreme slow and latent
CODESYS Forge
talk
(Post)
I'm not really sure what you are trying to do, but maybe you are referring to using the CmpCharDevice library? When you "open" the connection to a device, you can pass flags. What helped me is to set the non-blocking flag. I'm not sure if this is what you are referring to, but maybe it helps: dFlags: DINT := CmpCharDevice.ACCESS_MODE.O_RDONLY + DINT#4000; // see details for flags: http://linux.die.net/man/2/open, + DINT#4000 is for non-blocking hDevice := CmpCharDevice.CDOpen(szFilename, dFlags, Result);
Last updated: 2023-09-20
Post by john-martin on Send file from codesys to...... ftp, cloud, etc
CODESYS Forge
talk
(Post)
Hi everybody, I am looking for a solution to send files, for example, to an ftp or a cloud. I can't use oscat library because 64 bit controller are not supported. Therefore, I see that the IIoT library has some functions that might help me to implement this sending process in codesys. Does anyone have any examples of how to do this? I have spent some days with this issue without success. Best regards.
Last updated: 2023-11-02
Post by timvh on Management of a PLC network from a remote station
CODESYS Forge
talk
(Post)
Maybe the CODESYS HMI is a good solution. https://store.codesys.com/en/codesys-hmi-sl-bundle.html Run this on the remote main control station. In the HMI application you can add the data source manager and to this manager you can add Data sources. A data source has a reference to the PLC you want to connect to and can get access to the variables of the PLC application. You can then use these variables in the visualization of the HMI application.
Last updated: 2023-12-04
Post by apurv on Cannot pass array of constant size to a function as a reference
CODESYS Forge
talk
(Post)
I have a Array of constant size defined like this Var Constant MAX_SIZE :UINT := 10; End_var VAR array : ARRAY[0..MAX_SIZE] OF INT; END_VAR Now I want to pass this array to a function by reference, Function fun : INT VAR_IN_OUT CONSTANT MAX_SIZE : UINT; END_VAR VAR_INPUT array : REFERENCE TO ARRAY[0..MAX_SIZE] OF INT; END_VAR but when I run this it gives strange Errors Error : Cannot Convert type 'ARRAY [0..MAX_SIZE] OF INT' to type 'ARRAY[0..MAX_SIZE] OF INT'
Last updated: 2024-01-07
Post by pbitalc on Customize Users and groups Visualization in UserMgmtConfig
CODESYS Forge
talk
(Post)
Hi, I have the user situation represented in the image and I would like CustomerAdmin to only be able to modify/add/delete users relating to the CustomerUser group and nothing else. How can I do? It would be enough not to display the users belonging to the SuperAdmin, Technician1 and Technician2 groups and also the related groups in the UserMgmtConfig dialog box. Can anyone help me? I use Codesys 3.5.16 Thanks!
Last updated: 2024-02-29
Post by niallel on How to change bHiresMode
CODESYS Forge
talk
(Post)
Hi, I'm trying to get Scaling working on my axis. An increment produces 36.6mm of movement, so I want to put the units in application as 36.6. However the docs say that I need to change bHiresMode as it doesn't show me the option for Precision in the User Interface. I'm thinking that I need to change the precision so I can enter decimal places. How can I do this, or is my thinking wrong? Thanks,
Last updated: 2024-03-11
Post by andy-yemm on Assertion Failed
CODESYS Forge
talk
(Post)
I had similar assertion failed error messages today. I am fairly new to Codesys. I tried using SFC for the first time, I usually use ST. Anyway I had errors in some of my transitions. I copied and pasted transition code and forgot to change the target of the code. I started getting lots of the assertion errors but now I have sorted out the problems and it compiles OK the assertion error messages seem to have stopped. There do not seem to be any other responses to your post, did you resolve your problem?
Last updated: 2024-03-19
Post by marcolim on RPC failed 0x16c9a085
CODESYS Forge
talk
(Post)
Hello Matteo, I think the problem is about configuration of firewall (windows firewall usually). You can disable temporary the firewall to check if the communication works. Eventually you can: Go to the control panel -> Windows Defender Firewall -> Allow an app or feature Enable the options to change the settings. Scroll down in the application list to CODESYS and CODESYS ControlService. If you donβt see this application add it to the list. Make sure that all the checkboxes are checked (Domain, Private and public).
Last updated: 2024-04-01
Post by micik on CAA File, how to check whether file exists or not
CODESYS Forge
talk
(Post)
Hello, what would be the most efficient way to check whether the file exists or not. I don't want to use file.Open function, it seems like rather inefficiet operaton. I considered GetAttribute function, but this function doesn't accept filename (with path) as an input. Basically I need to check first time when program is loaded to the runtime i.e. when application is started for the first time, whether a file exists on the specific location or not.
Last updated: 2024-05-16
Post by svdpoint on Raspberry Pi Zero 2W with external Ethernet adapter
CODESYS Forge
talk
(Post)
Hello all, Somebody try to run the CodeSys at RPi Zero 2W with external ETHx device? I need to more information how youi do it, what need to it, ...etc. It is interesting to use it together with EtherCat-interface. For example I had try to connect W5500 over SPI. The eth0 is present, but does not found any EtherCat IO-device. BR
Last updated: 2024-05-25
Post by kris-samoy on Get Alarm status in Codesys
CODESYS Forge
talk
(Post)
I am rather new to Codesys and I'm trying to figure out how to get the status of an alarm. This to interlock the start of a device until the alarm has been acknowledged... I am not sure if IAlarm.GetState (METH) can be used for this purpose. If yes then could someone please briefly explain how to use this? https://content.helpme-codesys.com/en/libs/AlarmManager/4.1.0.0/Interfaces/pou-IAlarm/GetState.html Thx & grtz, Kris
Last updated: 2024-06-03
Post by mozed on Bug Device login
CODESYS Forge
talk
(Post)
Good morning, The problem I encounter is very disturbing, when I try to connect to my project, it asks me to put in my username and password, which I do. However, I cannot connect and it restarts. the window to rewrite my identifiers. However it is the correct identifier and password I do not understand why. When I try to put false identifiers there strangely it tells me that these are not valid identifiers. There is something what can I do? Sincerely
Last updated: 2024-06-11
Post by mikek10 on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
I was answering your last paragraph Meanwhile, I would like to understand why the motion FB instances must still be called even after the Execute is set to FALSE, especially in view of the fact that the next instruction is programmed to abort the previous one, with BufferMode set to 'Aborting'. All these unnecessary FB calls are an unnecessary overhead on the CPU anyway. Is there any precise rule about when to cease calling the various instances? (It should precisely be the 'done' status that says this one has finished its work).
Last updated: 2024-07-18
Post by aliazzz on Unable to deploy Virtual Control SL on ARM64 (Raspberry Pi5)
CODESYS Forge
talk
(Post)
An interesting remark for CODESYS Support. I found this after looking through the Runtime Deploy Tool messages when I connect to an AMD64 architecture Successfully Connected to Target ( {MyIP} - AMD64 ) when I connect to an ARM64 architecture (Raspberry Pi5) Successfully Connected to Target ( {MyIP} - ) As clearly seen in the attached .png, the AMD64 target is detected, while the ARM64 target architecture is not detected (displayed). I assume that this is the reason why the pulldown menu isn't populated correctly.
Last updated: 2024-07-28
Post by ivanh on kepware minimun privilege
CODESYS Forge
talk
(Post)
Hello everyone, Iβm integrating Codesys with Kepserver using the Kepware driver for Codesys, and I need to configure a user account with the minimum necessary privileges to read and write to the tags on the PLC, without using the internal OPC UA server of Codesys. However, despite not assigning the Modify permission, Kepware still allows writing to the tags. What are the minimum required permissions to ensure that writing is only allowed when necessary, and how can I prevent other permissions from being overridden? Any guidance would be greatly appreciated.
Last updated: 2024-08-12
Post by micik on ERR_OK not recognized
CODESYS Forge
talk
(Post)
Hello, if I try to use ERR_Ok in my code to check whether the file is open correctly or not, I get an error "Identifier ERR_OK not recognized", I can use plain 0 (zero) instead. But in general, is this a proper way to check for success of file operation since the 4th parameter is a poinmter to RTS_IEC_RESULT, and normally I would expect this to be used somehow. _hFile := SysFileOpen(_sFileName, am:=SysFile.ACCESS_MODE.AM_WRITE, ADR(_result)); IF _result <> 0 THEN udDiag := 100; RETURN;
Last updated: 2024-08-17
Post by durallymax on Access Variable Visu Dialog
CODESYS Forge
talk
(Post)
Is there a way to access the variable in the called dialog? Example: Text Field element with PLC_PRG.myVar as Text variable. OnMouseClick configured to write variable with keypad pop-up. OnValueChanged configured to Execute ST RND(PLC_PRG.myVar,2); Rather than change myVar with each copy of this Text Field, is there a way to access whatever the configured text variable is? Generally try to stay away from ST in visu, but was curious regardless.
Last updated: 4 days ago
Post by garrian on How to write multiple coils (Modbus FC15)
CODESYS Forge
talk
(Post)
Thanks for your reply. I belive it is contiguous, I'm writing to adress 0 to 4. Or, do you mean something else? Well, something is happening. If I on the client set adress 1,2,3 to true, only 1 is set to true on the server side. On the client side, the data is array of word. But on the server side, the coils are array of bool. Holding register is array of word on server side. Can this be a problem? Attached screenshot of how it looks at the server side.
Last updated: 1 day ago
Post by paulg on RasPi CAA Serial example - unexpected behavior during debug
CODESYS Forge
talk
(Post)
I've trimmed down the CAA Serial Codesys example to only listen on one port but, when stepping through the Case structure in debug mode, it jumps out of the structure during a specific point in every scan (I'll point it out below after describing the setup and listing the code). I'm using a Pi 4 Model B, and I have an Arduino Nano Every plugged in via USB which is streaming the following serial message at 1 Hz: Time since opening connection: 1 s Time since opening connection: 2 s ...and so on. The Pi shows the Nano at /dev/ttyACM0 so I edited CODESYSControl_User.cfg to read: Linux.Devicefile=/dev/ttyACM The code in my PLC_PRG is (ignore some of the comments, I hadn't deleted them out from the original example): PROGRAM PLC_PRG VAR xStartTest : BOOL:= TRUE; iState : INT; xTestDone : BOOL;(* True, when the test was done succesfully *) (* Settings to communicate with the COM Port *) aCom1Params : ARRAY [1..7] OF COM.PARAMETER; como1 : COM.Open; comc1 : COM.Close; comw1 : COM.Write; comr1 : COM.Read; //sWrite : STRING := 'Test String!'; sRead : STRING(25); szRead : CAA.SIZE; xCom1OpenError : BOOL; xCom1CloseError : BOOL; xCom1WriteError : BOOL; xCom1ReadError : BOOL; END_VAR //This example shows the communication of two COM Ports with each other. //The first one writes a string of characters, which is read by the second one. //After successful execution, the two COM Ports are closed and the test is done. IF xStartTest THEN CASE iState OF 0: //The parameters are set for the COM Port aCom1Params[1].udiParameterId := COM.CAA_Parameter_Constants.udiPort; aCom1Params[1].udiValue := 1; // the correct Port should be adapted aCom1Params[2].udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate; aCom1Params[2].udiValue := 115200; aCom1Params[3].udiParameterId := COM.CAA_Parameter_Constants.udiParity; aCom1Params[3].udiValue := INT_TO_UDINT(COM.PARITY.NONE); aCom1Params[4].udiParameterId := COM.CAA_Parameter_Constants.udiStopBits; aCom1Params[4].udiValue := INT_TO_UDINT(COM.STOPBIT.ONESTOPBIT); aCom1Params[5].udiParameterId := COM.CAA_Parameter_Constants.udiTimeout; aCom1Params[5].udiValue := 0; aCom1Params[6].udiParameterId := COM.CAA_Parameter_Constants.udiByteSize; aCom1Params[6].udiValue := 8; aCom1Params[7].udiParameterId := COM.CAA_Parameter_Constants.udiBinary; aCom1Params[7].udiValue := 0; //The first Port is opened with the given parameters como1(xExecute := TRUE, usiListLength:=SIZEOF(aCom1Params)/SIZEOF(COM.PARAMETER),pParameterList:= ADR(aCom1Params)); IF como1.xError THEN xCom1OpenError := TRUE; iState := 1000; END_IF //After a successful opening, the next state is reached IF como1.xDone THEN iState := 15; END_IF 15: // the reading process is started comr1(xExecute := TRUE,hCom:= como1.hCom, pBuffer:= ADR(sRead), szBuffer:= SIZEOF(sRead)); IF comr1.xError THEN xCom1ReadError := TRUE; END_IF //After completion the size of the written bytes are saved IF comr1.xDone OR comr1.xError THEN szRead := comr1.szSize; iState := 20; END_IF 20: // If everything was successful the ports are closed and the handles are released comc1(xExecute := TRUE,hCom:= como1.hCom); IF comc1.xError THEN xCom1CloseError := TRUE; END_IF IF comc1.xDone OR comc1.xError THEN iState := 25; END_IF 25: // The first port is closed and the used handle released xTestDone := TRUE; xStartTest := FALSE; iState := 0; como1(xExecute := FALSE); comw1(xExecute := FALSE); comc1(xExecute := FALSE); ELSE iState := 0; END_CASE END_IF I realize as I write this that the .udiPort should be 0 and not 1, but that shouldn't be causing the issue I'm seeing. I'm forcing xStartTest:=TRUE every scan so that I can step into each line and observe what's happening. What I see is that the port parameters are set and the port is opened with no errors, but the code jumps out of the case structure to the last line every time it reaches (and I step into) the iState:=15 line (at the end of the iState:=0 block). So every scan cycle it goes through the block for iState=0 and jumps out at the same spot. I'm a little new to PLC programming so I may be misunderstanding the flow, but shouldn't this case structure keep moving down in the same scan? If it only handles one case per scan, why doesn't the value of iState persist? Thanks! Update: I restarted the Codesys control today and I was then able to see an error for como1.eError of "WRONG_PARAMETER". I tried doing some digging and another post made me think I should add another line to CODESYSControl_User.cfg, so I now have: [SysCom] Linux.Devicefile=/dev/ttyACM portnum := COM.SysCom.SYS_COMPORT1 So now when I set .udiPort to 1, I get "NO_ERROR" but I also don't read anything from the port (i.e. szRead = 0 always). If I try setting the port to 0 (which I'm confused about, because I added a COMPORT1 line but the device shows on the Pi as ACM0), I get the "WRONG_PARAMETER" error again. Is there an easier way to troubleshoot the Pi and view what ports the Codesys runtime is actually able to see while the Pi is running?
Last updated: 2024-06-06
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
.