How can I promote parameter from Serial Transmit block (Arduino) to a higher block in Simulink?
    13 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hi all,
I'm working with 'Simulink Support Package for Arduino Hardware', with Serial Transmit block specifically, with an Arduino Mega 2560. I want to create a higher block that contains this block and others, so I'm trying to promote its parameter 'portNumber' (determine the serial port to use in Arduino) for change it in the higher mask.
When I create that mask, I add a new parameter and use the 'Promote underlying block parameter(s) to this mask parameter' button. All is ok until I press 'Build model'. The following error appears:
"Error evaluating 'InitFcn' callback of Arduino Serial Transmit block (mask)
Caused by: Undefined function or variable 'port'."
I don't know why it doesn't work, if anyone know what is happening and could help me I would appreciate. Thanks.
1 commentaire
  Kaustubha Govind
    
      
 le 10 Juil 2014
				What is the name of the corresponding mask variable that was promoted? You might need to update the value of the portNumber parameter of the Arduino Serial Transmit block to the name of the parent's mask variable.
Réponses (1)
  Sreeram
    
 le 31 Juil 2014
        
      Modifié(e) : Sreeram
    
 le 31 Juil 2014
  
      Hi Josemag,
I tried promoting the serial port number parameter to a mask and I could download the model to the Arduino board and the model worked just as expected .
Attached below is a snapshot .
Could you please let me know more regarding how the mask in your case looks like and may be i could help more.
Thanks,
Sreeram Mohan

0 commentaires
Voir également
Catégories
				En savoir plus sur Arduino Hardware dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


