B4R Question Doubt with CallsubPlus

Gerardo Tenreiro

Active Member
Licensed User
Hello, very good and delighted to be with you again.
I am making a program in which I use RS485 communication with a transmission Enable Pin. To Transmit I need to activate the pin and once the transmission is finished I have to deactivate the pin to go into reception mode. Reviewing the transmission, I observe that I need approximately 2 milliseconds to send two bytes to 9600, so it occurred to me to use the CallSubPlus instruction with the following code.

This is the error that is generated. Any idea what might be going on?


Thank you so much
 

Gerardo Tenreiro

Active Member
Licensed User

Solucionado, el error es que CallSubPlus pasa un parámetro y en la rutina es necesario recolectar dicho parámetro.
CallSubPlay("Rutina_Nombre",ms,etiqueta)
....
Private Sub Routine_Name (Etiqueta como byte)

Muchas gracias
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…