Hi,
It confuses me a little bit with this minor problem: when I try to run iX program to simulate my coding, which contains SerialPort method.
Actually, I can run this code before and nothing happens! It has just happened recently after few changing in code itself. But, I did open the good one but nothings changed!
Can't not simulate when using Serial Port
Re: Can't not simulate when using Serial Port
Could you also post the log file? That would probably help us determine what is happening.
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: Can't not simulate when using Serial Port
This is the log file.
Thanks,
Phong Duong
Thanks,
Phong Duong
- Attachments
-
- Log.zip
- (3.28 KiB) Downloaded 831 times
Re: Can't not simulate when using Serial Port
Phong,
It looks like there could be a few errors in the code. Can you send me your project? I will PM my email address to you.
It looks like there could be a few errors in the code. Can you send me your project? I will PM my email address to you.
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: Can't not simulate when using Serial Port
Dear Skylar,
This is my project, which is using Serial Port to send data through RS232.
Best regards,
Phong Duong
This is my project, which is using Serial Port to send data through RS232.
Best regards,
Phong Duong
- Attachments
-
- SimpleSerialTmrEx.zip
- (36.51 KiB) Downloaded 811 times
Re: Can't not simulate when using Serial Port
Phong,
It looks like the issue deals with the COM port you are trying to open on line 48. If that port does not exist on the host machine, an exception will be thrown. For example, on my PC I have COM 1 and COM 2... If I change line 48 to read:
sPort = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
Everything works fine. I hope that helps!
It looks like the issue deals with the COM port you are trying to open on line 48. If that port does not exist on the host machine, an exception will be thrown. For example, on my PC I have COM 1 and COM 2... If I change line 48 to read:
sPort = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
Everything works fine. I hope that helps!
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: Can't not simulate when using Serial Port
Dear Skylar,
I really appreciate your help!
Best regards,
Phong Duong
I really appreciate your help!
Best regards,
Phong Duong
Re: Can't not simulate when using Serial Port
Glad that helps!
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer