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.

LAUNCHXL-F28379D: How to receive two analog inputs and send one analog output signal using Simulink Real-time?

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hello, 

I have designed an MPC controller in Simulink, I want to provide two analog input signals one from the plant and another reference signal to MPC, and send the generated control output to my plant. I purchased TI LAUNCHXL-F28379D, but I am not sure which pins correspond to real-time operations. Looking at the device technical manual I think the Analog Out pin will be connected to MV of the controller and DAC1 and DAC2 will be input to the controller from the real device. But I am not sure if these pins are for real-time or not because I read somewhere that PMW pins correspond to real-time operations. 

If I am right then for DAC there is nothing complex I just need to connect the wires and select ports among A, B, and C. But when it comes to ADC block there are a lot of options to keep them default or change, I am not sure what these mean, even I read the Matlab Help section but I am unable to understand them. 

I am seeking help in this regard, the real device output signal is Analog DC  Voltage which contains a 2-5 Hz frequency signal (topography) of my sample. Please suggest me ADc block settings based on my Analog Input signal.   

  • Hello,

    Due to US holiday, please expect a response by 20th February.

    Thanks & Regards,

    Sinchita

  • Hello Muhammad,

    I purchased TI LAUNCHXL-F28379D, but I am not sure which pins correspond to real-time operations.

    I'm not exactly sure what this means, all analog pins can be used for real-time operations as far as I'm aware.

    But when it comes to ADC block there are a lot of options to keep them default or change, I am not sure what these mean, even I read the Matlab Help section but I am unable to understand them.

    You can refer to the device reference manual for specific details, but I can briefly describe them here. Our ADCs are SOC-based, meaning that an ADC has multiple SOCs, each of which can sample a specific pin within its respective ADC (i.e. SOC0 on ADC A can access ADC A pins). For each SOC you can configure the acquisition window (please refer to the Timing Diagrams section of the reference manual for specifics on this), trigger source, interrupts which can be triggered, etc. The resolution happens at the ADC-level (i.e. all SOCs for that ADC will be in that resolution).

  • Thanks, Sir for answering my question. However, I looked into the manual but I am very confused about where to find information about the ADC.

    For my experiment, I am using the default values of all functions in the ADC block, as shown in the below picture. I am not sure when we use two ADC blocks then we need to change the values of parameters (ADC Module, ADC resolution, SOC, etc)  or not. If I need to change some parameters for the ADC block please let me know, I will be very thankful to you.

     

  • Hello Muhammad,

    However, I looked into the manual but I am very confused about where to find information about the ADC.

    You can find the chapters for each peripheral in either the table of contents within the document or in the PDF sidebar:

    I am not sure when we use two ADC blocks then we need to change the values of parameters (ADC Module, ADC resolution, SOC, etc)  or not.

    You would only need to use another ADC block if you're trying to use a particular ADC/analog pin, you need to increase throughput of sampling, you need to oversample a particular signal, or some other such use case. There could be many reasons, these are the ones I'm most familiar with.

    If I need to change some parameters for the ADC block please let me know, I will be very thankful to you.

    It looks like you're manually triggering the ADC, for your case where you're trying to measure a 2-5Hz signal you may want to do something more continuous such as using the ePWM to trigger the conversion with an interrupt to read the value. I recommend referring to software examples provided in C2000Ware for ways of doing continuous SOC sampling. Please let me know if you have specific questions about the ADC or configuring it.