You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

View Poll Results: Do you like spaces
Spaces 4 16.00%
Tabs 15 60.00%
Spaces and Tabs. I also put knives where the spoons should go. 6 24.00%
Voters: 25. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old January 21st, 2020, 06:03 AM   #1
AustralIan
Member
Germany

AustralIan is online now
 
Join Date: Jan 2013
Location: Germany
Posts: 1,117
Tabs vs Spaces?

Tabs vs Spaces?
And if Tabs, what size do you make your tabs? 1 Tab = 8 spaces?
  Reply With Quote
Old January 21st, 2020, 06:15 AM   #2
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 1,658
Asvotediusebothtabsandspacesotherwiseitwouldbediff iculttoread
  Reply With Quote
Old January 21st, 2020, 07:14 AM   #3
bjh
Member
United States

bjh is offline
 
Join Date: Jul 2010
Location: Madison, WI
Posts: 253
1 tab = 4 spaces, you uncultured so and so.


Mix it up, that's what I say
  Reply With Quote
Old January 21st, 2020, 07:27 AM   #4
Rson
Member
United States

Rson is offline
 
Join Date: Jun 2017
Location: Michigan
Posts: 288
What is the context?

A text file?

Then tabs.
  Reply With Quote
Old January 21st, 2020, 08:11 AM   #5
Tom Jenkins
Lifetime Supporting Member
United States

Tom Jenkins is offline
 
Tom Jenkins's Avatar
 
Join Date: Apr 2002
Location: Milwaukee, WI
Posts: 6,029
I like pull tabs on my beer cans. I like wide, open spaces out West for horseback riding. And who says that the spoons and forks shouldn't mingle - sounds a bit discriminatory to me!
  Reply With Quote
Old January 21st, 2020, 08:23 AM   #6
mylespetro
Supporting Member
Canada

mylespetro is offline
 
mylespetro's Avatar
 
Join Date: Dec 2015
Location: NS
Posts: 218
Quote:
Originally Posted by Tom Jenkins View Post
And who says that the spoons and forks shouldn't mingle - sounds a bit discriminatory to me!

Spoons and forks are great, otherwise we would never have the spork. Spoons and knives were what was being discussed in the poll. Only a madman would mix spoons and knives!
  Reply With Quote
Old January 21st, 2020, 09:10 AM   #7
bjh
Member
United States

bjh is offline
 
Join Date: Jul 2010
Location: Madison, WI
Posts: 253
Quote:
Originally Posted by mylespetro View Post
Only a madman would mix spoons and knives!

Ever heard of a grapefruit spoon?
  Reply With Quote
Old January 21st, 2020, 09:29 AM   #8
Jonnie_R
Member
Wales

Jonnie_R is offline
 
Join Date: Feb 2012
Location: Brecon
Posts: 195
Next you lot will saying you comment your code
  Reply With Quote
Old January 21st, 2020, 11:44 AM   #9
Tom Jenkins
Lifetime Supporting Member
United States

Tom Jenkins is offline
 
Tom Jenkins's Avatar
 
Join Date: Apr 2002
Location: Milwaukee, WI
Posts: 6,029
Quote:
Originally Posted by mylespetro View Post
Spoons and forks are great, otherwise we would never have the spork. Spoons and knives were what was being discussed in the poll. Only a madman would mix spoons and knives!
  Reply With Quote
Old January 21st, 2020, 03:30 PM   #10
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 3,071
All you people mixing your cutlery are playing a dangerous game...





Apologies to xkcd
  Reply With Quote
Old January 21st, 2020, 07:10 PM   #11
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
Join Date: Nov 2011
Location: Corona, CA
Posts: 1,666
In Singapore, you rarely see a knife....they use the edge of the spoon to cut.
__________________
****Control Freak****
Net is where I be and Nathan is me.
  Reply With Quote
Old January 21st, 2020, 09:22 PM   #12
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 320
1 Tab = 9 (or 11;-) and therefore evil.

I won't be happy until I can write a LD with VI.

Stop spinning me up, doggone it!
  Reply With Quote
Old January 22nd, 2020, 03:21 PM   #13
MikeyN
Lifetime Supporting Member
United States

MikeyN is offline
 
Join Date: Dec 2017
Location: Illinois
Posts: 66
Quote:
Originally Posted by drbitboy View Post
I won't be happy until I can write a LD with VI.
I don't see why you couldn't. This is from an older PILZ model that handles the safeties on one of our presses. The only way I am able to view the program is by printing the FB to a text file. They give you the option of LAD or STL.

Code:
│ = STRT    = Enbl                                                     M  097.00
│                                                                               
└───┤ ├───────┤ ├─────────────────────────────────────────────────────────(=)──┤
                                                                                
│ = STOP    = Enbl                                                     M  097.01
│                                                                               
└───┤ ├───────┤ ├─────────────────────────────────────────────────────────(=)──┤
                                                                                
│ = TDC                                                                M  097.02
│                                                                               
└───┤ ├───────────────────────────────────────────────────────────────────(=)──┤
Just for fun I opened the text file in VIM, it looks quite nice.
__________________
C:\Dos
C:\Dos Run
Run Dos Run
  Reply With Quote
Old January 22nd, 2020, 09:04 PM   #14
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,049
I use VIM instead of Vi. I use to use VI a lot a long time ago but I didn't like having to switch back and forth between the modes.

It should be possible to enter LD using text like Rockwell does.

I use 8 space tabs for word processing and assembly language programming and 4 space tabs for C and C++. I use 4 spaces for python and 2 or 4 spaces for ST.
Memory use to be a problem a long time ago but now it is cheap so tabs aren't as necessary.

I haven't done assembly language programming for a long time now.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old January 23rd, 2020, 07:30 AM   #15
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 320
I use VIM too, I only wrote "VI" generically. I usually install VIM on my systems when I get tired of having only one undo level, and the command is still [vi].

Interesting about exporting the LD as text. Can you also import it? Otherwise I still cannot usefully write (i.e. do more than view) LDs with VI. What is the key sequence to enter any non-ASCII characters, Control-V something (I am not a power-VI guy)?

oh yeah, 2 spaces for indentation in any context: memory is cheap but horizontal screen space is not; and usually I fold anything that goes beyond column 72.

Stop spinning me up!

Last edited by drbitboy; January 23rd, 2020 at 07:34 AM. Reason: added indentation joke
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
RSlogix 5000 v24.00 ladder editor tabs nmurray LIVE PLC Questions And Answers 7 March 21st, 2019 05:44 PM
Citect v 7.5 menu tabs Jimmyflinn23 LIVE PLC Questions And Answers 4 January 13th, 2016 05:27 PM
Faceplate / Header tabs BTL5 LIVE PLC Questions And Answers 1 December 31st, 2015 12:15 PM
1747-BAS Stop PRINT spaces controlconcepts LIVE PLC Questions And Answers 6 March 31st, 2014 01:02 PM
RS TrendX properties have dummy tabs vkolluru LIVE PLC Questions And Answers 0 June 6th, 2007 09:57 AM


All times are GMT -5. The time now is 12:08 PM.


.