Serial port problems

  • hello,


    im looking already for weeks to input data to a machine via com1,
    problem i find no solution, the command to write to the port is WT and carriage return, then i should get a value from the
    machine displayed in a cell but my programm hangs everytime and don't see what's wrong, can someone help me please ?
    would be very thanksfull. Tou can find the code here: