Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi everybody We are currently working on a project with an RS232 serial COM interface and using the CAA SerialCOM library. We have it working fine reading and writing data, although we have found an issue we cannot resolve and any suggestions would be helpful. We have noticed that after a while the RS232 stops working. We have tracked this down to the HANDLE hCom keeps increasing and when this reaches 1023 the COM returns an unknown error "5003". Is there a way to reset this hCom reference? Thanks Richard
Last updated: 2024-03-22
Post by naps on Welchen I-Port benötige ich?
CODESYS Forge
talk
(Post)
Hallo, ich versuche eine 750-653(konfiguriert per iocheck) über die Wago Modbus Lib einzusetzen. Ich scheitere im moment an dem Korrekten I-Port. Ich habe es mit 75x_653 und IoConfig_Globals.75x653 versucht, jedoch bekomme ich folgenden fehler: ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... Code erzeugen... [FEHLER] Unbenannt7: POU_1 Device: SPS-Logik: Application: C0032: Typ 'DED.CAADiagDeviceDefault(caa device diagnosis, 3.5.20.0 (caa technical workgroup))' kann nicht in Typ 'WagoTypesCom.I_WagoSysComBase(wagotypescom, 1.6.2.3 (wago))' konvertiert werden Übersetzung abgeschlossen -- 1 Fehler, 0 Warnungen : Kein Download möglich Wie kann ich den die Karte benutzen?
Last updated: 2024-10-01
Post by k4zz on Continuous Build Server
CODESYS Forge
talk
(Post)
Hallo Martin, Thank you so much for the Code example. It works really fine for .porject Types. However, I encountered a challenge when attempting to apply it to .library Types. I also tried the option to "Perform static analysis automatically after compilation" # get Project values myProject = projects.primary # Creates an active application app = myProject.active_application # build Application and run static code analysis app.generate_code() Could you please offer any insights into why this might be occurring?
Last updated: 2024-03-15
Post by k4zz on Scripting static code analysis
CODESYS Forge
talk
(Post)
Currently, I am working on integrating static code analysis into our CI/CD pipeline. Specifically, I have successfully performed static code analysis for .project types, and it works flawlessly. However, I have encountered difficulties in executing the same for .library types. In this regard, I have tried two methods: system.commands["staticanalysis", "run"].execute() # get Project values myProject = projects.primary # Creates an active application app = myProject.active_application # build Application and run static code analysis app.generate_code() your help is greatly appreciated.
Last updated: 2024-03-18
Post by fleaplc on FILE_OPERATION_DENIED
CODESYS Forge
talk
(Post)
By using the CAA FILE library (FB FILE.Open) (raspberry pi, codesys 3.5.19.0) I always get the error FILE_OPERATION_DENIED The file exist, it has r/w/x access and path is correct... Some idea to fix it?
Last updated: 2023-09-25
Post by baldeep on Codesys Raspberry Runtime 4.10.0.0 and RSM Utility 3.5.19.0
CODESYS Forge
talk
(Post)
I had been using Codesys Raspberry 4.9.0.0 Runtime for a Project with CAA File 3.5.19.0. But now with Update 4.10.0.0 and Raspberry pi 64 Bit.....i cannot compile my code as RSM Utility 3.5.19.0 is not recognised. Any help? Regards
Last updated: 2023-11-20
Post by timvh on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
You should only open de COM port once and then leave it open. This hCom should not keep on incrementing. (off course when you are done communicating, you need to close the COM port)
Last updated: 2024-03-22
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by dagsupport on CAA SerialCOM - hCom Reset max value 1023
CODESYS Forge
talk
(Post)
Hi TimH Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks
Last updated: 2024-03-28
Post by pazderai on CanOpen write issue
CODESYS Forge
talk
(Post)
Hi,is there any canopen library where is implemented sdo write with unspecified datalength (command byte 0x22)? I tried caa cia405 canopen library but it doesnt support this, but my slave device accept only 0x22. Thank you for any help.
Last updated: 2024-07-16
Post by pazderai on CanOpen write issue
CODESYS Forge
talk
(Post)
Hi,is there any canopen library where is implemented sdo write with unspecified datalength (command byte 0x22)? I tried caa cia405 canopen library but it doesnt support this, but my slave device accept only 0x22. Thank you for any help.
Last updated: 2024-07-16
Post by simotion on Axis variable indicating modulo of finite setting
CODESYS Forge
talk
(Post)
What variable of the axis indicates it is a modulo of finite axis? I want to check that in the code, to adopt my motion code between the two types.
Last updated: 2023-11-24
Post by tvm on multiply gives negatives
CODESYS Forge
talk
(Post)
you might have some slight inaccuracies with using a REAL. See here for an explanation: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019ZSMSA2&l=en-US It might not matter, depends on how accurate you need it. I usually stick with integer types for something like this
Last updated: 2024-01-04
Post by smartcoco on Bit / Bool data types in function parameters
CODESYS Forge
talk
(Post)
Memory addressing is measured in bytes, with BOOL occupying one byte. BIT is quite unique as it occupies one bit. So, try not to use BIT in the program. You can use the Unpack function to solve your problem.
Last updated: 2024-01-18
Post by dekelec on Codesys 2.3 & Peak PCAN
CODESYS Forge
talk
(Post)
IF you have an USB interface type in "Peak_USB" for CAN card driver (Name of CAN card driver). No need to add libraries for communication via CoDeSys Gateway. For other card types contact PEAK support and they will help you. Regards,
Last updated: 2024-07-08
Post by ph0010421 on How to manage variable types larger than 64 bits - Ethernet/IP
CODESYS Forge
talk
(Post)
So it's currently mapped to an array of BYTES? Can you create a UNION? TYPE sBytesString : UNION AsBytes: ARRAY[0..127] OF BYTE; AsString: STRING(128); END_UNION END_TYPE Map it to the bytes, read it in the STRING!
Last updated: 2024-09-23
Post by opineiro on How to manage variable types larger than 64 bits - Ethernet/IP
CODESYS Forge
talk
(Post)
Thanks, that's what I thought initially. The point is that I can't select a String type variable. See the attached image
Last updated: 2024-09-23
Post by micik on Reverse bytes in an array
CODESYS Forge
talk
(Post)
Hello, I'm getting the data in Codesys that is an array of 8 bytes. From this array, I need to foram LREAL number, however, because of different endiannes I need to reverse bytes in this array and then copy to a LREAL variable. For this I'm using a loop and it works OK. I wonder if there is a built in function to do this. I have found CAA Memory library but it has functions like reverse bytes in DWORD. But it seems it doesn't have what I need. https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Reverse-Bit-Swap-ByteWord-order/ReverseBYTEsInDWORD.html What I need is a function to reverse bytes in an 8 byte array, or something similar.
Last updated: 2024-08-22
Post by micik on Reverse bytes in an array
CODESYS Forge
talk
(Post)
Hello, I'm getting the data in Codesys that is an array of 8 bytes. From this array, I need to foram LREAL number, however, because of different endiannes I need to reverse bytes in this array and then copy to a LREAL variable. For this I'm using a loop and it works OK. I wonder if there is a built in function to do this. I have found CAA Memory library but it has functions like reverse bytes in DWORD. But it seems it doesn't have what I need. https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Reverse-Bit-Swap-ByteWord-order/ReverseBYTEsInDWORD.html What I need is a function to reverse bytes in an 8 byte array, or something similar.
Last updated: 2024-08-22
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
.