Search talk: type convert

 
<< < 1 .. 7 8 9 10 11 12 > >> (Page 9 of 12)

Post by installwhat on C0077 on one machine but not another CODESYS Forge talk (Post)
I have a version of codesys 3.5.16 on my local machine and a vm. The local machine has loads of codesys versions and libraries installed etc. I can open the FPosCR_Example_Project_SP16_patch1 project on my vm without any errors. On the local machine I get the error C0077: unknown type IoDrvEthercatLib.ETC_CO_SdoWrite. I can, on the local machine, declare a var of type IoDrvEthercatLib.ETC_CO_SdoWrite and include it in the code without adding an extra error. The problem only seems to affect the library. This is seems more an issue with my codesys set up rather than something with festo. I would like to know the possible causes. I understand most of the library manager features but it's not clear how to find the cause. Thanks
Last updated: 2024-06-11

Post by eguerra on Error in ScriptingEngine Docs - create_pou() CODESYS Forge talk (Post)
In the ScriptingEngine documentation there seems to be an error (or missing information) in the ScriptIecLanguageObjectContainer part ( https://content.helpme-codesys.com/en/ScriptingEngine/ScriptIecLanguageObjectContainer.html#ScriptIecLanguageObjectContainer.ScriptIecLanguageObjectContainer ). The description of the function create_pou() doesn't specify the correct arguments requested, it only says create_pou(type: SpecialPouType) and a script using the documentation definition of the function will raise an error. I tried passing the function arguments similar to the ones specified for the create_dut() function and it seems to work fine: create_pou(name, PouType) , name : str UPDATE: The offline help has the correct definition IExtendedObject<IScriptObject> create_pou( string name, PouType type = PouType.FunctionBlock, Nullable<Guid> language = null, string return_type = null, string base_type = null, string interfaces = null )
Last updated: 2024-08-05

Post by otbeka on CmpCrypto CryptoGenerateHash Not Outputting CODESYS Forge talk (Post)
Unfortunately I noticed that, and tried: * using CryptoGeteAlgorithmByID within the function call * inputting the raw byte pointer as a testByte * instantiating the _hHash handle within the function body * using a different cryptoID or the raw DINT values from the RtsCryptoID DUT ... to no avail. The pReturn value is also set to 0, which would indicate that it is OK, right? This is odd given that the function is the same within the CryptoDemo example project here, just with a newer version. Is it possible that there is something wrong with the way my bytestring is being set up? I use the following DUTs here: TYPE MESSAGE : STRING(255); END_TYPE TYPE HASH_CODE : ARRAY[0..19] OF BYTE; END_TYPE
Last updated: 2024-09-06

Post by thn-power on How to change OPC NodeId IdentifierType CODESYS Forge talk (Post)
Hi Yet another OPC UA question. When setting up a OPC server using "Communcation manager" (Symbol set and information model) in Codesys the NodeId is always given as "opaque" type. At least when browsing using UAExpert. Other standard OPC objects use numeric (or string) identifier, but for some reason my variables seems to get opaque/binary type. See attached photo. How can I change this? I can't see that this is a parameter in the CodesysControl.cfg. Can this be specified in the information model nodeset? And is it possible to specify the exact numeric or string NodeId for each instance? And on a related topic, is there a way to export the OPC server nodeId's with variable name so that it can be imported in a OPC Client? The .xml files in the project folder does not seem to contain the NodeId.
Last updated: 2024-09-20

Post by shafiq-dsc on Beckhoff EK series cannot detect but BK1120 detect CODESYS Forge talk (Post)
Dear Support, I have i950 wants to connect with Beckhoff EtherCAT coupler BK1120. There are 2 GSD files for BK1120. 1. BK1120 without MDP.(EtherCAT ESI Device Description (XML)) 2. BK1120 with MDP. (EtherCAT BKxxx (MDP) configuration files) When connecting the BK1120 with i950, scanned devices detects BK1120 without MDP from ESI No1 above. But the KL1408 & KL2408 not detect because they have ELxxxx IO type. When manually insert BK1120 with MDP, the KL1xx8 is able to add manually also but the error shows and Install Missing Descriptions appears. The questions; 1. Why the error occurs? 2. Can the i950 connect with KLxxxx IO type or not? Regards, Shafiq
Last updated: 2024-10-25

Post by eschwellinger on usb2can in Codeysy 3.5 Can Gateway CODESYS Forge talk (Post)
Basis für all diese Linux Produkte mit CODESYS ist Socket CAN- sprich wenn dein Adapter in Linux als Socket CAN verfügbar ist sollte es funktionieren. also zunächste mal sowas ausprobieren: sudo ip link set can0 up type can bitrate 500000 sudo ip -s -d link show can0 cansend can0 00065132#21.04.00.00.3E.80.50.00
Last updated: 2024-01-17

Post by rmaas on Direct Pointers in IOMapping for EtherCAT with IoDrvEthercatLib.ETCSlave_Dia CODESYS Forge talk (Post)
Hi, Im not sure if this is what you mean, but i do succesfully use the IoDrvEthercatLib.ETCSlave.InputData and IoDrvEthercatLib.ETCSlave.OutputData to read from and write to beckhoff DI and DO cards. Very convenient as you can make an FB with an VAR_IN_OUT of type IoDrvEthercatLib.ETCSlave and only have to pass the slave reference... So i am not using .ETCSlave_Diag but .ETCSlave...
Last updated: 2024-02-13

Post by alexgooi on Init Array input on a method CODESYS Forge talk (Post)
Dear Forum, I would like to initialize an array input on a method. When I do this, I get the following error: "The type of ARRAY [1..2] OF BOOL cannot have a default value in this context." I attached a picture for more clarity. Is this simply not possible or is there a different way of tackling this problem? Thank you in advance
Last updated: 2024-02-26

Post by mp9876 on Attempting customizing menus fails in LADDER environment; due to free CODESYS version ? CODESYS Forge talk (Post)
That definitely does the job with the Ladder Logic Diagram type; fully equipped toolbox. Just starting with Codesys and was following programming steps which explains the choice of ladder I had picked. Thanks for the tip and have a good one! Cheers!
Last updated: 2024-03-14

Post by k4zz on Static Code Analysis CODESYS Forge talk (Post)
I've already experimented with two methods, but unfortunately, they only function with projects of type *.project. Consequently, when executing: system.commands["staticanalysis", "run"].execute() For the 2nd Option: You'll need to ensure that in the Static Analysis Settings, the option "Perform static analysis automatically after compilation" is checked. # get Project values myProject = projects.primary # Creates an active application app = myProject.active_application # build Application and run static code analysis app.generate_code()
Last updated: 2024-03-15

Post by eschwellinger on connect IDE to plc that uses modem ppp CODESYS Forge talk (Post)
Which plc type is it? Easy connection is to install a Gateway on remote side - this is available for Windows and Linux devices Then just add a new Gateway in CODESYS (with the IP Adress of the remote device) -> then scan the plc via this new added Gateway
Last updated: 2024-05-21

Post by rjonker on codesys mqtt publish serialization CODESYS Forge talk (Post)
pbPayload is a pointer, which it expects to point at a STRING. If you point it at an address holding a different data type, it will just assume those bytes are part of a string and likely trundle along memory until it finds a null byte (0x00) that would normally signify the end of a string PublishMessage := BOOL_TO_STRING(boolVariable);
Last updated: 2024-06-05

Post by maxsus on Visu Frame-configuration___text will not work CODESYS Forge talk (Post)
Hello I have a problem with the Frame-configuration. In the picture below you can see that I set the Editor Type to variable. If it would be text it would work, but it wasnt variable anymore. Thanks for your time. Sorry, my codesys is in German.
Last updated: 2024-08-20

Post by maxsus on Visu Frame-configuration___text will not work CODESYS Forge talk (Post)
Hello I have a problem with the Frame-configuration. In the picture below you can see that I set the Editor Type to variable. If it would be text it would work, but it wasnt variable anymore. Thanks for your time. Sorry, my codesys is in German.
Last updated: 2024-08-20

Post by timvh on Configuring a 2's compliment CODESYS Forge talk (Post)
You could create a DUT of the Type Union and add an array of 2 bytes + an Int. Then write the byte values in the array of the Union and read the Int. Or VAR iInt : INT; byHigh : BYTE := 2#1111_1111; byLow : BYTE := 2#1111_1111; END_VAR iInt := TO_INT(byHigh*16#100 + byLow);
Last updated: 2024-09-28

Post by janber on REFERENCE TO in an array CODESYS Forge talk (Post)
Hi all, in the online help it written, that array of reference to data type is not possible. Ok... but if I create array of struct of reference to - everything works fine - please see the screenshots: and it works this way OK. Is it intention or error in compiler 3.5.18.20 and we should avoid it? Thanks a lot, Jan.
Last updated: 2024-10-14

Post by duvanmoreno24 on Modbus writing on value change CODESYS Forge talk (Post)
Yes, I tried to do what you put in the first code. However, I have a problem with that and that is that the inputs must be declared with the type. I have many data types running in my code (real, int, uint, bool) and I can't put them in the same function, another thing is that I need to instantiate that function for everything I want to write to the slave. You put a for to 200 but it means that it has to be the same data type and inside the array, but I want to get them individually. I'm struggling to do it in a good and efficient way like wago's E-cockpit does. in the first screenshot you can see, you simply type in value, change the package of things you want to write in value change and it does everything by itself automatically, without comparing any old and new values and even less having the need to activate a bool. , it is perfect.
Last updated: 2024-04-03

Post by amy123 on codesys mqtt publish serialization CODESYS Forge talk (Post)
Hello, I am using the CODESYS IIoT Libraries SL MQTT Publish. Does this publish block only support publishing STRINGS as a readable format? I can publish ENUM, STRUCT, BOOL; however, MQTT Explorer will only display strings. When I use Wireshark, I can see that it is publishing something, but it looks to be publishing a serialized version which is a bunch of 0s or random text. If so, is there any way to deserialize this information back into a readable format? See pictures, where I have a BOOL TRUE that gets published as 001. Then see where I publish a STRUCT and it's an incomprehensible combination of 0s - only the string variable is displayed. Or, is it expected that you convert everything to a string before publishing? Any help is greatly appreciated! :)
Last updated: 2024-02-16

Post by hyys12 on How to use/create SOTU in LD program CODESYS Forge talk (Post)
I am trying to make a LD program for an existing installation with a motor. Here an inductive sensor is used to give an input, as a check to verify the conveyor is actually running. Here the plan was to use a TOF timer which gets constantly reset when the sensor input gets detected. The problem is, that if the conveyor is stuck, and the sensor sends a continous signal, the timer will never do what it is supposed to do. Therefor I need some help on how I can convert the input to a pulse, with the help of something like a SOTU. I just cannot find this in codesys anywhere.
Last updated: 2024-07-11

Post by paulg on Converting hex bytes to float CODESYS Forge talk (Post)
I'll be capturing a hex stream over serial into a RasPi and I'd like to convert a group of bytes into a float. I see this is available (https://content.helpme-codesys.com/en/CODESYS%20Development%20System/cdsoperatorrealto.html) but not its inverse (i.e. BYTE_TO_REAL). The packets will be 18 bytes but I'll be selecting 4 byte segments from the middle, swapping byte endianness (i.e. changing 0x51847641 to 0x41768451), and converting to float; I believe they adhere to IEEE 754. Is there a pre-built function for some or all of this, or do I need to follow (https://forge.codesys.com/forge/talk/Engineering/thread/dc5829c7ea/)? Thanks!
Last updated: 2024-08-02

Post by dsa28 on OPC UA subscriber not operational CODESYS Forge talk (Post)
Hello All, Hopefully I can get some help configuring an OPC UA subscriber in a CODESYS runtime in a Raspberry Pi 5 that tries to retrieve data from an OPC UA publisher (in this case running in a TwinCAT system). I tried to follow the steps described in the page to implement the OPC UA subscriber: https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_opcua_pubsub.html Seems that the example provided was created with version 3.5.16.0. Now with version 3.5.20.20 is not possible to open the complete project neither convert it. Anyway, after configuring all IPs and ports used in the OPC UA connection function block but the connection state always shows DISABLED. Can someone help me to do the proper configuration of the OPC UA subscriber? Many thanks in advance.
Last updated: 2024-10-22

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: 7 days ago

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: 7 days ago

Post by eschwellinger on Edge Gateway online, but PLC is not online CODESYS Forge talk (Post)
we need some logfiles from the edge gateway /etc/Gateway.cfg [CmpLog] CmpEdgeGateway.Filter=0xFFFFFFFF Logger.0.Name=/tmp/codesysedge.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=100000 Logger.0.MaxFileSize=5000000 Logger.0.MaxFiles=1 Logger.0.Backend.0.ClassId=0x00000104 ;writes logger messages in a file Logger.0.Type=0x314 ;Set the timestamp to RTC and does the scan via Automation Server show the plc?
Last updated: 2024-01-09

Post by felipemsgarcia on Edge Gateway online, but PLC is not online CODESYS Forge talk (Post)
Hi Edwin, The PLC is already in the automation server so nothing happens when I scan the network, however the PLC show offline (not connected). Please see logs below. [CmpLog] Logger.0.Name=codesysedge.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=100000 Logger.0.MaxFileSize=1000000 Logger.0.MaxFiles=1 Logger.0.Backend.0.ClassId=0x00000104 ;writes logger messages in a file Logger.0.Type=0x314 ;Set the timestamp to RTC Thank you!
Last updated: 2024-01-09

<< < 1 .. 7 8 9 10 11 12 > >> (Page 9 of 12)

Showing results of 281

Sort by relevance or date