<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="../Fmethod_xsl/fmethod_he_c.xsl"?>

<root>
  <func>


    <title>cnc_wrpscdslop</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_wrpscdslop(unsigned short FlibHndl,short s_no, short *number, IODBSLOP *slope); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p> Writes the slope control data of the cutting condition file.
            </p>
        </cmn>
    </doc>



    <argument>
        <common>
            <vc>
                <item>
                    <name>FlibHndl</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the library handle. See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                        </p>
                    </content>
                </item>
                <item>
                    <name>s_no</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the start slope control data group number.
                            <table border="0" class="dd">
                                <tr> <td>301 to 305</td><td>:</td><td>  slope control data group number(UP/DOWN)</td>   </tr>
                            </table>
                        </p>
                    </content>
                </item>
                <item>
                    <name>number</name>
                    <type>in/out</type>
                    <content>
                        <p>
                            Pointer to the number of slope control data.
                            Specify the number of slope control data to be written before function call, 
                            and the number of slope control data being written actually is stored after the function call.
                        </p>
                    </content>
                </item>
                <item>
                    <name>slope</name>
                    <type>out</type>
                    <content>
                        <p>
                            Pointer to the IODBSLOP structure including the slope control data of the cutting condition file.
                            The IODBSLOP structure is as follows.
                        </p>
