Personal Data

Username:
weixintan
Joined:
2021-11-05 15:23:32+00:00

Projects

  • No projects to display.

Skills

  • No skills entered.

User Activity

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    For those who are interested btw, https://stackoverflow.com/questions/70694759/converting-lreal-to-binary-and-interpreting-it-as-base-10-lint/70696435#70696435 has a far more elegant solution

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    For those who are interested btw, https://stackoverflow.com/questions/70694759/converting-lreal-to-binary-and-interpreting-it-as-base-10-lint/70696435#70696435 has a far more elegant solution

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hey @i-campbell, thanks for taking a look I think you're right in that I am actually implementing Float.floatToRawIntBits(f) as seen in https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/share/classes/java/lang/Float.java#L782 What I actually did was actually get some inputs and outputs e.g. - Float.floatToRawIntBits(1.5f) should return - 4609434218613702656 for double precision float or - 1069547520 for single precision float - Float.floatToRawIntBits(20.12f)...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello, running "CODESYS V3.5 SP16" here, I am trying to implement the hashcode algorithm mentioned in https://stackoverflow.com/questions/113511/best-implementation-for-hashcode-method-for-a-collection/113600#113600 and had to built my own solution to replicate Java's Float.floatToIntBits(f) which resulted in the following function FUNCTION F_lrealToLintBits : LINT VAR_INPUT lrVal : LREAL; END_VAR VAR arrBytes : ARRAY[0..7] OF BYTE; // LREAL contains 64 bits and each byte contains 8 bits pVal : POINTER...

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Running "CODESYS V3.5 SP16", is what is mentioned in the title by design? PROGRAM PLC_PRG {IF defined (TEST)} {info 'TEST defined'} {ELSE} {info 'TEST not defined'} {END_IF} Compiling the above with yields [INFORMATION] TestProject: PLC_PRG [Device: PLC Logic: Application](Line 4, Column 1 (Impl)): TEST not defined whereas compiling the above with yields [INFORMATION] TestProject: PLC_PRG [Device: PLC Logic: Application](Line 2, Column 1 (Impl)): TEST defined Asking because documentation at https://help.codesys.com/webapp/_cds_dlg_properties_build;product=codesys;version=3.5.17.0...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Running "CODESYS V3.5 SP16", is what is mentioned in the title by design? PROGRAM PLC_PRG {IF defined (TEST)} {info 'TEST defined'} {ELSE} {info 'TEST not defined'} {END_IF} Compiling the above with yields [INFORMATION] TestProject: PLC_PRG [Device: PLC Logic: Application](Line 4, Column 1 (Impl)): TEST not defined whereas compiling the above with yields [INFORMATION] TestProject: PLC_PRG [Device: PLC Logic: Application](Line 2, Column 1 (Impl)): TEST defined Asking because documentation at https://help.codesys.com/webapp/_cds_dlg_properties_build;product=codesys;version=3.5.17.0...

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Yeah it also took me awhile to get it correct, the profile argument is very sensitive and has to get the correct string (quotes and all) otherwise it will just open the GUI This is what I used to use to run CODESYS python scripts from PowerShell 7.2 function _start_codesys_process { [cmdletbinding()] param( [validatenotnullorempty()] [parameter(mandatory=$true, helpmessage='Path to CODESYS.exe')] [string]${codesys_bin_path}, [validatenotnullorempty()] [parameter(mandatory=$true, helpmessage='Profile...

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hi, running "CODESYS V3.5 SP16" here, does anyone have the same problem with the method in the title? PROGRAM PLC_PRG VAR itfAxisRef : SM3_Basic.IAxisRef; pAxisRefSm3 : POINTER TO SM3_Basic.AXIS_REF_SM3; END_VAR pAxisRefSm3 := itfAxisRef.GetAxisRefPointer; Trying to compile the above throws the following error C0032: Cannot convert type 'GETAXISREFPOINTER(sm3_basic, 4.10.0.0 (3s - smart software solutions gmbh))' to type 'POINTER TO SM3_Basic.AXIS_REF_SM3' which has me really confused because I've...

View All