2026년 7월 23일 목요일

weintek cmt3072xh2 tapo c545d CCTV 화면 재생

 macro_command main()

// 1. 문자열 배열 변수 선언과 동시에 명시적 빈칸 초기화 실행! (= "" 필수 ⚠️)

// 한화면에서 비디오입력 오브젝트2개에 각각 CCTV 화면 입력 안됨. 한화면 하나만.

char url_stream2[128] = ""

char url_stream7[128] = ""

unsigned short play_cmd = 0

bool button_state = true


// 2. 주간(stream2) 주소와 야간(stream7) 주소를 공백 없이 문자로 완벽히 복사 정의

StringCopy("tapotapo1234:tapotapo321654987@192.168.0.2:554/stream2", url_stream2[0])

StringCopy("tapotapo1234:tapotapo321654987@192.168.0.2:554/stream7", url_stream7[0])


// 3. 토글 버튼(LB 50)의 현재 온/오프 상태를 읽어옴

GetData(button_state, "Local HMI", LB, 50, 1)



// [조건 1] 버튼을 한 번 눌러서 ON(true) 상태가 되었다면? ➡️ stream7(야간적외선) 주소 주입!

if button_state == true then

    // 💡 안전 작동을 위해 현재 흐르던 비디오 소스를 완전히 OFF (값 0 전송)

    play_cmd = 0

    SetData(play_cmd, "Local HMI", LW, 0, 1) 

    DELAY(150)

    

    // 시스템이 지정해준 LW 2번 방에 stream7 주소 글자 전체를 통째로 덮어쓰기! (64개 워드 데이터 전송)

    SetData(url_stream7[0], "Local HMI", LW, 2, 64)

    DELAY(150)

    

    // 새로운 야간 주소로 비디오 창 전격 가동 개시! (값 1 전송)

    play_cmd = 1

    SetData(play_cmd, "Local HMI", LW, 0, 1)

end if



// [조건 2] 버튼을 한 번 더 눌러서 OFF(false) 상태가 되었다면? ➡️ stream2(주간컬러) 주소 주입!

if button_state == false then

    // 기존 비디오 소스 OFF

    play_cmd = 0

    SetData(play_cmd, "Local HMI", LW, 0, 1)

    DELAY(150)

    

    // 시스템이 지정해준 LW 2번 방에 stream2 주소 글자 전체를 통째로 덮어쓰기! (64개 워드 데이터 전송)

    SetData(url_stream2[0], "Local HMI", LW, 2, 64)

    DELAY(150)

    

    // 새로운 주간 주소로 비디오 창 전격 가동 개시! (값 1 전송)

    play_cmd = 1

    SetData(play_cmd, "Local HMI", LW, 0, 1)

end if


end macro_command

2025년 12월 20일 토요일

openpnp 세팅 참조

 pakage >> nozzle type install

board install >> boards >> set the board x,y and rotation
                           perform a fiducial check for the board


bottom camera position >> nozzle calibration adjusting position


job board z position seting and x, y position set



2025년 2월 3일 월요일

구조체

 struct { // Communication structures

bool rf; // Receive flag, indicating if data has been received uint8_t tb[50]; // Transmit buffer (stores data to be transmitted) uint8_t rb[50]; // Receive buffer (stores received data) uint8_t tc; // Transmit count (tracks the number of bytes to be sent) uint8_t rc; // Receive count (tracks the number of bytes received) uint8_t rt; // Receive timeout (20ms * 5 = 100ms, used for handling communication timeouts) uint8_t fn; // Field name (used for identifying communication fields) uint8_t hi, lo; // Used for Modbus communication (high and low byte storage) } cm0; //----------------------- hw_timer_t *timer1 = NULL; // 25ms Timer instance for periodic tasks struct { // Timer-related variables uint8_t fg; // Flag to indicate timer-related events byte tc; // Timer counter for general use byte t100ms; // Counter for 100ms intervals byte t500ms; // Counter for 500ms intervals byte sec; // Second counter } tim; //----------------------- struct { uint16_t reg[50]; // Array for storing data (e.g., sensor values, Modbus registers) } ccu;

참고!!

2025년 1월 5일 일요일

AVANTE AD 2016 year regulator

 AVANTE  AD 2016 year  regulator

part number   373702A400



알터네이터(발전기) 카본 브러시가 차량운행에 따라 닳아서 점점 짧아짐


레귤레이터 어셈블리, 373702A400, 37370-2A400, 신제품

알터네이터 충전 불량, 레귤레이터 어셈블리 교환

레귤레이터 어셈블리 해체및 조립시 7mm, 8mm 복스알 필요

알터네이터 및 알터네이터 벨트 해체시 14mm, 11mm  복스알 필요

국내에서 부품을 구할수 없어서  https://ko.aliexpress.com/ 에서 주문함