Hello Guest it is April 25, 2024, 06:13:30 PM

Author Topic: Cant get VB script to work  (Read 2849 times)

0 Members and 1 Guest are viewing this topic.

Cant get VB script to work
« on: September 02, 2010, 02:23:22 AM »
Hello there,

I just want to energize a output and change pulley.

I am new to this and i have tried several scripts but nothing.
The following is giving a '' Scriper Compile Error. In SpindleSpeed.mis''


rpm = GetRPM()
If
RPM > 2501
Then
SetPulley(2)
ActivateSignal(OUTPUT5)
End If

If
RPM < 2501
Then
SetPulley(1)
DeActivateSignal(OUTPUT5)

End If
SetSpinSpeed( rpm ) 


What is going on????

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Cant get VB script to work
« Reply #1 on: September 02, 2010, 05:41:58 AM »
Don't split your "if expression then" constructs accross lines.

If
RPM > 2501
Then

If RPM > 2501 Then

Cheers
Ian
Re: Cant get VB script to work
« Reply #2 on: September 02, 2010, 08:47:18 PM »
Thank Ian 

Simple issues are most difficult.


Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Cant get VB script to work
« Reply #3 on: September 03, 2010, 03:55:41 AM »
 :)