//--------------------------------------------------------------------------- // // 622C machine software. using the PC/IIO system // // PLC STRUCTURE using IIO. Copyright 1995 Jan-Olof Stenmark // // COM1 - touchscreen COM3 - Server com // COM2 - Monitor COM4 - (spare) (standalone tapemachine) // //--------------------------------------------------------------------------- // 960222-960315 Ver 1.00 PGa @ StH”ga SWEMASS / INDEL AB // First version using PC CPU to run positioning of slat infeed // and the M2400 and M3410 modules. // 960222 New orders: the machine has to be standalone operable, i.e. // it has to be programmed with the americans rules, but they are in the // same manner as the Europe std, only with inches instead. // 960227 New orders: we must! use the new SMC pneumatic modules. // change drawings, outputs not on the M2400 modules anymore. // 960304 New orders: we must! use the FOX10 and FOX20 modules instead. // change drawings, driver routines has to be modified. // 960307 New orders: ALL functions and options as is on 622A-B has to // be included, deliverydate not changed. Plus fixture changers as option // 960313 New orders: The machines are not Europe std rules but all special // according to rules "bible" brought home by Bertil today. // Very special production with double blinds on one headrail included. // 960318 New orders: The machine will now also include reading // (and controlling ?) the bow setting on the profiling unit. When color // is changed this setting should also be adjusted accordingly. // New hardware design and new SW for machine. // 960321 New: Server mode & communication will not be installed until // at least winter -96 (Bertil) // 9604xx New: Valance production has to be included in machine and server // communication. // 9604xx New: no, server-system must be delivered now! (Bertil). // Server software Is to be written by US! If we would use the specs on // communication we've already made, then we have to have US rules in the // server SW. Noone has time to write that; Scrap the specs. // We have to write simpler, special custom SW f the communication. // 9604xx New: Normal editing for machines not sufficient. // Production data is divided into "normal - displayed in list" and // "special 'details' - displayed separately" // 960429 New: Valance production has to be run by the OPERATOR. Data from // server is only recommendation. // -new panel functions, separate production sequence for valance. // Bow trim has to be connected to slat color AND to slat GAUGE. // -new code for color and gauge combined into one. // 960523 New: Endstop station logic DO has to be on these machine. // // 960603-960704 Final rush for version 1.00: // * valance production // * auto / single / hold -status display // * color change warning on Tape machine // * saving parameters list on file // * cleancut on stringtape when new color/pitch code // * restart production after a error and stringtape machine not quitted // * error message on positioning for unvalid counter position // * parameter editor now copies old value and leaves untouched if noth new // * rule list rules f MODELS : all models the same on 622 // * color change warning on Screen f slat // * direct key decodeing in editor // * saving parameters on file warning! // * Barcode pen recieving // * empty accu function // * Wait for buttons release on NRseq. // * out of material detection // * automatic bow adjusting towards slat color // * accu must be full before starting valance slat // * model related rules, skip function on activities; hole patterns // * Emptyaccu changed to ALWAYS sample mode. // * save bow/color table on disk // * triple lightbus test before failiure. // * First station now makes small rightmove before complete calibration seq. // * payoff brake logic & control // * accu must be half full if slat with "skipped" cords (tapes > cords) // * timeout error for running tape motor. // * cord knot sensor // * new IRQ timing:2ms and smart time distribution // // 960810-960607 Ver.1.01. Changes made in US by Jonas & Sweden by PG: // * Bow value memory extended to 750 (!!!!) JL/PG // * Server communication installed. JL // * Machine number added to parameter list. JL. (moved fr #15 to #48. PG) // * Saving orders onto disk & readback. JL. (Simplified. PG) // * Valance slat length finally decided by US. installed. JL. // * 6 new model names not mentioned before installed, new rules. JL. // (before there was 4) // * Swivels function played around with, when to goto mid position... JL // now back to original, goto mid pos when NRack goes down to fetch. PG. // * NRack sequence changed to skip down stroke when leaving off blind. JL/PG // * New error message "Cord calc error". if f.eq 0 result in pitch. // * Cord control length calculation adjusted to double length. JL // * Delete combination-function: delete/scroll/delete all. JL // * Barcode field length changed from 15 to 20 in orderbook. JL/PG // * if any error in calcprod; erase Endroute field. JL // * Do not start Valanceprod if 'N' eller ' ' in the Valance field. JL/PG // PG: // * Shutdown button, saving all changed data (par:s, orderbook, bowvals) // * Separate button in production screen: "Save orders". // * Start cordproduction immediately when last slat produced. // * Extra input f extra "START"-button. (prev.AUTO.button) // // 960810-960607 Ver.1.02. More changes made at Swemass/Sweden PG: // * Completely rewritten 088SEQ.CPP, tapemachine seq, now f. pulse encoder. // * "Load default" parameters button (service only) // * Sets stations for NEXT production and produces sample slat // immediately after needle rack goes up with previous production. // // 960930-961022 Ver.1.03. // * The 1st version of monitor is added. Can run through a modem line. // * Completely new profile speed regulation !! calculates production speed // at startup and then measures it for each slat, transferring a absolute // speed setpoint for the profile unit. (!!!) long awaited luxury item. // Therefore a new parameter; Profile.acc. recomm.setting: 16-25 // * Completely new barcode type containing selected production data. // The decoder routine then extracts missing data from lookup rules. // The old barcode is temporarily disenabled, but the ability to detect // and separate the two are written, see routine start if-condition. // * include & compiled for new serverSW version: 485dtr2 & network7. // now switchable on/off with #def ServerON. // * Timeout on infeed motor plus extra logic for "out of material" error // message, due to the new profile regulation. // TBDpgCH:only flip swivels when stringtapes inserted. // // 961022-961022 Ver.1.04. // * Tapemachine makes ladders = slats plus TWO. // 961028-961031 Ver.1.04. continued PG on site @Frostburg USA. // * "soon stop->low.prof.speed" function was overriding "top-sensor->stop" // * Auto-setup of stations after a production now works correctly. // * auto making of valance slats after prev. production // * message on screen "You may now shut of power to the machine !" // * after RESET, all tapemachine status is also resetted and will remake new // * at last order in list, the tapemachine now doesn't make crazy 0 order. // * new parameter for switching automatic valance prod on/off [49] // * errors from cord & tapemachine should not stop 622 production // * errors from 622 must not stop cord or tapemachine. // * use parameter for infeed pos timeout. // * "new color" indication also for cordspool#20 again but other code // * when tape machine error, it now restarts production after OP_acknowl. // * dont enable profile regulation on when main sequence is in NR-part // * color change message now resets ev. valance prod & sets sample mode // * single & auto button now resets ev. valance flag // * infeed now dont wait for mid sensor when pos.less than 45" // * coll & splice error now dont reset main seq. if it entered NR-part // TBDpgCH:ALL accu waiting now inhibits production_time_counter // * when valance or emptyaccu: wait for lift to be done at every pos.start // * restart production timer also when making Emptyaccu // * stations now setup's even if color change message is detected // * checked servo trimmings for infeeds, reconnected 24v-units 230->220VAC // * fixtures out at shutdown // * shutdowndelay on IRQ so save to disk is done in meantime fixtures out // * message on screen when doing manual "save orders" // * don't update "set defaults" button when doing select up/dn button // * don't insert fixtures when new color that inhibits auto-valance // // // 961112-961125 Ver.1.05. continued PG at SWEMASS/INDEL St.H. // * Logic error that inhibited auto adjust of bow now fixed // * IRQ time distribution logic (t_irq) to improve touchscreen response // * Adjusted motor-stop-compensation in tape machine seq. (088SEQ.CPP) // * Compile_switch ServerON added to enable running a STD PC with no // RS485 board, without having the CPU dying on You. // // 961127-961214 Ver.1.06. towards EUROPE STD!!!! PG at SWEMASS/INDEL St.H. // * Universal save-and-load-data-from/to-file functions written. // * Parameter names are now always loaded internally instead of from file // * USA/EUROPE specific code parts moved to include files 622usa/622euro. // * Compile_switch USmodel added to enable both US/EURO models in same code // * Compile_switch FoxON added to enable running w. InterrupON and no II/O // * EUROPEAN rules ! ...sofar Ultimate & European, 16 & 25mm // * Calcorder now only marks order "calcl:d" when itself changed something // * Registering and saving of lifetime counters for 2 punches & cut // * Bow regulation moved to IRQ routines so it dont stop when Warnings/Errs // * Bow setting is now changed immediately when "new color" message is given. // * em_stop moved to IRQ (now always checked no matter what screen Youre in) // * em_stop now disenable also stations pos:s when activated // * Machine name now selectable from parameter list 622/225 // * Random production enabled & finished (not applicable on US) // // 961216-961220 Ver.1.07. towards EUROPE STD!!!! PG at SWEMASS/INDEL St.H. // * Sideguide sequencies, routines & calculations // * no material input with error message! // * dual profile unit! double splice & material sensors + extra 16/25 sensor // * european cords calculations f cordmachine. (Europe Model only) // * make 1st sideguide hole routine, punch2 seq // 970107-970114 Ver.1.07. continues EUROPE STD. PG at SWEMASS/INDEL St.H. // * bow setting table now corresponds to color AND slat width, // * therefore, warning message now appears for new color AND slat width // * flag who keeps track of if 1st sideguide hole is made & in position // * emptyaccu now also works on european model // * make_sideguide_hole waste is now chopped in 2 smaller pieces // * never lift when running empty accu. // * 1st_profile_speed_calc for euro pars !!! , regulation ok! // * error messages on unauthorized buttons on manual page // * bug in select rule list interval (compare >= instead of > ) fixed // * supports manual seize to run when no stations enabled as on 225...fixed // * displays vital debug/sequence counter "Diagnostics" in production screen // * displays lifetime counters in Service Screen // * machine name defaults to 622 if other than known names (today 225 & 622) // * Calibrate stations not longer possible when needle rack down // // 970114-970317 Ver.1.08. continues EUROPE STD. PG at SWEMASS/INDEL St.H. // * Sideguide & Random slection in editor/orderlist altered to "x" markings. // * Disenabled "exit, edit & select" buttons when production is running // * Now finally station positioning remains still when em_stop released // * Special Production Screen !! special editor !! CalcSProd() // * Empty accu now feeds 4 slats. // * Model() function changed to universal OBcmp(), comparing any OBitem // * rule lists on files, f.eq. "ub25.rul", auto loading logic, default UB25 // * replace GETpar() function with atof(PAR[n]) ! // * Model names (rule files) can now be any length from 1 to 5 chars // * User tolerance added and debugged in 622pos.cpp 970111PG // * Logic in SPstat & P[n].stat improved 3->2->1->0 with user & internal tol. // * 1st sideg hole missed when chng from non sgprod to sgprod // * Sideguide & random together now works correctly // * factor 10 on slat (SPOS) and station (NPOS) accelerations // * made handling for more variables in Monitor(), dividing strings .... // * EmptyAccu now calc correct speed for profile unit // * max offset limit on station pos increased from 0.6% to 6% // * single slat possibility when Counter=0 & needlerack are awaiting // * profile speed calcs now also works at special production // * lock on service page, 'S01' barcode / keyboard // * + special entry to unlock on service page, (Model "....") // * total station shutdown & err message if last station hits max sensor // * "Servo ON" button in service menu for trimming Servo amps. // * new models HD81-"decor", HM81-"micro" rules // * does not run / move unused stations if not necessary // // 970317-970317 Ver.1.09. PG at SWEMASS/INDEL St.H. // * improved logic f profile / accu regulation to avoid slat hitting bottom. // * Extended random length span: waste+ 0 to 38mm now: 0 to 75mm // * lift emptyaccu slats if fixtures not inserted. // * temporary special version f Frostburg rules 622USA_F.CPP // * file not found warning. // // 970317-970427 Ver.1.10 PG at SWEMASS/INDEL St.H. // * Barcode decoding now written & enabled on Europe model // * Logic to remove unecessary reloads of rule file // * "security backup to floppy" button // * Time factors on tools in BlType list // * home button for order window // * all ext files updating rewritten for universal type and drive // * Tape machine parameters now in BlType list // * slat acceleration factor from rule list // * cord machine now produces according to pattern (skips not used ones) // * prof.brakes were flopping when prod. sg+rand+small blind !!! // * CH: cord lamp bug: old one did not go off when new color selected, now fixed // * scale factor on speed f slat positioning // 970427-970512 Ver.1.10 PG+JS at SWEMASS/INDEL St.H. // * New parameter: max cut length on waste diverter. // * Cutting long random pieces into several smaller. // * New error detection 90; station positioning stuck. // // 970514-970528 Ver.1.11 PG at SWEMASS/INDEL St.H. // * calculation of setpos for endstation & unused stations BUG! // ...they moved away for inifinite (?) position.. (int i inside for loop ?) // * new control of tapepitch wheel selection. (tape OPTION = 2) // * blindtypes on files now also in the US model // * tapemachine parameters in rule files for US model. // * Australian standard barcode decoding (auto detection !) // * Routless. (interlacing) new extra sequence, new output. // * Splitting stations before changing fixtures at interlacing/routless // * Language file, and string array for all messages. (not parameterlist !) // sample french language file written. // * bunching EUROPE. first step; "multi item production" -with needlerack. // // 970530-970609 Ver.1.12 PG/JS at SWEMASS/INDEL St.H. // * bunching EUROPE. (new column in order, new sequence, new output) // * bunching USA. (new column in order, new sequence, new output) // // 970609-970701 Ver.1.13 PG/JS at SWEMASS/INDEL St.H. // * double production - 2nd cut. Extra cut in middle of machine, // mostly used with bunching .... new option_switch(46)... // * New manual button in production screen for extra cut when doubleprod. // * 2 taper routless(interlacing) prod, cordmachine must do 4(!) cords. Cor970528 // * Highlight bar (actorder) is now moved to scanned barcode order. // * Correct timing for fixtures turn when bunching production. // * When order book is full and new barcode is entered, error message! // * New logic around interlacing guides; normal/idle pos. is: NOT inserted // * profile speed calcs now compensates for "double production". // * Manual function: cord button runs motor when cord sequence is not active. // * At manual mode (production seq. not running) the lift sequence // now lifts ALL stations. // * preset values in special production page is now removed. // * Pitch fr.rule-list is now copied into the orderline ALWAYS, // (tapecolor & pitch), overriding manual / barcode entry. // * "unvalid order" now appears when pressing AUTO or SINGLE on empty order // * swapped punch positions in special production !!! to fit w stations pos. // * Limit check w. error mess.#17 on station positions IN PULSES-ok.f."&mm // * Bunching mode now assumes no fixtures & disenables fixtures timing // * error msg "fixtures in the way" disenabled when in interlacing mode. // * extra cut now included in manual cut function / button