In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail the example analysis about the secondary development of GTS- 800. the editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
1. Open the controller GT_Open
2. Start servo enable GT_ClrSts
3. Axis planning position zeroing GT_SetPrfPos
4. Axis motion mode GT_PrfTrap
5. Axis target position GT_SetPos
6. Shaft rotation speed GT_SetVel
7. Startup axis GT_Update
8. Turn off enable GT_AxisOff
9. Close the controller GT_Close
C#:using System;using System.Collections.Generic;using System.Linq;using System.Text;using gts;namespace GTS {class Program {static void command (string sz, short nR) {Console.WriteLine (sz + "=" + nR);} static void Main (string [] args) {short mAxis = 2; short nR = mc.GT_Open (0,1) If (nR! = 0) {command ("GT_Open", nR); Console.WriteLine ("Open error"); return;} command ("GT_Open", nR) / clear the alarm and limit command of each axis ("GT_ClrSts", mc.GT_ClrSts (mAxis, 1)); / / Servo enable command ("GT_AxisOn", mc.GT_AxisOn (mAxis)); / / position zero command ("GT_ZeroPos", mc.GT_ZeroPos (mAxis, 1)) / / Axis planning position zeroing command ("GT_SetPrfPos", mc.GT_SetPrfPos (mAxis, 0)); / / setting the specified axis as the point motion mode. Command ("GT_PrfTrap", mc.GT_PrfTrap (mAxis)); / / set point motion parameters mc.TTrapPrm trap = new mc.TTrapPrm (); trap.acc = 0.25; trap.dec = 0.125; trap.smoothTime = 25; command ("GT_SetTrapPrm", mc.GT_SetTrapPrm (mAxis, ref trap)) / / set the target position of the axis command ("GT_SetPos", mc.GT_SetPos (mAxis, 50000)); / / set the target speed of the axis command ("GT_SetVel", mc.GT_SetVel (mAxis, 25)); / / start the axis motion command ("GT_Update", mc.GT_Update (1)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.