12-05-2019 10:08 AM
Hi All,
I want to use a MAX Task which measures the PWM from an analog input similiar to the post https://forums.ni.com/t5/LabVIEW/Measuring-PWM-duty-cycle-with-Analog-Input/td-p/2451380 with the DAQmx API(I don't have LabView). I want to get this working in a Task in NI Max, so that the specific task only returns a value representing the duty cycle. That's because i want to get the task working in the software Vector Canoe.
Is this possible without the use of Labview, Measurement Studio or LabWindows/CVI?
Best regards,
jw97
12-05-2019 10:23 AM
Briefly, no.
The task you can create in MAX can only cover the analog *sampling*, not any of the additional software-based post-processing needed to calculate a duty cycle.
-Kevin P
12-12-2019 02:00 AM
Hi,
Thanks for the reply.
I understand that i can't create such a task within NI Max.
Is there no other way to create such a task in Visual Studio and use it in NI Max as a Task?
For Example use a custom Task as a Plugin in NI Max.
Best Regards,
jw97
12-12-2019 06:23 AM
@jw97 wrote:
Is there no other way to create such a task in Visual Studio and use it in NI Max as a Task?
You have the roles reversed. MAX is nothing more than a configuration manager. Visual Studio is a programming environment that can use the tasks established in MAX to capture data and analyze it. I want to say you can do what you are requesting with FlexLogger (have not used it, so no promises). But for something as simple as you are asking for, DAQExpress might be a good way to go.
12-12-2019 09:24 AM
I'm not familiar with any kind of "plugins" for MAX. Maybe this is a newish capability I'm not even aware of? Attaching to external, uncontrolled code is kinda against the "spirit" of MAX as I've come to know it. Overall I'm kinda doubtful though I can't answer with certainty.
-Kevin P
10-12-2020 04:34 AM
Hello,
i want to create my own task like this guy here, see attachment. Is there way to add my own function: Instead of a simple volt measurement I want to measure and calculate a PWM_DutyCycle. The calculated value of the DutyCycle shall be written in a network variable where I can access it via CANoe. In CANoe I want to change a value of a network variable and the PWM_Measurement starts.
NI MAX added function --> Variable "Activate PWM" set to true --> Measurement starts --> e.g. network variable "PWM_DutyCycle" set to 50 (%) --> CANoe reads the network variable.
Reason: Adding function easily in NI MAX for other users.
Programs I use: Visual Studio 2019, CANoe v13
Thanks for help 🙂
greetings
p_dieng