This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Calling MSP430_Memory in MSP430.dll using Labview

Other Parts Discussed in Thread: MSP430F1101A

Hi,

I am trying to read data in the information memory using the MSP-FET430UIF. I am calling the MSP430_Memory function in the MSP430.dll with a simple program develop in Labview, but I have no luck with it. I got a status -1 return. Anyone have done this before? Greatly appreciate any help if it's possible.

Thanks,

Yeung

 

 

  • Hello Yeung,

    as far as i know, the function MSP430_memory requires 4 parameters : Address, *buffer, count and rw.

    from your block diagram i can see, you want to read one word (RW must be the value 1 and not zero (read mode)), from the address = 1088, but i dont understand what the string 'TEST' is for...


    Try to configure the parameter 'buffer' in this way:

    Typ : numeric element.

    data type: usigned 16bit

    data format : handled by pointer or sth. like that ( i have labview in german).

     

    just ask if it dosnt work...


  • Hi Arthur,

    Thank you for your help. I changed the the parameter asyou described and have the same error status return -1.  I start to think if I configure this right. Do I need to use MSP430_OpenDevice function before calling MSP430_Memory? I have an USB MSP-FET430UIF w/ MSP-TS430W28 debug board, and the MCU is MSP430F1101A. All I am trying to do is to read 2 byte of data in the information memory  (Address 0x1088). Any help is greatly apprecaited.

  • Hallo Yeung,

    yes, before calling MSP430_memory, the device should be already opened.

    all the following functions should have been called before in that order:

    -MSP430_initialize

    -MSP430_Vcc

    -MSP430_OpenDevice.

    I hope i could help.

    Good luck.

  • Hi Arthur,

    After I added the MSP430_OpenDevice function, the MSP430_Memory return status is 0 (success), but no data in the buffer? I don't think my MSP430_OpenDevice is call correctly. Here is my value pass into it

    int32_t MSP430_OpenDevice(CStr Device, CStr Password, int32_t PwLength, int32_t Devicecode, int32_t setID)

    Device: I assume is "MSP-FET430UIF" which the name of the USB tool

    Password: I don't have a password so I left it bank

    Pasword length: 0

    Devicecode: Not sure what it is.

    SetID: Not sure what it is.

    Any idea of these parameter?

  • Hi Yeung,

    Try this, it worked with me:

    Device name : the name the the MCU : MSP430.....

    i sat all other parameters to zero, all of them are numeric values also password.

  • Hi Arthur,

    Things are going great and I have successfully read the two byte data from the Information Memory. As you described, I do need MSP430_OpenDevice function before I can do anything with it. The parameter you provided works. Thank you very much for all the help.

    V/R,

    Yeung

  • dear friend Yeung Cheung,

    can you send me an email? I need to contact you to talk about this project.

    my email is zerotuning@gmail.com

     

    thanks in advance!!

  • Hello Sir,

    Two months ago I bought 2 MSP430 uCs( Launchpad and eZ430-F2013). I read the documentation and I found that the Launchpad can be interfaced through UART.

    For the beginning I try to make a very simple application for starting an DC motor and reverse its direction.

    I'd like to ask you if you can help me please with some tips about interfacing msp430 Launchpad with LABVIEW. Actually I have to make a simple interface in Labview with 2 buttons for activating pins P1.0 and P1.6.

      Thank you for you very helpful information about these uC's! 

  • Can you tell me what this has to do with the "Calling MSP430_Memory in MSP430.dll using Labview" topic?
    Please start a new thread for this completely different topic.

    Also, you should provide more detailed information. 'DC motor' can be everything. What power class? How do you wat to interface it? Relais, transistor, directly powered from the MSP (most likely not)?
    Your general description leaves an almost unlimited number of possible solutions, most of them of no use for you. But wihtout knowing further details, nobody can know which are and which don't.

    About interfacing the LaunchPad through UART by LabView, this is a totally different thing. Here the MSP sends out serial data and LabView receives serial data (or v.v.) from a virtual COM port provided by the LaunchPad. So for LabView, the MSP is just a serial device on a COM port. There are samples about how to communicate with the PC using the Backchannel UART.

  • All I want to do is to interface Labview with MSP 430 and access its ports. The part with the "DC motor" is just the hardware. And yes indeed, between the launchpad and the DC motor is another interface (an IC acting like a double H-bridge, some optocouplers and other passive elements ). The interface is already done, I programmed the uC (a silly program)  and  I already can start and reverse to motor using two buttons attached to the launchpad. For simplifying, you can consider my DC Motor like the 2 leds on the launchpad, and what I want to do is to light up at least one of them using Labview.

    My interest is how to do this using Labview and how to control the launchpad with this software.

    Thank you!

  • So from teh MSP side, it is unimportant that the PC side uses LabView, it could be anyoen who sends bytes through the virtual COM port. HyperTerm, PUTTY, even a "copy CON: COM4:" on CMD would do it.
    And from the LabView side, the MSP is just a serial I/O on a COM port. Which could address a modem, this MSP, even a virtual device on  the very same PC.

    LabView needs to send what it wants the MSP to do through the virtual COM port as 'commands' (the command format is up to you to define). The MSP receives these commands serially, interprets them and acts accordingly and sends answers through the serial output. It's up to you to define the format and meanign of these answers. They are just arbitrary bytes.

    E.g., if LabView sends "P1O128\n", the MSP can see first byte is a 'P', so it is a port command. next byte is a '1', so it is port 1. third is '0', so the remaning command defines which value to write to P1. Answer will be 'OK\n' or whatever.
    Or LabView sends 'P2I\n', so the MSP will see it is a port command (there might be many other commands, jsut as you define them). addresses P2 and wants to read the input value, so the return is something like "233\n"

  • Hi Yeung Cheung,

    Now,i need the MSP430_OpenDevice function,Could you tell me how to set the parameters.

    Thanks very much.

      Lu

  • Dear Jens,

    Can we Flash .Hex file to MSP430  via Labview. if yes could you please share some thoughts on this

    thanks

     Naveen

  • In theory, you can. However, it might be a bit complicated. Most MSPs (except a few G2x devices and those with USB controller) have a serial bootloader. If you connect the MSP properly, any application that can control a COM port (including toggling of DTR and RTS lines) can invoke the BSL and then instruct it to load data into flash.

    Of course you can also try to access the MSP430.DLL and access the MSP through the FET. Then you have full access ot the MSP memory bus and can do what you want. It is, however, way more complicated. I fpossible at all from LabView.

**Attention** This is a public forum