What can cause a sy...
 
Notifications
Clear all

What can cause a syntax error?

3 Posts
1 Users
0 Reactions
29.7 K Views
(@Chris Dancer)
Posts: 12
Active Member Guest
Topic starter
 

I'm writing a labview application to drive a couple of SmartMotors. I keep noticing the syntax error flag being set, often when I haven't sent any commands. It seems to reset itself arbitrarily too. I also see it set on the second motor every time I have done a "find motors" in the SMI.

What actually causes a syntax error? As a test I tried sending gibberish to a motor but it just ignored it, no syntax error.

Communications seem to be working fine by the way. I'm using 2 motors daisy-chained on RS232.

 
Posted : 07/09/2011 8:08 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

A syntax error will occur when any invalid command comes in through the serial port.
Note: If the motors are addressed, they will ignore all data unless their address is specified. Syntax errors can also occur due to electrical noise corrupting the command.

 
Posted : 07/09/2011 4:48 pm
(@Chris Dancer)
Posts: 0
New Member Guest
 

Thanks. Today it is behaving as it should. If I send an invalid command like "1H" or "1£$%^" then it sets the syntax error flag. It wasn't doing that yesterday - very odd.
I'll try to check the RS232 link by sending repeated commands.

Edit:
I just ran the tuning utility on both motors and no syntax errors appeared. I think that counts as a thorough test!

 
Posted : 08/09/2011 12:20 am
Share: