Thank you for the kind feedback. We're excited about where we've started and where we can get to. This leads me into...
A couple of questions. Subroutines, is GOTO same as JUMP? What is a GOSUB? Is that your Program Block?
We do not support CALLABLE functions or subroutines YET (i.e. multi-parameter functions you would call from a MATH expression, or user defined ladder subroutine boxes).
However, we do support the concept of PROGRAM code-blocks and TASK code-blocks. I like to think of PROGRAM code-blocks as another PROGRAM that runs, like $Main (you use the RUN instruction to initiate). TASK code-blocks have two modes - edge triggered where they run through the code ONCE, then they are done (sort of a subroutine, but they are NOT executed INLINE like a CALL), and the other mode is "interval-based" where that logic can run every 100ms or whatever. There are some built-in SYSTEM TASKS that run once very 50ms, 100ms, and 1sec ($t50ms, $t100ms, and $t1second). You would use the ENTASK instruction to "enable" a user task (system task enabling is already handled).
Look in the Help for topic DMD0231 Programs and Tasks Overview, along with all related topic links from there. That should help.
Here's an online link to that topic
http://forum.hosteng.com/wndm/HTMLHelp1/Programs_and_Tasks/Programs_and_Tasks_Overview.htmI have my first request. LABEL need to be a NAME, not number. Can it be?
Possibly, but the name would still have to be tied to a unique ID. Beware of over-using GOTO/LABEL, skipping over logic is not normal (especially instructions that have STATE), or re-executing logic is sometimes not good (again, especially instructions that have STATE). Also, looping (FOR/NEXT, WHILE/WEND, REPEAT/UNTIL) should rarely be used, possibly in a separate PROGRAM or TASK code-block that is doing some well-bounded, well-defined algorithm (e.g. bubble sort). The Ladder Scan is itself a great big loop, updating I/O every time through the logic. You want this to be FAST - looping can KILL your scan time (i.e. your I/O update time). We have some cool architectural features in the instruction set for keeping I/O update times low when you need to do looping (e.g. nested FOR loops in a Bubble Sort), but you rarely do looping in a PLC.
I'm not getting the sequence right on starting a new Main program when one is in the editor and in the PLC. Seems like I tried New and New Online and I get the program that's in the PLC or I get a clear ladder but it doesn't see the PLC configuration. What's the sequence of ending one program and starting a new that's going to replace the on in PLC memory?
This is a sticking point for new people. There are technically 2 or 3 "copies" of the same "project" at one instance. The one in the PLC, the one on DISK, and the one you are currently modifying in Designer but have not saved to DISK or PLC yet.
You can start an OFFLINE disk project by doing File->New Project->Offline. This is when you don't have a PLC available, or don't want/need to associate it with an actual PLC yet. Make changes, save to disk, File->Open will open that disk project later. Once you are ready to download an OFFLINE project to a PLC, do PLC->Connect, which will associate that OFFLINE DISK project with a specific Communications Link (and hence a PLC). You will be prompted during the connection process if you want to utilize the contents on DISK or the contents in the PLC. Choose the one you want to work with (probably the one on DISK if this is what you started with).
You can also start a new Online project (but this is not an "empty" new project) File->New Project->Online where you select the communications link. This is more like an "open online project", not really a "new" (empty) online project. You could technically go THAT route and do a PLC->Clear PLC to create a new (empty) project in the PLC. You must be careful when clearing PLCs (especially if you have more than 1).
We don't have a good way to clear an OFFLINE project without also clearing what's in the PLC. If you have a HARDWARE configuration in a PLC that you LIKE, I would do the following:
1. File->New Project->Online
2. Save that project to Disk under a new name.
3. Do PLC->Disconnect
4. Make sure you are in Edit Mode (Ctrl+E to toggle). In $Main Ladder View, do Ctrl+A (to Select All), then hit the Delete key.
5. Right click on any other code-blocks in the Project Browser and select Remove Code-Block.
If you don't care about saving the LOGIC in your PLC, but WANT TO KEEP your SYSTEM CONFIGURATION in your PLC, you can simply do:
1. File->New Project->Online
2. PLC->Clear PLC Memory
3. UNcheck the System Configuration, and possibly/probably UNcheck Documentation, System RAM, Image Register, and/or Password Configuration. CHECK Program and Read from PLC after completion.
Hit the Clear! button.
If you don't care about saving ANYTHING in your PLC (e.g. clear CTRIO configurations, etc.), simply do:
1. File->New Project->Online
2. PLC->Clear PLC Memory
(use the defaults), hit the Clear! button.