Author Topic: Controlling IO204 digital outputs  (Read 774 times)

emckinlay

  • Newbie
  • *
  • Posts: 2
Controlling IO204 digital outputs
« on: March 07, 2010, 04:51:03 PM »
I need to be able to programatically manipulate the digital output lines on the IO204.  The API spec gives instructions on getting data FROM the device but nothing on setting the outputs.  Manually turning lines on and off will not give me what I need. I basically have a board that plugs into the IO204 that acts as a multiplexor for up to 64 analog input lines.  I am using the digital output lines to control the multiplexer and therefore select the appropriate analog input.

I would also like to execute this process via a perl script so that it can be easilly scheduled.

Any hints would be greatly appreciated.

Eric
« Last Edit: March 07, 2010, 08:18:52 PM by iobridge »

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Controlling IO204 dital outs
« Reply #1 on: March 07, 2010, 08:18:11 PM »
OK, great question - with an easy answer.

All you have to do is create a Digital Output Control Widget. This will generate a widgetID that you use with the Static Widget API.

http://www.iobridge.net/wiki/api/static-widget-api

All you do is use a GET to send the widgetID and state. This works very well in almost every scripting language, JAVA, VB, LabVIEW, etc.


This turns the state of the digital output to "1":


Code: [Select]
http://www.iobridge.com/widgets/static/id=[widgetID]&value=1
ioBridge Support
Community Team

emckinlay

  • Newbie
  • *
  • Posts: 2
Re: Controlling IO204 digital outputs
« Reply #2 on: March 07, 2010, 10:44:56 PM »
Perfect!  I love easy answers!
..and impressive to get a quick answer on a Sunday afternoon! ;)