Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
n6xb
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

I am able to configure GPIO 1,2,3,4 and 10 as outputs.  However I cannot seem to configure GPIO9 as output.  There seems to be some D/A output on GPIO9.  It is set as output on the Script Configuration page in MCE Wizard.

Is there something else I need to do to configure this pin 3 as an output?  Thank you! 

 

0 Likes
1 Solution
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

1) As GIPO9 is in floating condition there might be an issue to used it as a normal GPIO. Can you please set the DACout[3] parameter to zero in the text file to avoid the floating condition and let us know your observation?

sk7211_0-1698060247073.png

2) As per initial understanding Vsp might be overriding the stop command. Can you please let us the voltage being observed at Vsp when the motor is stopped for a brief time?


Best Regards,
Sahil Kumar

View solution in original post

0 Likes
10 Replies
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

Can you please let us know if you are facing this issue with the custom board or EVAL-M7-D111T? Also, please share the script and MCEWizard file with us.


Best Regards,
Sahil Kumar

0 Likes
lock attach
Attachments are accessible only for community members.
n6xb
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Thank you Sahil for your reply. 

1. Yes, I am using the EVAL-M7-IMD111T board.  I have checked the board, and it seems fine.  For some reason, when I write to change the GPIO9 pin, something blocks the write.  So the output does not change even though GPIO9 is set to OUTPUT in script config.  The code is very simple in script:

//
//toggle GPIO9 every 100ms
//
if (GPIO9_IN) {
GPIO9_OUT =0;
}
else {
GPIO9_OUT =1;
}

This code works fine on other GPIOs, but not on GPIO9! 

2. One other issue... I am trying try to turn the motor on and off using AIN2 input.  This is in Vsp mode.  The code seems to work, but I think the IMD111 is overriding the command as the motor stops very briefly, and then starts up again.  So I am unable to stop the motor completely.  Perhaps this is not possible in Vsp mode?  Perhaps I need to use UART mode and read the Vsp pin in Script instead to set speed?  Then use Command =0 to shut down the motor?  Here is the code for this:

//
//update GPIO1 and stop motor if AIN2 changes TO LOGIC LOW
//
temp=ADC_Result2;
if (temp > 2048)
{
GPIO1_OUT =1;  //turn on led
}
else
{
GPIO1_OUT =0;   //turn off led
Command= 0;     //stop motor
}

Thank you for your kind assistance!

 

0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

Can you please share the MCE Wizard Configuration file (.mc2 file) with us?

Best Regards,
Sahil Kumar

0 Likes
lock attach
Attachments are accessible only for community members.
n6xb
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Yes, please find attached.

0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

We are working on the issue, please expect some delay.

Thank you for your understanding.

Best Regards,
Sahil Kumar

0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

Please share the complete project file with us in ZIP format.

Best Regards,
Sahil Kumar

0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

1) As GIPO9 is in floating condition there might be an issue to used it as a normal GPIO. Can you please set the DACout[3] parameter to zero in the text file to avoid the floating condition and let us know your observation?

sk7211_0-1698060247073.png

2) As per initial understanding Vsp might be overriding the stop command. Can you please let us the voltage being observed at Vsp when the motor is stopped for a brief time?


Best Regards,
Sahil Kumar

0 Likes
n6xb
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Yes!  Setting DACout[3] =0 solved the GPIO9 problem.  I can now use GPIO9 as an output.  Thank you!

As for Vsp input, if Vsp is above the motor start voltage (>4%), and the motor is running, it seems that the motor  cannot be turned off by script.  For testing, Vsp=1V.  Vsp input seems to override the STOP command in script.   Is there some other method for turning off the motor in script while still using the Vsp input?

0 Likes
Sahil_K
Moderator
Moderator
Moderator
First like given 100 solutions authored 250 sign-ins

Hi @n6xb ,

Sorry for the delay.

Usually, it is not advisable to employ both VSP and script for initiating start and stop commands as VSP will override the script. Instead, you can implement start and stop commands through a script by first switching the control mode from VSP to UART mode and then stopping the motor through the script. Once the motor is functioning as desired, you can revert to VSP control by changing the control mode back to VSP.

Best Regards,
Sahil Kumar

0 Likes
lock attach
Attachments are accessible only for community members.
n6xb
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Please find attached the requested files.  Thank you!

0 Likes