### Personal Data

wiresplus
Joined:
2024-01-15 21:02:33.226000
Location:
Auckland / New Zealand / NZDT
Web Site:

### Projects

• No projects to display.

### User Activity

• Posted a comment on discussion Engineering π¬π§ on CODESYS Forge

Hello, Depends on the architecture of your PLC. If the PLC is a PC-based item with a normal desktop environment, then you probably can. I find it simpler to install an IIoT Router in the panel, and use an encripted VPN to link to my office PC / Laptop on demand.

• Modified a comment on discussion Engineering π¬π§ on CODESYS Forge

Thankyou. worked fine.

• Posted a comment on discussion Engineering π¬π§ on CODESYS Forge

OK! PSA for others: Data type INT fails because it has no decimal places, and using it in the math when it is any value below 1 simply returns 0. As it will always calculate to 0.xxx in the first part of the math, only the 0 without any decimal places is passed to the second part of the math - and anything multiplied by 0 is 0! I changed PumpFillSpeed to REAL, and then used REAL_TO_WORD.

• Modified a comment on discussion Engineering π¬π§ on CODESYS Forge

Hello, I need to take an INT input, and convert it to a WORD value. VAR DRV2Speed : WORD; //IO card takes a WORD where 16000 = full 10V output (equivalent to 50Hz) PumpFillSpeed : INT; //Users enter a value between 0 and 50 END_VAR IF <conditions> THEN DRV2Speed :=INT_TO_WORD((PumpFillSpeed/50)*16000); END_IF </conditions> According to me this should work - but it stays at 0, no matter what. What am I doing wrong?

• Posted a comment on discussion Engineering π¬π§ on CODESYS Forge

Hello, I need to take an INT input, and convert it to a WORD value. VAR DRV2Speed : WORD; //IO card takes a WORD where 16000 = full 10V output (equivalent to 50Hz) PumpFillSpeed : INT; //Users enter a value between 0 and 50 END_VAR IF <conditions> THEN DRV2Speed :=INT_TO_WORD((PumpFillSpeed/50)*16000); END_IF </conditions> According to me this should work - but it stays at 0, no matter what. What am I doing wrong?

• Posted a comment on discussion Forge π¬π§ on CODESYS Forge

Hello, I have a simple TON timer. It is watching prime loss for a pump. The operator can set the delay via the HMI, it is an integer (seconds) As the TON uses milliseconds, we then multiply the entry by 1000 to get seconds. Seems simple, but... VAR PrimeTimer : TON; primetime : INT; END_VAR PrimeTimer(in:=State>0 AND FlowRate<MinimumFlow,pt:=INT_TO_TIME(primetime *1000)); For an entered 15 seconds (VAR primetime:=15;) the timer reads 49d17h2m26s760ms !!!! What am I doing wrong?

View All