Author Topic: Connection problem using .NET assemblies (from NI TestStand)  (Read 2110 times)

teknik_kim

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Hi

I'm trying to utilize the Flash Magic .NET assemblies from National Instruments TestStand. TS recognizes the assemblies correctly, and I can open the port I choose (which is COM1 and I get "115200" baudrate as return value). But no matter what I choose to do next, I get an error saying that there is no connection to the device(?)
I'm a bit curious: How does (for instance) the BlankCheck know to use COM1?

Device: LPC4357
Flash magic 7.62 PS .NET
TestStand from LV2011

Pictures:
https://dl.dropboxusercontent.com/u/102707466/OpenPort.png
https://dl.dropboxusercontent.com/u/102707466/BlankCheck.png

Any ideas?

-Kim

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2105
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Connection problem using .NET assemblies (from NI TestStand)
« Reply #1 on: May 08, 2014, 09:16:22 am »
We don't have NI TestStand so supporting you is difficult, however I think there is a fundamental problem. The way it should work is this:

  - load DLL
  - call connect telling the DLL you want to use COM1 and 115200
  - call blankcheck
  - call disconnect
  - unload the DLL

So to answer your question blankcheck knows to use COM1 because you have already called connect telling it to use COM1. The key thing is that the DLL remains loaded from beginning to end. If you do this:

  - load DLL
  - call connect
  - unload DLL
  - load DLL
  - call blankcheck
  - unload DLL

Then it won't work. So you will need to double-check when TestStand is loading and unloading the DLL for you.

Also 115200 is quite high. I would suggest you start off more conservatively at 19200 and work your way up. Although it does appear to be working for you.

Andy
« Last Edit: May 08, 2014, 09:20:04 am by Andy Ayre »
Embedded Systems Academy, Inc.
support at esacademy dot com

teknik_kim

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Connection problem using .NET assemblies (from NI TestStand)
« Reply #2 on: May 12, 2014, 03:15:32 pm »
Hi

Yes, you are right - I (accidentally) closed the connection because I didn't reference to the correct (existing) object after I connected.

That part has been taken care of, thanks :)