Is it possible to convert a string of 32-bit of binary to a float32?
CODESYS Forge
talk
(Thread)
Is it possible to convert a string of 32-bit of binary to a float32?
Last updated: 2023-03-23
Convert from string containing HEX values to the corresponding chars (E.G. '414141' to 'AAA')
CODESYS Forge
talk
(Thread)
Convert from string containing HEX values to the corresponding chars (E.G. '414141' to 'AAA')
Last updated: 2023-07-19
Need to know about the possibility of sending reset signal to codesys over Ethernet
CODESYS Forge
talk
(Thread)
Need to know about the possibility of sending reset signal to codesys over Ethernet
Last updated: 2020-06-29
How to functionally copy a BUTTON from one page to another
CODESYS Forge
talk
(Thread)
How to functionally copy a BUTTON from one page to another
Last updated: 2023-07-10
How to initialize arrays of function blocks that need FB_Init to work
CODESYS Forge
talk
(Thread)
How to initialize arrays of function blocks that need FB_Init to work
Last updated: 2020-08-21
Impossible to enter en FB from a CFC to debug it: "nProjectHandle: 'xxx' is invalid." error
CODESYS Forge
talk
(Thread)
Impossible to enter en FB from a CFC to debug it: "nProjectHandle: 'xxx' is invalid." error
Last updated: 2023-02-23
How to create an alias or other parallel definition to a structure
CODESYS Forge
talk
(Thread)
How to create an alias or other parallel definition to a structure
Last updated: 2022-10-27
How to use __VARINFO within a function block to obtain the origin variable name?
CODESYS Forge
talk
(Thread)
How to use __VARINFO within a function block to obtain the origin variable name?
Last updated: 2022-03-15
How to Map Arrary of Bool to fixed IEC Address?
CODESYS Forge
talk
(Thread)
How to Map Arrary of Bool to fixed IEC Address?
Last updated: 2023-06-30
How to modify the time zone information to set with Adelaide, AU in DTutil library?
CODESYS Forge
talk
(Thread)
How to modify the time zone information to set with Adelaide, AU in DTutil library?
Last updated: 2017-11-04
Post by ph0010421 on How to transfer data from DINT to Union(16 Bools) which I need to use in Few FBs
CODESYS Forge
talk
(Post)
In the Struct, change the 'BOOL' to 'BIT'
Last updated: 2023-12-14
Open dialog from ST , how to set parameters (vars) to dialog
CODESYS Forge
talk
(Thread)
Open dialog from ST , how to set parameters (vars) to dialog
Last updated: 2024-06-05
Which Lib to use, connect to a socket with URL instead of IP address
CODESYS Forge
talk
(Thread)
Which Lib to use, connect to a socket with URL instead of IP address
Last updated: 2024-06-17
is it possible to connect to a newer runtime from HMI runtime 3.5.16
CODESYS Forge
talk
(Thread)
is it possible to connect to a newer runtime from HMI runtime 3.5.16
Last updated: 2024-07-02
The Ultimate Guide to Taxi Services in the UK: From Airports to City Travels
CODESYS Forge
talk
(Thread)
The Ultimate Guide to Taxi Services in the UK: From Airports to City Travels
Last updated: 2024-08-08
Navigating the UK with Ease: Your Guide to Taxi Services from Major Cities to Key Destinations
CODESYS Forge
talk
(Thread)
Navigating the UK with Ease: Your Guide to Taxi Services from Major Cities to Key Destinations
Last updated: 2024-08-08
how to extract the name of an FB to a variable
CODESYS Forge
talk
(Thread)
how to extract the name of an FB to a variable
Last updated: 2024-10-01
Post by joshskellig on Publish a JSON payload via MQTT Publish (using IIot Libraries)
CODESYS Forge
talk
(Post)
I am trying to figure out how to get a JSON payload to properly publish to my MQTT Broker. I am able to generate JSON using the examples from Codesys, but when I send that payload via MQTT there are characters that are extra or not recognized by my MQTT client. Any idea what could be causing it? PROGRAM PLC_PRG VAR hostname: STRING := 'localhost'; port: UINT := 1883; topic: WSTRING(1024) := "testing/"; payload: BYTE; factory : JSON.JSONDataFactory; eDataFactoryError : FBF.ERROR; pJsonData : POINTER TO JSON.JSONData := factory.Create(eError => eDataFactoryError); fb_JBuilder : JSON.JSONBuilder; wsValue : WSTRING := "Value1"; diRootIndex, diObject1Index : DINT; iValue : INT := 1234; jsonArrayWriter : JSON.JSONByteArrayWriter; wsJsonData : WSTRING(1000); xFirst : BOOL := TRUE; mqttClient: MQTT.MQTTClient; mqttPublish: MQTT.MQTTPublish; mqttPublishProperties: MQTT.MQTTPublishProperties := (bPayloadFormatIndicator := 1, wsContentType := "application/json"); END_VAR // Json Functionality IF xFirst THEN fb_JBuilder(pJsonData := pJsonData, diRootObj => diRootIndex); fb_JBuilder.SetKeyWithValue("Key1", wsValue, diParentIndex := diRootIndex); diObject1Index := fb_JBuilder.SetKeyWithObject("Key2", diParentIndex := diRootIndex); fb_JBuilder.SetKeyWithValue("Key3", iValue, diParentIndex := diObject1Index); xFirst := FALSE; END_IF jsonArrayWriter(pwData := ADR(wsJsonData), udiSize := SIZEOF(wsJsonData), jsonData := pJsonData^, xAsyncMode := FALSE); MSU.StrTrimW(pString:= ADR(wsJsonData)); // MQTT Functionality mqttClient( sHostname:=hostname, uiPort:=port, eMQTTVersion:=MQTT.MQTT_VERSION.V5 ); mqttPublish( mqttClient:=mqttClient, pbPayload:=ADR(wsJsonData), udiPayloadSize:=SIZEOF(wsJsonData), wsTopicName:=topic, mQTTPublishProperties:=mqttPublishProperties );
Last updated: 2024-04-10
Post by marek71 on Ambiguous use of name - CO136
CODESYS Forge
talk
(Post)
My PLC is WAGO PFC200 Firmware Revision 26. target After updating WAGO_Devices_and_Libraries with newer Firmware 27, CODESYS wants to update all libraries to new versions. I will only add that I did not update the Firmware in the PLC. After compiling the program, I received the following errors: ------ Build started: Application: Device.Application ------- Typify code... [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): FbSerialInterface_internal: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): FbSerialInterface_internal: C0136: Ambiguous use of name 'RTS_IEC_RESULT' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0032: Cannot convert type 'Unknown type: 'RTS_INVALID_HANDLE'' to type 'POINTER TO BYTE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0136: Ambiguous use of name 'RTS_INVALID_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0046: Identifier 'RTS_INVALID_HANDLE' not defined [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_is_tx_empty: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_get_line_state: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_is_line_available: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): COMSW_SET_MODE: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_set_line_state: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' Compile complete -- 10 errors, 0 warnings Build complete -- 10 errors, 0 warnings : No download possible The problem was caused by the WagoSysPlainMem(WAGO) library in the original version 1.5.3.0 after updating to 1.5.3.1. After returning to version 1.5.3.0, the problems disappeared. Probably the version number of this library is responsible for supporting the appropriate Firmware Revision. Can anyone confirm or deny my suspicions?
Last updated: 2024-07-06
Import RsLogix 5000 project to Codesys
CODESYS Forge
talk
(Thread)
Import RsLogix 5000 project to Codesys
Last updated: 2023-09-07
IMAGE DISPLAY ACCORDING TO INPUT VARIABLE
CODESYS Forge
talk
(Thread)
IMAGE DISPLAY ACCORDING TO INPUT VARIABLE
Last updated: 2023-09-12
Retain memory change to ZERO
CODESYS Forge
talk
(Thread)
Retain memory change to ZERO
Last updated: 2023-09-19
Fail to download missing libraries
CODESYS Forge
talk
(Thread)
Fail to download missing libraries
Last updated: 2021-11-12
Moved To: Control double acting valve
CODESYS Forge
talk
(Thread)
Moved To: Control double acting valve
Last updated: 2016-10-18
How to configure OPC-UA server
CODESYS Forge
talk
(Thread)
How to configure OPC-UA server
Last updated: 2018-12-03
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
.