Products for USB Sensing and Control
It is currently Wed Oct 22, 2014 11:50 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Oct 09, 2008 12:03 am 
Has anyone been able to get a copy of Le Stang's Applescript Scripting Addition? How did work for you?

b0b


Top
  
 
 Post subject:
PostPosted: Sun Oct 12, 2008 4:08 am 
Hello everyone

Sorry for the late reply but I was pretty busy during the last weeks.

YOu'll find a copy of my phidget osax @ http://lestang.org/osax/Phidgets/Phidgets.osax.zip

Please consider this as a 'beta' version even if I've been using it daily for 3 months now without a glitch, they are a few functions that have not been tested thoroughtly yet.

Basicaly to use it you have to do the following:

a - connect to the interface kit : IKConnect or IKConnect 865 (to connect to the interface kit of id 865)
b -read from the interface kit : IKRawReadAnalogicInput or IKReadAnalogicInput to read analogic inputs
c -disconnect from the interface kit : IKDisconnect when you're done with the interface kit

I've implemented other functions to use digital inputs/outputs, they are working in the very same maner.

IKReadDigitalInput, IKReadDigitalOutput, IKEnableDigitalOutput, IKDisableDigitalOuput

And a few functions to get info on the interface ki :
IKGetVersion, IKGetStatus, IKGetDigitalOutputsCount, IKGGetDigitalInputsCount, IKGetAnalogicInputsCount

YOu can read one or all the inputs/ouputs :

IKReadDigitalInput -> read all digital inputs
IKReadDigitalInput 1 -> read input 1 (the first input is 0)

This can be used on all inputs/ouputs functions.

And I'm now planning on working on triggers and being able to connect over a network and have multiple interface kit connected at the same time.


Top
  
 
PostPosted: Wed Oct 15, 2008 6:44 am 
Dear Mr. Le Stang

Thanks for posting your scripting addition. How do you install it? Will you share your code?

Thanks again,

b0b


Top
  
 
 Post subject:
PostPosted: Thu Oct 16, 2008 2:05 pm 
Install the scripting addition in the following folder "~/Library/ScriptingAdditions/" you should create this directory if it does not exist yet.

Concerning the source code, it will be open sourced when I've added the few missing functionalities I've described in my previous post.


Top
  
 
 Post subject: Voltage Sensor
PostPosted: Tue Nov 18, 2008 11:52 pm 
Hello Mr. Stang,

I have your scripting additions for Phidgets installed. I have a voltage sensor and I want to use an Applescript to get the voltage readout. Is this possible with your scripting additions?

Can you tell me what I am doing wrong in this script because I get the error listed.

tell application "Phidget Interface Kit"
IKConnect
end tell

Phidget Interface Kit got an error: An error of type -1 has occurred.

Thanks!

b0b


Top
  
 
 Post subject:
PostPosted: Wed Nov 19, 2008 2:46 pm 
This scripting addition is working with a Phidget Interface Kit, not every phidgets. BTW the scripting addition shoudl be used without the 'tell ... end tell' block, but I'm affraid you won't be able to use it on your voltage phidget if it is the one that is working without the interface kit.


Top
  
 
 Post subject:
PostPosted: Wed Nov 19, 2008 3:14 pm 
I'm using the 8/8/8 Interface with the 1117 voltage sensor. To get the Voltage Sensor to work with Applescript is a new scripting addition required or can an addition be made to yours? Would it be possible to get your code to use?

Thanks,

b0b


Top
  
 
 Post subject:
PostPosted: Sun Nov 23, 2008 3:24 pm 
then it should be as easy as :


IKConnect
IKRawReadAnalogicInput ioNum

without any 'tell ... end tell' block like the one you mentioned earlier. And BTW, you cannnot have two applications using the port at the same time, so make sure you've no other application using the phidget board.


Top
  
 
 Post subject: no success
PostPosted: Sun Nov 23, 2008 8:18 pm 
Dear Mr. Stang;

in the Script Editor I wrote - IKConnect 79821 --the serial number and I get;

tell current application
IKConnect 79821
"An error of type -1 has occurred."


I type IKRawReadAnalogicInput in the Script Editor and get this;

tell current application
IKRawReadAnalogicInput
{}
end tell

My voltage sensor is #7 in the sensor list.

Thanks for your help,

b0b


Top
  
 
PostPosted: Tue May 05, 2009 11:15 am 
Hi Le! Thank you for building an Applescript addition for the Phidgets hardware, it is extremely generous of you to both build and share it publicly. I am using it to get values from two temperature sensors attached to an InterfaceKit 8/8/8.

However, I’m having the exact same problem as Bob did. When I run my code:

Code:
IKConnect 29292
IKGetAnalogicInputsCount
IKRawReadAnalogicInput 1
IKRawReadAnalogicInput 6
IKDisconnect

I get the following error in line 1:

Code:
An error of type -2 has occurred. (-2)

Did anyone figure out how to resolve the similar errors they were experiencing?

EDIT: related thought: does the scripting addition go anywhere else than the root Library level? Like, somewhere with the other Indigo scripts?

Thank you,


Top
  
 
PostPosted: Wed May 06, 2009 5:01 am 
Try using

try
IKGetAnalogicInputsCount
IKRawReadAnalogicInput 1
IKRawReadAnalogicInput 6
end try


Top
  
 
PostPosted: Thu May 07, 2009 11:15 am 
Thanks Bob. I tried that, but got the same result. :-(


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group