Error Unknown JSON response: {"qr":32}

186 views
Skip to first unread message

Daniel

unread,
Feb 14, 2016, 7:59:33 AM2/14/16
to OpenPnP
Hello All,
I try to make head offset/setup. 
MAchine does not behave like I have expected. meaning that 
position camera button . or position nozzle button  does not work as expected.

In error log are a lot of :
2016-Feb-14 14:53:52:094 [Thread-11] ERROR org.openpnp.machine.reference.driver.TinygDriver  - Unknown JSON response: {"qr":32}

attached it's also machine.xml

Thank you for any ideea  !
machine.xml

Jason von Nieda

unread,
Feb 14, 2016, 1:51:46 PM2/14/16
to OpenPnP
Hi Daniel,

In your machine.xml there are no offsets defined on either your nozzle or camera. Did you remember to hit Apply after making changes? 

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/42ea7bb8-8b7b-43b8-a284-6c5dc335dd01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel

unread,
Feb 15, 2016, 1:20:34 AM2/15/16
to OpenPnP
I have wrote the offset at head>nozzle and machine behaves as it should be.

If I wrote the offset at camera (there are 2 locations at camera where can be put an offset) nothing happens.

What I have noticed : if you wrote an offset at head>nozzle this is written on xml file.  
If you go back and put offset x=0 and y=0  on the same (head>nozzle) and press apply, then in XML file remains old values.

What should I do ? 

By the way, error "TinygDriver  - Unknown JSON response: {"qr":32}"  it present in stable and development release.
If you guide me I would try to fix it !

Thank you.
Daniel
machine.xml

Cri S

unread,
Feb 15, 2016, 7:42:45 AM2/15/16
to OpenPnP
As written on Chat, probably $qv=0

Jason von Nieda

unread,
Feb 15, 2016, 11:04:05 AM2/15/16
to OpenPnP
Hi Daniel,

To expand on what Cri said, make sur eyou set $qv=0 in your TinyG configuration. This will turn off the queue reports which are causing the error.

I tried what you said above, setting the offsets to 0 and it worked correctly on my test. One thing to make sure of is that when you exit OpenPnP you use the File->Exit menu or your operating system's standard close method. Don't just kill OpenPnP or it may fail to save your config.

Jason

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Daniel

unread,
Feb 15, 2016, 2:05:54 PM2/15/16
to OpenPnP
$qv=0 did the trick. Log it's empty now.
Unfortunately main problem still present :
Offset wrotten ok for camera but machine does not move ! what should I do ?
should be made homing first ?
If I put those offset values at ReferenceNozzleN1 tham machie works as it should be .
What I am doing wrong ?





On Sunday, February 14, 2016 at 2:59:33 PM UTC+2, Daniel wrote:

Jason von Nieda

unread,
Feb 15, 2016, 2:07:34 PM2/15/16
to OpenPnP
Hi Daniel,

Delete the two ImageCameras. Those are being chosen by OpenPnP instead of your camera because they are first in the list.

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

DAniel Dumitru

unread,
Feb 15, 2016, 2:23:12 PM2/15/16
to ope...@googlegroups.com
You are a saint Jason ! It's working now.


La 15.02.2016 21:07, Jason von Nieda a scris:
Hi Daniel,

Delete the two ImageCameras. Those are being chosen by OpenPnP instead of your camera because they are first in the list.

Jason


On Mon, Feb 15, 2016 at 11:05 AM Daniel <dand...@gmail.com> wrote:
$qv=0 did the trick. Log it's empty now.




Avast logo

Acest email a fost scanat contra virușilor de către programul antivirus Avast.
www.avast.com


Cri S

unread,
Feb 16, 2016, 1:25:46 AM2/16/16
to ope...@googlegroups.com
That commands and other that maybe fool people should be added to the homing sequence.
--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/7blONVz3Y9M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/56C22591.1050709%40gmail.com.

Jason von Nieda

unread,
Feb 16, 2016, 1:27:20 AM2/16/16
to ope...@googlegroups.com
I agree. If someone could send a simple pull request for it that would be helpful. Should be a very small change but I don't have a TinyG handy to test it out, so if someone can do it that would be great!

Jason


You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Daniel Dumitru

unread,
Feb 16, 2016, 4:22:09 AM2/16/16
to ope...@googlegroups.com
I will add that pull request. One comment.  Homing sequence should be made automatically at program start up ?
My machine does not make this now.. or is because I don't have stepper for Z axis (it's penumatic). 

Cri S

unread,
Feb 16, 2016, 5:12:09 AM2/16/16
to ope...@googlegroups.com

No, it must be done manually.
Doing it automatically can do injury ON operator, if machine restart and openpnp is started automatically.

Daniel

unread,
Feb 25, 2016, 1:34:35 AM2/25/16
to OpenPnP
I have tried to add $qv=0 on method  public synchronized void connect()

I got those messages and program stucks indefinetly at this line.

If I try :          sendCommand("$qv=0", 1); (with timeout)    then controller does not work


2016-Feb-25 08:28:41:337 [Thread-6] DEBUG org.openpnp.machine.reference.driver.TinygDriver  - sendCommand($qv=0, -1)
2016-Feb-25 08:28:41:363 [Thread-7] DEBUG org.openpnp.machine.reference.driver.TinygDriver  - Received invalid JSON syntax
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8
at com.google.gson.JsonParser.parse(JsonParser.java:65)
at com.google.gson.JsonParser.parse(JsonParser.java:45)
at org.openpnp.machine.reference.driver.TinygDriverZPneumatic.run(TinygDriverZPneumatic.java:360)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
at com.google.gson.JsonParser.parse(JsonParser.java:60)
... 3 more
2016-Feb-25 08:28:41:364 [Thread-7] DEBUG org.openpnp.machine.reference.driver.TinygDriver  - Received invalid JSON syntax
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8
at com.google.gson.JsonParser.parse(JsonParser.java:65)
at com.google.gson.JsonParser.parse(JsonParser.java:45)
at org.openpnp.machine.reference.driver.TinygDriverZPneumatic.run(TinygDriverZPneumatic.java:360)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
at com.google.gson.JsonParser.parse(JsonParser.java:60)
... 3 more

Cri S

unread,
Feb 25, 2016, 9:19:38 AM2/25/16
to ope...@googlegroups.com
after connected = true;
JsonObject response = sendCommand("{\"qv\":0}", 500);


2016-02-25 6:34 GMT, Daniel <dand...@gmail.com>:
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenPnP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openpnp/7blONVz3Y9M/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openpnp+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/cb7c5bcf-58e1-4557-91b3-892ab91cb222%40googlegroups.com.

Daniel Dumitru

unread,
Feb 25, 2016, 9:59:35 AM2/25/16
to ope...@googlegroups.com
Thank you Cris !
Reading more I have managed to understand : on TinyG if you send a command that starts with $ then TinyG moves automatically in text mode and not JSOn.

Kind regards,
Daniel

You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Feb 25, 2016, 10:32:39 AM2/25/16
to ope...@googlegroups.com
The driver on openpnp is written, that it interpret and wait to
responses in JSOn format,
and because that json format should be used on that driver.

2016-02-25 14:59 GMT, Daniel Dumitru <dand...@gmail.com>:
> https://groups.google.com/d/msgid/openpnp/CAPU3koMg8NjLjTfVv-kYZ-A0TQJRr89eM2c%3DAevaaPJEpfW4dw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages