Matt B

Members
  • Content Count

    15
  • Joined

  • Last visited

About Matt B

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is there a easy way to shorten the number from scope. Example I get a 88.23456987655, I would like to capture or round to 88.23? @attila Awesome... How would I implement this into a array. For example below is the code. "rgusw" is the array I would like to round.
  2. Is there a easy way to shorten the number from scope. Example I get a 88.23456987655, I would like to capture or round to 88.23?
  3. Above the measured value of NegWidth always displays the correct reading. Below is the desired result. I get 6 pulses in each direction. Below is the result after running a few sensors. Once the data gets like this below the fix is cycling the scope off and back on. SensorTestingA_Updated.js I found that if I run the test and print out the usw & usw_B result (Not Averaged) it has been correct all morning. I do not know if that will help us figure the issue out. Thank you again for the help.
  4. Hey @attila thank you for the reply. Today I worked to figure this issue out. I did find one issue that I could resolve. When I notice my numbers wrong, I would turn the scope off and back on. That would fix my data every single time. I tried to turn the scope off at the end of my script, but I have not been able to successfully turn it back on using my script, but I am working on that. Do you have any ideas? I was able to stop the scope and restart it before the next cycle. So far everything is working well. Matt
  5. @attila Hey Thank you helping with my project a month ago.. Below is the code that you helped me with. Basically when the scope is triggered I average the number of readings that are given. It seems that when the data is averaged from the scope I am getting weird data within the array. for example I may get a quanity of 9 numbers and most of them are around 44.3, 44.9 or 45.23... Those numbers would be ok. But within the same averaged array I am getting numbers that are 80 and 60 and I am not sure how. Thank you for the help. var rgusw = [] var cw = 0 var sumus
  6. Thanks @attila I am using Terminal program to check the data output. Im using a USB to Serial adapter to the pc. Looks like the problem was the polarity. Once I changed it to inverted the data started working correctly. Thank you for the help!! Matt
  7. Hi @attila I adjusted my code to convert to text and I am not getting the desired text. Do you have any ideas?
  8. Hello @attila I have my project working well. Now I am trying to send my results via serial using UART. I am seeing data, but I do not know how to decode it. I am using Terminal to test it and I am receiving junk. Here is the snippet of the Logic and my code. Scope1.run(); StaticIO.run(); Protocol.run(); var rgusw = [] var cw = 0 var sumusw = 0 var Sensor1LL_CC = 38 //Sensor A Counter Clockwise Lower Limit +-7 var Sensor1UL_CC = 52 //Sensor A Counter Clockwise Upper Limit +-7 var SensorA_CC_Tested = 0 //Sets Sensor Test Value to ze
  9. Hello @attila Is it possible to re-activate the script again after it has ran automatically? Thanks, Matt
  10. I have another question. Below is the output of the script. Since it is not in a array, I am having issues trying to average the two different readings below. I assume that there is a JavaScript function to do this? Thanks, Matt
  11. The reason I have negative voltage readings is I working in a noisy environment. We have multiple inverter drives running sporadically all day long. I swapped my scope leads and inverted my trigger and voltage to get the pulse. I did this to get rid of the noise. Before I made this change it would trigger automatically in ambient air because of the voltage trigger. I was able to get the measured Pulse Width this time. I had to multiply to get the decimal in the correct spot. Thanks to everyone for the help. Matt
  12. I tried to setup the scope like you did above and I didn't get the same results. More than likely my issue is the sensor. This sensor is used for speed. I have a trigger as 940mv and this is based on the resister I have hooked up. Once I trigger the sensor I see one pulse and that pulse width will be either 45 or 90 us for a good sensor. When I wired the StaicIO to the sensor to use logic to get the pulse width, the values that I was seeing in Logic was wrong. It was not the same as the scope reading. Is there another way to get "NegWidth" into a variable so I can use it with script
  13. Are you saying I do not have access to NegWidth measured value with the latest copy of the software?
  14. I do not think that will work for this application. I am actually testing a sensor. I am using the trigger to get the pulse from the sensor. The pulse responds differently to rotation in the clockwise/cc direction. I am measuring that Pulse width and checking to make sure it is in tolerance. If it is within tolerance I will activate StaticIO output. If I could get the measurement of the NegWidth or PosWidth from the Scope into a variable in Script, I may be able figure this out.
  15. Hello, I am having a issue writing a script to turn on a digital output for pulse width measurement. I have two measurements. One has a pulse width of about 45us and the other around 80us. I have tried to display the Pulse Width using script and I am having issues. I would like to use the pulse width measurements and check it for tolerance. If measurement is good, turn on output. Any help would be appreciated. Thanks, Matt