PLCben79
Member
this will be a simple answer for someone who is used to allen bradley
im using a Micro830 with a 2711-T6T panelview, and programming with CCW in ladder and FB
the process is motor control. in automatic mode i have a timer that idles the motors for 10 to 20 mins incase the user wants to start the conveyor again (to stop motors stop starting)
i want to make the timeout adjustable. i have built the screen no problem, my problem is in data types and conversion to milliseconds
the user enters timeout in minutes, say 10
to convert this unsigned integer to time i use ANY_TO_TIME FB, however this only outputs milliseconds
so I take the 10 and multiply by 600000 which my understanding the result (BLW_MS) will be a LINT long integer, i then pass this to ANY_TO_STRING and feed that in to ANY_TO_TIME.
But when I compile i get the error BLW_MS: Expecting a DINT type variable, if i change the Var data type to DINT i get a whole load more errors
what am i doing wrong i sure its simple
im using a Micro830 with a 2711-T6T panelview, and programming with CCW in ladder and FB
the process is motor control. in automatic mode i have a timer that idles the motors for 10 to 20 mins incase the user wants to start the conveyor again (to stop motors stop starting)
i want to make the timeout adjustable. i have built the screen no problem, my problem is in data types and conversion to milliseconds
the user enters timeout in minutes, say 10
to convert this unsigned integer to time i use ANY_TO_TIME FB, however this only outputs milliseconds
so I take the 10 and multiply by 600000 which my understanding the result (BLW_MS) will be a LINT long integer, i then pass this to ANY_TO_STRING and feed that in to ANY_TO_TIME.
But when I compile i get the error BLW_MS: Expecting a DINT type variable, if i change the Var data type to DINT i get a whole load more errors
what am i doing wrong i sure its simple