How to read data from the Puck color meter

How to read data from the Puck color meter2020-08-14T15:20:16-07:00

Home Forums Support How to read data from the Puck color meter

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • Naveen KoulNaveen Koul
      Participant
      Post count: 3

      Hello ,

      I was looking at manual V2.0 to see commands to read lux
      Manual says GRL

      it i not-clear to me how to use this command GRL

      is it get GRL

    • Illuminati InstrumentsIlluminati
      Keymaster
      Post count: 2

      Yes, the command to get the reading in lux is “GRL”, as in “Get Reading in Lux”. Most commands start with either “S” (for setting parameters) or “G”, (for getting parameters or data).

      So you would send over the serial port GRL<CR>. The meter will respond with grl nnn.nnn, where “nnn.nnn” is the measured light level in lux. Note that commands are not case sensitive. The Puck’s replies will always start with the command, so you know the command was accepted and that’s what it’s responding to.

      • This reply was modified 3 months, 1 week ago by Illuminati InstrumentsIlluminati.
      • This reply was modified 3 months, 1 week ago by Illuminati InstrumentsIlluminati.
    • Naveen KoulNaveen Koul
      Participant
      Post count: 3

      Hello ,

      As I opened serial port , but not sure how to use GRL command .

      as i cannot use GRL command directly through command line. Not sure how to use the command.

      Naveen

    • Michael OkinchaMichael Okincha
      Senior Moderator
      Post count: 8

      Hi Naveen,

      You need to use a serial terminal emulator program to communicate with the Puck. Popular choices are PuTTY (https://www.putty.org/) for Windows, Linux, Mac or minicom (Linux, Max). Set the terminal for 115200 baud, 8 bits, no parity, one stop bit (“8N1”).

      The Puck is intended to be controlled through a programming language such as C/C++, Python, MATLAB, or Labview. They are not really meant to be controlled from the DOS command line.

    • Naveen KoulNaveen Koul
      Participant
      Post count: 3

      Hello ,

      I tried to use minicom and putty . In putty I selected serial /dev/ttyUSB0 as that is what port i see puck is attached to.

      I did set the parameters asdefined above.

      My main gaol is to use python to read lux and CCT values
      In python do i need to open serail port first.
      ser =serail.Serial(“dev/ttyUSB0,115200)
      but after that I have ser. read and ser.write
      not sure how to use GRL commnd to read lux valaue in my code.

      thanks
      Naveen

    • Michael OkinchaMichael Okincha
      Senior Moderator
      Post count: 8

      Hi Naveen,

      We do have a prototype Python3 driver. It was developed on Windows, but it should be useful for developing a driver on a Mac or Linux system.

      I’ll contact you through email with the details.

      Mike

Viewing 5 reply threads
  • You must be logged in to reply to this topic.
Go to Top