Welcome, Guest
Username Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: passing multiple inputs to sms program

passing multiple inputs to sms program 2 years, 8 months ago #1369

Hi
May i know what is the correct way to pass multiple inputs to a smart motor sm2315DT from a serial com port.

should I use

a=1,b=2,c=3 'inputs in string separated by commas

or

'a=1 b=2 c=3' inputs in string separated by space

Re: passing multiple inputs to sms program 2 years, 8 months ago #1370

  • csearcy
  • OFFLINE
  • Posts: 480
  • Karma: 23
Leave out the commas. Use a carriage return or another space at the end.
Be careful not to overflow the buffer which is only 16 characters.

Re: passing multiple inputs to sms program 2 years, 8 months ago #1372

Hi Csearcy
Thank you very much for your fast advise.
But when I try to scan error or download the following program to the sm2315dt using interface v2.4.3.7

I got an very interesting error

undefined symbol "+" which I could not believe. My program is as follow

SADDR3
ECHO
WAKE
AMPS=800 'CURRENT LIMIT TO 80%
MP
A=100
V=2*32213
GOTO100
END
C100

d = a+b+c
P = d*7 ' 700 count is the max throttle angle
G
TWAIT
GOTO100

Re: passing multiple inputs to sms program 2 years, 8 months ago #1373

  • csearcy
  • OFFLINE
  • Posts: 480
  • Karma: 23
You probably just need to specify the default compiler firmware version. The SMI2 software will show in the lower right hand corner of the screen. It defaults to 5.0.x.x or something close to that. If you go to the Compile menu, and select Default compiler firmware version, it will allow you to select the firmware of your motor(which is displayed on the motor sticker... or in the configuration window of SMI2) after detecting motors.

Re: passing multiple inputs to sms program 2 years, 8 months ago #1374

Hi
My firmware version is 440C and I had set the default compiler firmware version to 440c
but the error persists I really don't understand.

Re: passing multiple inputs to sms program 2 years, 8 months ago #1375

  • csearcy
  • OFFLINE
  • Posts: 480
  • Karma: 23
ok... sorry I missed that in your code before. The d=a+b+c isn't allowed. In class4 you can only have two operands... so you have to split it up.

x=a+b
d=x+c
  • Page:
  • 1
  • 2
Moderators: hsummer, csearcy
Time to create page: 0.46 seconds