Shop OBEX P1 Docs P2 Docs Learn Events
Need a DLL for Windows based GUI — Parallax Forums

Need a DLL for Windows based GUI

epif18epif18 Posts: 4
edited 2012-11-30 18:24 in Propeller 1
Im building a scalar network analyzer and I need to plot (x and y) in log scales. I have viewport ultimate, but that doesnt do it for me. I want to write a VB app and I'm looking for a DLL. Is there a better idea out there? Oh, and thru the USB

Thanks
Mark

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-09-26 19:38
    http://wiki.python.org/moin/NumericAndScientific/Plotting

    Python is a far superior language to VB, especially when there is any data processing involved.
  • epif18epif18 Posts: 4
    edited 2012-09-26 20:10
    Thanks but I need to get the data from the Propeller to the Windows App (python or other). I need to be able to read the I/O pins thru the USB, as well as control the signal generator. Thoughts?


    Thanks
    Mark
  • msrobotsmsrobots Posts: 3,709
    edited 2012-09-26 23:32
    As far as I understand ViewPort works as a DDE/COM server and the PropScope also. There are even example using Excel and VB with ViewPort/PropScope.

    Hanno did nice work there and you can write your own application in VB or whatever Language and use ViewPort in the Background to talk to the Prop like ViewPort does.(conduit etc)

    Look in the ViewPort Help/Example. There is something. Maybe Hanno can help and chime in here.

    Enjoy!

    Mike
  • idbruceidbruce Posts: 6,197
    edited 2012-09-27 03:35
    Please provide a little more information.

    Do you have access to the programming of the Window App? If so, what language is it written in?

    VC++ is a far superior language to VB, and I am sure you will have much better success with VC++, especially where comm ports are concerned.

    How are you going to get your required information into the Windows App from a DLL? The Windows App must know ahead of time to call certain DLL functions.

    If the Windows App has not be created yet or is in the creation process, then simply provide access through your GUI program.
  • idbruceidbruce Posts: 6,197
    edited 2012-09-27 03:38
    Perhaps the knowledge that you are seeking can be found at one of these locations:
    http://www.codeguru.com
    http://www.codeproject.com
    http://msdn.microsoft.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2012-09-27 04:30
    Except that with non clr VC++ you have to do your own forms, which isn't always so superior. I rather suggest c#, which lays a better foundation than VB, which always seems so demeaning to me. ie(unload me, dim something as dumbobject, etc) The dotnet 2.0 serial port object is pretty mature, there shouldn't be any issue with that.
  • BatangBatang Posts: 234
    edited 2012-09-27 04:41
    For .Net there is only one chart control...........

    http://zedgraph.dariowiz.com/

    And you don't have to pay for it.


    Cheers
  • Mike GMike G Posts: 2,702
    edited 2012-09-27 07:06
    epif18, If you are using VB.NET then simply drag the chart control from the toolbox to a Win form. Open the properties window, set configuration, and provide a data source. Set logarithmic scale in the chart area collection of the chart properties.
    http://msdn.microsoft.com/en-us/library/dd489237%28v=vs.100%29.aspx

    BTW, all .NET flavors target the same runtime. Stating language one .NET language is better than the other is a personal preference. However, C# programmer get paid more.
  • BeanBean Posts: 8,129
    edited 2012-09-27 08:58
    epif18 wrote: »
    Thanks but I need to get the data from the Propeller to the Windows App (python or other). I need to be able to read the I/O pins thru the USB, as well as control the signal generator. Thoughts?

    Mark, for the communication from PC to Propeller, I use the FTDI DLL driver and one of the Parallax FTDI USB-to-Serial adapters (or a Parallax board with USB on it).

    I use Excel and VBA but you should be able to use any language that allows you to call DLLs.

    If you need an example let me know and I'll dig up the code.

    Bean
  • PaulPaul Posts: 263
    edited 2012-09-28 12:52
    As usual there are many ways to get where you are going. Easiest for me was Processing. Here is a link to some info:

    Previous post link.
  • RickInTexasRickInTexas Posts: 124
    edited 2012-09-28 14:42
    The http://www.parallax.com/tabid/393/Default.aspx PLX-DAQ employs an OCX controll that plays well with Excel and a Propeller App.

    The downloadable package has a few examples that would serve to put you well on your way. Real-time data R/W between Prop and Excel; you can use any data analysis tools in Excel, and chart data changes in real-time. Pretty cool, but it does require Excel to be running, although it does work nicely as you can start/stop the Prop and/or Excel without any reset/connection headaches.

    Oh yeah, the Excel back-end is programmed in VBA.

    The Hanno solution is more flexible as you're not tied to just Excel at the expense of perhaps a bit more of a learning curve.

    Please share your solution!
  • epif18epif18 Posts: 4
    edited 2012-11-30 18:24
    Hey, thanks everybody. I'm not a coder per se, and I'm using VB because I have it. For some reason I couldn't get Ruby running on my laptop, but I'll try that next. I didn't want to get on the back side of the learning curve while I was trying to learn how to communicate with the propeller. All that being said, I visited FTDI site and got the FT2DXX.DLL. Thanks Bean, that was a direct hit! I was able to easily write a loop back spin program and use the VB examples on the FTDI site to experiment with establishing a comm link. Now the most frustrating thing is when using FT_Write call, I get the ascii representation on the propeller when I put a numeric value in the call. And I get the number on the propeller when I put a Chr(number) in the call. No big deal, I'll get it worked out but the FTDI documentation isn't clear. Maybe it's the call or maybe VB or me, either way I'm used to stricter type "controls". Where does the conversion take place? So I can now use my PC to control an Analog Devices DDS frequency synthesizer. Now building some A/D's and log amps to get the readings back to the PC.

    Once I knew where to look, this was a lot easier than I thought it would be. Again, thanks
Sign In or Register to comment.