fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package robot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"bj_power_mes/internal/preload"
|
||||
)
|
||||
|
||||
func (c *Controller) StartupWasher(ctx context.Context) error {
|
||||
addr := preload.GetMAddress("WasherStartup")
|
||||
if err := c.plcClient.WriteBool(addr.Addr.String(), true); err != nil {
|
||||
return fmt.Errorf("发送启动信号 %s 失败: %w", "WasherStartup", err)
|
||||
}
|
||||
time.AfterFunc(2*time.Second, func() {
|
||||
_ = c.plcClient.WriteBool(addr.Addr.String(), false)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user