Hi all,

I am currently working on a project that requires me to split off a function from an already existing multi-use program that was created in house. We currently are working with serial port communication using a CAN-to-USB method.

I am a baby programmer and have been pulling hairs out trying to figure this program out, but to no avail. I am looking for any help, not necessarily hand-holding (I am willing to put in the work) but I would love to be able to get a good understanding of where my problems are and what I can do to prevent them in the future.

I have included a snippet of my button click event for checking/opening and writing to port. The references the init process, which is where I am getting my first error. I cannot seem to recognize the device when it is plugged in via USB.
Name:  ClickB.jpg
Views: 549
Size:  36.3 KBName:  Init Error.jpg
Views: 479
Size:  52.7 KBName:  Error 1.PNG
Views: 545
Size:  3.2 KBName:  Obj Ref Error.PNG
Views: 548
Size:  3.8 KB

Thank you for any and all help in advance. I know I have a lot to learn to get this running as smoothly as possible.

Also, please let me know if there is another part of the code needed to help out with this.

Thanks!
M