Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Formatting date and time in Post


Bocho
 Share

Recommended Posts

I hate to ask a Dreaded Post question with so few postings on the forum, but I'll risk the "Gauntlet" anyway. My Fanuc 6-M doesn't like colons,ie,:, and therefore replaces them with a letter O. As you might imagine, this makes a nasty looking time output on the Fanuc's screen. Is there a way to format the date output from the post or is this hard-coded output from the C languge? Thanks in advance, Tim

Link to comment
Share on other sites

No I think that is more of a windows thing than anything even if you go to military time it still uses the : I have program set up like this.

code:

 O9999 (03HOLE2)

(MC9 FILE - C:2003_MC92905_MC903FLIPPED.MC9)

(PROGRAM LOCATION - CNC_DELTANC_PROGRAMS2905_NC03HOLE2.NC)

(DATE - OCT-10-03)

(TIME - 16:31)

(T8 | 1/8 FLAT ENDMILL | H8 | D8 | D0.1250" | | CONTOUR....)

G0G17G40G80G90

T8M6( 1/8 FLAT ENDMILL)

(MAX | Z.25)

(MIN | Z-.1083)

I use the colon at the C: and really like thisa layout and again that is a wondows thing I beleive. I hoping if I am brave enough to start toehrs will follow. Good question.

 

Crazy Millman

 

We dont mind helping you fix your post just dont ask us to give you our posts. wink.gifwink.gif

Link to comment
Share on other sites
Guest CNC Apps Guy 1

I replaced mine with "*". You've asked a good post question. "How do I do this?", not Does anyone have a post for this..." Big difference.

 

Welcome to the forum!!! cheers.gifcheers.gifcheers.gif

Link to comment
Share on other sites
Guest CNC Apps Guy 1

How's this?

 

code:

# --------------------------------------------------------------------------

# Select month

smon00 ""

smon01 "JAN"

smon02 "FEB"

smon03 "MAR"

smon04 "APR"

smon05 "MAY"

smon06 "JUN"

smon07 "JUL"

smon08 "AUG"

smon09 "SEP"

smon10 "OCT"

smon11 "NOV"

smon12 "DEC"

smonth

 

fstrsel smon00 month smonth

code:

      "(DATE      - ", *smonth, "-", *day, "-", *year, ")", e

HTH

 

[ 11-05-2003, 12:27 PM: Message edited by: James Meyette ]

Link to comment
Share on other sites

James,

 

What part of the post does this go into?

 

quote:

# ----------------------------------------------------------------

#Select month

smon00 ""

smon01 "JAN"

smon02 "FEB"

smon03 "MAR"

smon04 "APR"

smon05 "MAY"

smon06 "JUN"

smon07 "JUL"

smon08 "AUG"

smon09 "SEP"

smon10 "OCT"

smon11 "NOV"

smon12 "DEC"

smonth

fstrsel smon00 month smonth


Thanks

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Before the

 

code:

# --------------------------------------------------------------------------

# General G and M Code String select tables

# --------------------------------------------------------------------------

Usually the time is expressed in 24 hour format.

 

I don't know how to change the time format from ":" to anything else.

 

Dave??? You out there?

 

 

HTH

 

[ 11-05-2003, 01:11 PM: Message edited by: James Meyette ]

Link to comment
Share on other sites

Thnaks James for Teaching me soemthing on this one. That book keeps on a Growing I tell you.

 

 

Crazy Millman

 

If you both Download the Mpmaster post you can see where this in use the copy and paste this into your existing post. I as alway recommned backing up before doing any post mod so if you mess up to bad just start over, Been there done that so just try it and do a little at a time so you can see how things work.

 

[ 11-05-2003, 01:10 PM: Message edited by: Millman^Crazy ]

Link to comment
Share on other sites

The following are segments from the MPFADAL2.PST ->

 

code:

  

# These formats used only for 'Date' & 'Time'

fs2 25 2.2 2.2lt #Decimal, force two leading & two trailing (time2)

fs2 26 2 0 2 0t #Integer, force trailing (hour)

fs2 27 0 2 0 2lt #Integer, force leading & trailing (min)

code:

# -------------------- Date & Time Formatting ------------------------------

fmt 25 time2 # Capture 24-hour time value into 'time2' variable

fmt 26 hour # Hour

fmt 27 min # Minutes

# Uncomment the 'fmt' for 'day' and/or 'month' if you only want 1-digit format

#fmt 26 day # Day (2 digit format)

#fmt 26 month # Month (2 digit format)

code:

ptime           #Turn 24-hour time format into AM/PM format

!spaces

spaces = zero

if time >= 13, time2 = (time - 12)

else, time2 = time

hour = int(time2)

min = frac(time2)

*hour, ":", *min,

if time > 12, " PM"

else, " AM"

spaces = prv_spaces

Link to comment
Share on other sites

James,

Can you not using the string functions change the nth character in the string into something else an then put the string back together. I used to do this in BASIC, but ... You don't use it you loss it. It's been too long. I think according to the post manual something like this can be done. A bit of newtime$=oldtime$ manipulated kind of thing?

TIM

Link to comment
Share on other sites
Guest CNC Apps Guy 1

quote:

How do I get rid of teh extra spaces between month, day and year?

Uhhh,

 

code:

spaces      : 0     #Number of spaces to add between fields

Try that one first. If not, change this;

quote:

*progno, "(EMCO", " ", progname," ",*smonth,"-",*day,"-",*year,")", e


to this;

 

quote:

*progno, "(EMCO", progname, *smonth, *day, *year,")", e


HTH

Link to comment
Share on other sites

James,

 

Changing spaces to 0 removed spaces everywhere. I ended up removing the "-" between each word.

 

Now it post month day year (no spaces though). Thats better than day month year. Never could get used to that.

 

Thank you all for your efforts.

I learn a little more every day.

Link to comment
Share on other sites

well i had the error on line 350 , now is

Variable not defined: smon00

Post line number 348

 

confused.gif

 

i have this

 

# --------------------------------------------------------------------------

#Select month smon00 ""

smon01 "JAN"

smon02 "FEB"

smon03 "MAR"

smon04 "APR"

smon05 "MAY"

smon06 "JUN"

smon07 "JUL"

smon08 "AUG"

smon09 "SEP"

smon10 "OCT"

smon11 "NOV"

smon12 "DEC"

smonth

fstrsel smon00 month smonth

# --------------------------------------------------------------------------

# General G and M Code String select tables

# --------------------------------------------------------------------------

 

[ 11-05-2003, 04:02 PM: Message edited by: T@T@LO ]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...