网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
04月04日漏签0天
plc吧 关注:173,670贴子:862,259
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 0回复贴,共1页
<<返回plc吧
>0< 加载中...

丢那星 步科触摸屏搞蒙蔽了

  • 只看楼主
  • 收藏

  • 回复
  • 辣辣魅族
  • 四年级
    7
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include "macrotypedef.h"
#include "math.h"
int MacroEntry()
{
// 定义配方名称缓冲区和参数缓冲区
signed short recipeNameBuf[12] = {0};
signed short recipeParamBuf[27] = {0};
signed short Buf[12] = {0};
signed short Buff[27] = {0};
signed short i
// 确定当前配方编号
int currentRecipeNumber = LW130;
if (currentRecipeNumber != 0)
// 读取当前配方名称和参数
ReadLocal("RW", 0, 12, (void*)recipeNameBuf, 0);
ReadLocal("RL", 400, 27, (void*)recipeParamBuf, 0);
{
// 计算配方名称和参数的写入地址
int recipeNameStartAddress = 20 + (currentRecipeNumber - 1) * 100;
int recipeParamStartAddress = 50 + (currentRecipeNumber - 1) * 100;
// 写入配方名称和参数
WriteLocal("RW", recipeNameStartAddress, 12, (void*)recipeNameBuf, 0);
WriteLocal("RW", recipeParamStartAddress, 27, (void*)recipeParamBuf, 0);
}
// 确定当前选择的模型编号
int currentModelNumber = LW132;
// 判断 LW132 是否不等于 0
if (currentModelNumber != 0)
{
// 计算模型名称和参数的读取地址
int modelNameStartAddress = 20 + (currentModelNumber - 1) * 100;
int modelParamStartAddress = 50 + (currentModelNumber - 1) * 100;
// 读取模型名称和参数
ReadLocal("RW", modelNameStartAddress, 12, (void*)Buf, 0);
ReadLocal("RW", modelParamStartAddress, 27, (void*)Buff, 0);
// 写入模型名称和参数
WriteLocal("RW", 0, 12, (void*)Buf, 0);
WriteLocal("RL", 400, 27, (void*)Buff, 0);
}
return 0;
}


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 0回复贴,共1页
<<返回plc吧
分享到:
©2026 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示