11-18-2011 01:50 AM
I am trying to communicate with a custom microprocessor using the USB-RS232 converter and Visual Basic 6. All I need to do is to send and receive hex strings. I worked out the hardware interface and voltage levels, as I can send and receive data through NIMAX. However, I am having trouble reading back data in VB6 using the MSCOMM control. Any guidance or assistance or sample code would be appreciated.
Thanks,
Joe P.
11-18-2011 06:06 PM
Hey Joe,
I found a KnowledgeBase article that goes over how to use VB with Serial communication, let me know if this helps
http://digital.ni.com/public.nsf/allkb/6E516A72B648340286256DA5005FA553?OpenDocument
Be aware of the potential to get Runtime Error 28: Out of Stack Space, here is a KB that would help resolve the issue
http://digital.ni.com/public.nsf/allkb/FE1960ABD174292B862571E1007926EE?OpenDocument
Good luck with your application
11-29-2011 08:24 AM
As it turns out the problem was not the coding in VB6. The lack of handshaking and the way the processor operates makes a direct interface with a test script not possible. The firmware in the processor really needs to be modified to support some sort of testing or test mode of operation. As it turns out, communication with the device was working, but without getting into too many details there were timing and buffering issues that were causing errors and which could not be resolved.
Thanks!