Loading ...
Sorry, an error occurred while loading the content.

47499liberty basic translation

Expand Messages
  • Jeff Lehman
    May 4, 2014
    • 0 Attachment
      Hello All,

      I know this is not a question specifically about liberty basic.  I am using a 32 bit machine running Windows XP.

      I have a device with 24 inputs that can be read with this following Visual Basic command...

      Function cbDIn(ByVal BoardNum&, ByVal PortNum&, DataValue%) As Long

      I am a novice to Liberty Basic, but reading info available on the internet I have been able to select whether the 24 lines are inputs or outputs, I can output to the device fine,

      I just haven't be able to translate the input line to get it to work ...

      First, I open their dll file using OPEN "cbw32.dll" for dll as #mccdaqdll (cbw32.dll) is the name of the dll file.

      I can configure which group of inputs (ports) are for input or output by using...
      calldll #mccdaqdll,"cbDConfigPort",BoardNum As Long, PortNum As Long, Direction As Long, result as void

      I can send send an output of 0-255 to a port (as DataValue) and that works fine...
      calldll #mccdaqdll,"cbDOut", BoardNum As Long, PortNum As Long, DataValue As ushort, result As Void 

      However, I cannot figure out how to convert this visual basic line
      Function cbDIn(ByVal BoardNum&, ByVal PortNum&, DataValue%) As Long
      into liberty basic so I can read the input.

      Any suggestions?

    • Show all 4 messages in this topic