Search Project: *:*

 
<< < 1 .. 3634 3635 3636 3637 3638 .. 3660 > >> (Page 3636 of 3660)

wiki Discussion nehaltrivedi96 wiki (Discussion)
Forum for wiki comments
Last updated: 2026-02-18

blog Discussion nehaltrivedi96 blog (Discussion)
Forum for blog comments
Last updated: 2026-02-18

Home nehaltrivedi96 wiki (WikiPage)
Project Members: nehaltrivedi96 (admin)
Last updated: 2026-02-18

(no subject) nehaltrivedi96 wiki (Thread)
Last updated: 2026-02-18

Post by nehaltrivedi96 on Modbus connection via Qronox PCD3 M6893 CODESYS Forge talk (Post)
Hello, I am currently scaling 4-20mA signals and the scaled output (temperature) has to be sent via modbus protocol to a tool like doctor modbus or modbus poll. I have defined my inputs as real as and the output is also real, but to send this output via modbus it has to be of word. So how will i convert real into word and then send the generated output via modbus?
Last updated: 2026-02-18

Post by risele on Modbus connection via Qronox PCD3 M6893 CODESYS Forge talk (Post)
You are welcome. Also note, that it's valid only if you modbus-device use same real/float value representation (IEEE 754). That's true for most of systems. But some devices may have other representation, such as integer + position of the decimal point, for example 123.456 is integer = 123456 and position = 3 Also note, that, ones again, depending on endianess of each system, you may also need to swap not just words, but bytes. TYPE u_Real : UNION rVal:REAL; wVal:ARRAY[0..1] OF WORD; bVal:ARRAY[0..3] OF BYTE; dwVAL:DWORD; //same as previous, may be easier to specify the MB register END_UNION END_TYPE than swapping may be something as VAR A,B,C,D:BYTE; //Bytes of the real value uIn, uOut:u_Real; rVal:REAL; ModbusReg1,ModbusReg2:WORD; END_VAR uIn.rVal:=rVal; uOut.A:=uIn.D; uOut.B:=uIn.C; uOut.C:=uIn.B; uOut.D:=uIn.A; ModbusReg1:=uOut.wVal[0]; ModbusReg1:=uOut.wVal[2]; Or you even need to reorder bits... Ones again, sending float/real values is not defined by Modbus protocol itself, so it is hardware- and software-dependent. The Modbus Poll (and most of modbus tools) have configuration parameters that will properly swap bytes on their side. Ones again, that's very helpful: https://www.scadacore.com/tools/programming-calculators/online-hex-converter/
Last updated: 2026-02-19

Post by risele on Modbus connection via Qronox PCD3 M6893 CODESYS Forge talk (Post)
First, if you don't need to change conversion rules in runtime, take a look at "Unit conversion" module (Application -> add object -> UnitConversion). You can specify there biderectional conversion with different units, limits and so on. Second, since MODBUS don't have "real" types but only general 16-bit registers and Real is 32-bit, generally you need a byte-was conversion Real <> two Words. Note, that depending on the devices on both sides, there are two options: Real-> Word1, Word2 or Real-> Word2, Word1, where Word1 is minor register in Modbus register pair and Word2 is major. You can use simple union: TYPE u_Real : UNION rVal:REAL; wVal:ARRAY[0..1] OF WORD; dwVAL:DWORD; //same as previous, may be easier to specify the MB register END_UNION END_TYPE and convert it as following: VAR myUnion:u_Real; rValue_TO_SEND:REAL; rValue_TO_GET:REAL; END_VAR myUnion.rVal:=rValue_TO_SEND; rValue_TO_GET:=myUnion.rVal; Note, that WORD-order should be properly set in MODBUS registers, otherwise you will get strange values. This tool is helpful: https://www.scadacore.com/tools/programming-calculators/online-hex-converter/ Alternative, you can use functions as REAL_TO_DW and DW_TO_REAL from OSCAT_BASIC, for example.
Last updated: 2026-02-19

Post by nehaltrivedi96 on Modbus connection via Qronox PCD3 M6893 CODESYS Forge talk (Post)
Thank you for your suggestions, based on it I will modify the code
Last updated: 2026-02-18

Modbus connection via Qronox PCD3 M6893 CODESYS Forge talk (Thread)
Modbus connection via Qronox PCD3 M6893
Last updated: 2026-02-19

wiki Discussion william wiki (Discussion)
Forum for wiki comments
Last updated: 2026-02-19

blog Discussion william blog (Discussion)
Forum for blog comments
Last updated: 2026-02-19

(no subject) william wiki (Thread)
Last updated: 2026-02-19

Home william wiki (WikiPage)
Project Members: william (admin)
Last updated: 2026-02-19

Post by william on Unit testing support / libraries for EcoStruxure Machine Expert (CODESYS) CODESYS Forge talk (Post)
Hi, We are investigating available libraries and frameworks for automated PLC unit testing in Schneider EcoStruxure Machine Expert. Specifically, we are looking for: Assertion libraries or test frameworks compatible with Machine Expert CODESYS‑based solutions that are not TwinCAT‑specific Any official or community‑recommended approach for unit testing FB/FC logic offline We have found several open‑source examples, but many appear to be TwinCAT‑dependent and therefore not compatible. Are there any known libraries, best practices, or recommended approaches for implementing unit tests in Machine Expert? Thanks in advance.
Last updated: 2026-02-19

Post by pernockham on Unable to deploy "Control for Linux SL 4.18.0.0" CODESYS Forge talk (Post)
Thanks! Out of office, will check on Monday.
Last updated: 2026-02-19

Post by eschwellinger on Unable to deploy "Control for Linux SL 4.18.0.0" CODESYS Forge talk (Post)
can you please check this: https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_toubleshooting_deploytool2.html#UUID-b83dc01e-8cff-c574-7efe-8615b95a51ed_section-idm234790234401598
Last updated: 2026-02-19

Home (version 1) discussion william wiki (Thread)
Home (version 1) discussion
Last updated: 2026-02-19

wiki Discussion art617 wiki (Discussion)
Forum for wiki comments
Last updated: 2026-02-20

blog Discussion art617 blog (Discussion)
Forum for blog comments
Last updated: 2026-02-20

(no subject) art617 wiki (Thread)
Last updated: 2026-02-20

Post by a-simone on Unable to install previously installed version CODESYS Forge talk (Post)
Same problem, someone solved it?
Last updated: 2026-02-20

Unable to install previously installed version CODESYS Forge talk (Thread)
Unable to install previously installed version
Last updated: 2026-02-20

Home art617 wiki (WikiPage)
Project Members: art617 (admin)
Last updated: 2026-02-20

Post by timvh on Unit testing support / libraries for EcoStruxure Machine Expert (CODESYS) CODESYS Forge talk (Post)
If the Professsional Developer Edition (which includes the Test Manager) is not supported by Schneider, then an option is to use the Open Source Unit test framework. See: https://forge.codesys.com/lib/counit/home/Home/
Last updated: 2026-02-20

Post by william on Unit testing support / libraries for EcoStruxure Machine Expert (CODESYS) CODESYS Forge talk (Post)
Thank you, I will try it!
Last updated: 2026-02-20

<< < 1 .. 3634 3635 3636 3637 3638 .. 3660 > >> (Page 3636 of 3660)

Showing results of 91500

Sort by relevance or date