simple question AB Micro830 time conversion

PLCben79

Member
Join Date
May 2013
Location
Hemel Hempstead
Posts
7
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
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
169
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
249
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
316
Been working with PLCs for a couple of decades, but almost 100% DirectLogic. Have a customer who wanted me to make a couple of simple changes to a...
Replies
3
Views
1,122
Will going online with a modicon controller in Proworx 32 write to the controller? I have a backup of the program open and would like to go...
Replies
5
Views
2,161
Back
Top Bottom