Discussion

Left ArrowBack to discussions page
PrasannaPrasanna Posts: 42 Apprentice
Hi @matthewd92
a=socket_read_asci_float(6)
b=a[1]
Sometimes i did not receive a from socket so it shown as '?'  which defines 'not a number' i think. 

Please refer attachments of errors. 

When i wanted to run the program, i have to go and make it zero manually in order to run.
How to make it as zero when i receive such errors.
Note:i cannot use previous program values for some reasons. 

Comments

  • PrasannaPrasanna Posts: 42 Apprentice
    @matthewd92

    Gentle Reminder on this
  • matthewd92matthewd92 Posts: 826Founding Pro, Tactile Sensor Beta Testers Handy
    The first return value in the list that is returned is the number of values returned, you can use this to check to see if there is anything returned.

    if a[0]>0:
      b=a[1]
    else
     b=0
    end

Sign In or Register to comment.
Left ArrowBack to discussions page