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 - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old January 8th, 2018, 03:39 AM   #16
United Kingdom

cardosocea is offline
Join Date: Nov 2016
Location: Duxford
Posts: 615
Originally Posted by AustralIan View Post
But in seriousness, for C waitFor is done like this

while ( !inPos )
// do nothing
Came late to the thread and others have pointed the mistake with this approach.
In C programming, if possible (which is not very common), you would always add a timeout in that while loop.
Either by adding a variable that gets incremented inside the while or by taking the time it first arrived at that point and compare it against the system's clock.
  Reply With Quote
Old January 8th, 2018, 01:21 PM   #17
United States

dwoodlock is offline
dwoodlock's Avatar
Join Date: Nov 2012
Location: South Carolina
Posts: 381
Endless loop weekend calls are the best! Of course they never occur when you're at work.

can cross that off my list...
  Reply With Quote
Jump to Live PLC Question and Answer Forum


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
Unity Pro XL Programming Questions (Timers & Input Activation) cnemeth LIVE PLC Questions And Answers 1 January 13th, 2014 06:16 AM
Best practice for programming in Step 7 glnassaf LIVE PLC Questions And Answers 10 January 3rd, 2013 04:03 AM
sequence programming seee LIVE PLC Questions And Answers 1 August 21st, 2012 09:14 PM
FB programming simulator 100 MOhm LIVE PLC Questions And Answers 3 December 1st, 2004 05:45 AM
SIEMENS S5 - Programming port damaged !! ayman metwally LIVE PLC Questions And Answers 2 August 19th, 2004 11:08 AM

All times are GMT -5. The time now is 06:57 AM.