<pre>
typedef struct iodbslop {
    long    slct;       /* Flag of data selection */
    long    upleng;     /* Step(UP) distance */
    short   upsp[10];   /* Step(UP) power 1 to 10 */
    long    dwleng;     /* Step(DOWN) distance */
    short   dwsp[10];   /* Step(DOWN) power 1 to 10 */
    short   reserve[10];/* (reserve) */
} IODBSLOP ;
</pre>
                        <dl>
                            <dt>slct</dt>
                                <dd>Flag of data selection must be set.</dd>
                            <dd><table border ="0" class="dd">
                                <tr> <td>bit 0</td><td>:</td><td>Step(UP) distance</td> </tr>
                                <tr> <td>bit 1</td><td>:</td><td>Step(UP) power 1</td> </tr>
                                <tr> <td>bit 2</td><td>:</td><td>Step(UP) power 2</td> </tr>
                                <tr> <td>bit 3</td><td>:</td><td>Step(UP) power 3</td> </tr>
                                <tr> <td>bit 4</td><td>:</td><td>Step(UP) power 4</td> </tr>
                                <tr> <td>bit 5</td><td>:</td><td>Step(UP) power 5</td> </tr>
                                <tr> <td>bit 6</td><td>:</td><td>Step(UP) power 6</td> </tr>
                                <tr> <td>bit 7</td><td>:</td><td>Step(UP) power 7</td> </tr>
                                <tr> <td>bit 8</td><td>:</td><td>Step(UP) power 8</td> </tr>
                                <tr> <td>bit 9</td><td>:</td><td>Step(UP) power 9</td> </tr>
                                <tr> <td>bit10</td><td>:</td><td>Step(UP) power 10</td> </tr>
                                <tr> <td>bit11</td><td>:</td><td>Step(DOWN) distance</td> </tr>
                                <tr> <td>bit12</td><td>:</td><td>Step(DOWN) power 1</td> </tr>
                                <tr> <td>bit13</td><td>:</td><td>Step(DOWN) power 2</td> </tr>
                                <tr> <td>bit14</td><td>:</td><td>Step(DOWN) power 3</td> </tr>
                                <tr> <td>bit15</td><td>:</td><td>Step(DOWN) power 4</td> </tr>
                                <tr> <td>bit16</td><td>:</td><td>Step(DOWN) power 5</td> </tr>
                                <tr> <td>bit17</td><td>:</td><td>Step(DOWN) power 6</td> </tr>
                                <tr> <td>bit18</td><td>:</td><td>Step(DOWN) power 7</td> </tr>
                                <tr> <td>bit19</td><td>:</td><td>Step(DOWN) power 8</td> </tr>
                                <tr> <td>bit20</td><td>:</td><td>Step(DOWN) power 9</td> </tr>
                                <tr> <td>bit21</td><td>:</td><td>Step(DOWN) power 10</td> </tr>
                                <tr> <td>bit22,..,31</td><td>:</td><td>(reserve)</td> </tr>
                            </table></dd>
                            <dd>* In order to write the data to CNC, turn on the corresponding bit on this data.</dd>
                            <dt>up_leng</dt>
                                <dd>Specify step(UP) distance.</dd>
                            <dt>upsp</dt>
                                <dd>Specify step(UP) power is set.</dd>
                                <dd><table border="0" class="dd">
                                    <tr> <td>upsp[0]</td><td>:</td><td>Step power 1</td> </tr>
                                    <tr> <td>upsp[1]</td><td>:</td><td>Step power 2</td> </tr>
                                    <tr> <td></td><td></td><td>:</td> </tr>
                                    <tr> <td>upsp[8]</td><td>:</td><td>Step power 9</td> </tr>
                                    <tr> <td>upsp[9]</td><td>:</td><td>Step power 10</td> </tr>
                                </table></dd>
                            <dt>dw_leng</dt>
                                <dd>Specify step(DOWN) distance is set.</dd>
                            <dt>dwsp</dt>
                                <dd>Specify step(DOWN) power is set.</dd>
                                <dd><table border="0" class="dd">
                                    <tr> <td>dwsp[0]</td><td>:</td><td>Step power 1</td> </tr>
                                    <tr> <td>dwsp[1]</td><td>:</td><td>Step power 2</td> </tr>
                                    <tr> <td></td><td></td><td>:</td> </tr>
                                    <tr> <td>dwsp[8]</td><td>:</td><td>Step power 9</td> </tr>
                                    <tr> <td>dwsp[9]</td><td>:</td><td>Step power 10</td> </tr>
                                </table></dd>
                            <dt>reserve</dt>
                                <dd>(reserve)</dd>
                        </dl>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>
                Unavailable<br/>
                This function cannot be used except 160i-L.
            </content>
        </item>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                Number of data(number) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                Data number error<br/>
                Start number(s_no) is wrong.
            </content>
        </item>
        <item>
           <name>EW_DATA</name>
            <content>
                Data error<br/>
                The slope control data of the cutting condition file is wrong.
                In order to get more information for this err_no return value, 
                execute <a href="Misc/cnc_getdtailerr.htm" target="_parent">cnc_getdtailerr</a> function.
                The slope control data group number which an error occurred will be set onto the member of
                err_no of ODBERR structure, and the following detailed status will be set onto the member of
                err_dtno of ODBERR structure.
                <table border="0">
                    <tr><td>1</td><td>:</td><td>Error of step(UP) distance</td></tr>
                    <tr><td>2</td><td>:</td><td>Error of step(UP) power 1</td></tr>
                    <tr><td>3</td><td>:</td><td>Error of step(UP) power 2</td></tr>
                    <tr><td>4</td><td>:</td><td>Error of step(UP) power 3</td></tr>
                    <tr><td>5</td><td>:</td><td>Error of step(UP) power 4</td></tr>
                    <tr><td>6</td><td>:</td><td>Error of step(UP) power 5</td></tr>
                    <tr><td>7</td><td>:</td><td>Error of step(UP) power 6</td></tr>
                    <tr><td>8</td><td>:</td><td>Error of step(UP) power 7</td></tr>
                    <tr><td>9</td><td>:</td><td>Error of step(UP) power 8</td></tr>
                    <tr><td>10</td><td>:</td><td>Error of step(UP) power 9</td></tr>
                    <tr><td>11</td><td>:</td><td>Error of step(UP) power 10</td></tr>
                    <tr><td>12</td><td>:</td><td>Error of step(DOWN) distance</td></tr>
                    <tr><td>13</td><td>:</td><td>Error of step(DOWN) power 1</td></tr>
                    <tr><td>14</td><td>:</td><td>Error of step(DOWN) power 2</td></tr>
                    <tr><td>15</td><td>:</td><td>Error of step(DOWN) power 3</td></tr>
                    <tr><td>16</td><td>:</td><td>Error of step(DOWN) power 4</td></tr>
                    <tr><td>17</td><td>:</td><td>Error of step(DOWN) power 5</td></tr>
                    <tr><td>18</td><td>:</td><td>Error of step(DOWN) power 6</td></tr>
                    <tr><td>19</td><td>:</td><td>Error of step(DOWN) power 7</td></tr>
                    <tr><td>20</td><td>:</td><td>Error of step(DOWN) power 8</td></tr>
                    <tr><td>21</td><td>:</td><td>Error of step(DOWN) power 9</td></tr>
                    <tr><td>22</td><td>:</td><td>Error of step(DOWN) power 10</td></tr>
                </table>
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                No option<br/>
                The cutting condition setting function, the slope control function and the extended
                driver/library function are necessary.
            </content>
        </item>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <ethr><p>The Ethernet function and the extended driver/library function are necessary.</p>
              <p>When Embedded Ethernet is used,</p>
              <p><ul>above two optional functions are not required.</ul></p>
              <p>When Ethernet board is used,</p>
              <p><ul>only Ethernet function is required.</ul></p>
        </ethr>
        <need>
              <li>The cutting condition setting function</li>
              <li>The slope control function</li>
        </need>
    </option>



    <parameter> 
    </parameter>



    <mode>
    </mode>



    <support>
        <m>
            <fs0ia>-</fs0ia>
            <fs0ib>-</fs0ib>
            <fs15>-</fs15>
            <fs15i>-</fs15i>
            <fs16>-</fs16>
            <fs18>-</fs18>
            <fs21>-</fs21>
            <fs16ia>-</fs16ia>
            <fs18ia>-</fs18ia>
            <fs21ia>-</fs21ia>
            <fs16ib>-</fs16ib>
            <fs18ib>-</fs18ib>
            <fs21ib>-</fs21ib>
            <fs30i>-</fs30i>
        </m>
        <t>
            <fs0ia>-</fs0ia>
            <fs0ib>-</fs0ib>
            <fs15>-</fs15>
            <fs15i>-</fs15i>
            <fs16>-</fs16>
            <fs18>-</fs18>
            <fs21>-</fs21>
            <fs16ia>-</fs16ia>
            <fs18ia>-</fs18ia>
            <fs21ia>-</fs21ia>
            <fs16ib>-</fs16ib>
            <fs18ib>-</fs18ib>
            <fs21ib>-</fs21ib>
            <fs30i>-</fs30i>
        </t>
        <lc>
            <fs0ia>-</fs0ia>
            <fs0ib>-</fs0ib>
            <fs15>-</fs15>
            <fs15i>-</fs15i>
            <fs16>-</fs16>
            <fs18>-</fs18>
            <fs21>-</fs21>
            <fs16ia>-</fs16ia>
            <fs18ia>-</fs18ia>
            <fs21ia>-</fs21ia>
            <fs16ib>-</fs16ib>
            <fs18ib>-</fs18ib>
            <fs21ib>-</fs21ib>
            <fs30i>-</fs30i>
        </lc>
        <p>
            <fs16i>-</fs16i>
            <fs18i>-</fs18i>
        </p>
        <l>
            <fs16i>O</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>-</fs16i>
            <fs18i>-</fs18i>
        </w>
        <pw>
            <d>-</d>
            <h>-</h>
        </pw>
    </support>



    <reference>
        <item>
            <name>cnc_rdpscdslop</name>
            <file>Laser/cnc_rdpscdslop.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
