MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "warnings": {
        "query": {
            "*": "Formatting of continuation data has changed. To receive raw query-continue data, use the 'rawcontinue' parameter. To silence this warning, pass an empty string for 'continue' in the initial query."
        }
    },
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Regenerative_resistor",
        "continue": "gapcontinue||"
    },
    "query": {
        "pages": {
            "773": {
                "pageid": 773,
                "ns": 0,
                "title": "Reading actual drive state with SimpleMotion V2",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Reading a variable from drive is easily accomplished by using SimpleMotion V2 function smRead1Parameter, smRead2Parameters or smRead3Parameters. Usage is looks like:\n<syntaxhighlight lang=\"cpp\">\n//read raw value of current\nsmint32 readout;\nsmRead1Parameter(  handle, nodeAddress, SMP_ACTUAL_TORQUE, &readout );\n</syntaxhighlight>\n\nThis C++ example shows how to read actual current driven into motor and convert it to amperes.\n<syntaxhighlight lang=\"cpp\">\n//read raw value of current\nsmint32 readout;\nsmRead1Parameter(  handle, nodeAddress, SMP_ACTUAL_TORQUE, &readout );\n\n//as raw value is integer in \"hardware units\" scale, convert it to amperes\nfloat actualcurrent;\nconst float HWcurrentScale=560;//counts/A, this conversion value is for Argon\nactualcurrent=float(smint16(ana2))/HWcurrentScale;\n\n//current in amps is now in actualcurrent\n\n//TODO, do error checking for all sm commands\n</syntaxhighlight>\n\nIt is also possible to read multiple values at one SM command to achieve higher throughput:\n<syntaxhighlight lang=\"cpp\">\n//read raw value of current, velocity and position\nsmint32 torque,position,velocity;\nsmRead3Parameters(  handle, nodeAddress, SMP_ACTUAL_TORQUE, &torque, \n    SMP_ACTUAL_POSITION_FB, &position, SMP_ACTUAL_VELOCITY_FB, &velocity );\n</syntaxhighlight>\n\n[[category:SimpleMotion]]"
                    }
                ]
            },
            "611": {
                "pageid": 611,
                "ns": 0,
                "title": "Reading and writing an arbitrary parameter with Granity",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "It's possible to read and modify drive parameters that are not displayed in the [[GUI]] of [[Granity]]. This is done by a custom parameter dialog that pops up by Ctrl+P keyboard shortcut.\n==Reading an arbitrary parameter==\n[[File:readingarbparameter.png|thumb|An example of reading parameter with address 202 ({{param|KVP}})]]\n#Open dialog by Ctrl+P keyboard shortcut\n#Enter the desired parameter number to the ''Display custom parameter in status page'' spinbox. Note: if non-existing parameter is requested, a communication error will occur and Granity disconnects.\n#Click Apply button on the main window\n#Observe the value of parameter in the Testing tab\n==Writing/overriding an arbitrary parameter==\n[[File:Settingarbparameter.png|thumb|An example of reading AND writing parameter with address 202 ({{param|KVP}})]]\nBefore writing a custom parameter, it is advised to read it's current value first by the steps above. \n\nWriting a value:\n#Open dialog by Ctrl+P keyboard shortcut\n#Enter the desired parameter number and value to the ''Parameter override table'' on Param address column. Note: if non-existing parameter number is entered, a communication error will occur and Granity disconnects.\n#Enter the override value of the parameter on the Override value column. Note: if parameter value is outside of allowed range, a communication error will occur and Granity disconnects.\n#Click Apply button on the main window\n\nNotes:\n*Up to three parameter & value pairs can be entered to this table \n*These values will override the [[GUI]] parameter if the same parameter is available on the GUI. I.e. if parameter 202 ({{param|KVP}}) is overridden, then the GUI parameter has no function.\n*This table will be saved to the drive memory if ''Save settings on drive non-volatile memory'' is clicked so override will stay active after drive restart\n*To remove override values, enter zeros to the override table row\n*If same value is present in on the GUI, it will not change to display the overridden value on Apply click. It will update only when connecting to the drive next time.\n\n==List of parameter addresses and allowed value ranges==\nThe list of possible parameter can be found at [https://github.com/GraniteDevices/SimpleMotionV2/blob/master/simplemotion_defs.h SimpleMotion V2 library header file]. Parameter numbers have name prefix SMP_ such as SMP_VEL_P which is 202. Note: all parameters may not be available on all devices. \n{{warning|Use caution when changing parameters especially if you don't understand their function throughly}}\n\n[[category:Granity user guide]]"
                    }
                ]
            }
        }
    }
}