You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
5.1 KiB

  1. char examplestring[] = "\n\
  2. \n\
  3. Welcome to the NILM Ethstream examples.\n\
  4. \n\
  5. For the most part, typing \"ethstream\" by itself will sample the first\n\
  6. two channels at 8 kHz on 10V range. Press CTRL-C to terminate sampling.\n\
  7. \n\
  8. If you want current measurements on the first two phases of NILM\n\
  9. with default sample rate of 8 kHz and 10V range:\n\
  10. \n\
  11. ethstream -C 0,3\n\
  12. \n\
  13. The device is configured so that channels 0 through 2 are currents for\n\
  14. the three phases and channels 3-5 are for voltages of the three phases.\n\
  15. The current channels sample voltages that will depend on the DIP switch\n\
  16. settings in the NILM box. The DIP switch positions allow you to convert\n\
  17. ethstream's readings to true current readings.\n\
  18. \n\
  19. If you want only currents at 16 kHz and 10V range:\n\
  20. \n\
  21. ethstream -n 3 -r 16000\n\
  22. \n\
  23. The -n option samples a number of channels starting at 0. The rate can be\n\
  24. at least 16000 if 12 channels are sampled , but it can do more if\n\
  25. fewer channels are sampled. The limiting factor is the highest channel\n\
  26. sampled. Sampling just the top channel (11) is as bad as sampling\n\
  27. all 12 at once.\n\
  28. Ethstream will warn if you approach the limits of the NerdJack with the\n\
  29. given sampled channels. Sampling outside the range of the NerdJack might\n\
  30. result in corrupt data or crashing of the device. There will be no\n\
  31. permanent damage to NILM or NerdJack, but be aware of the possibility of\n\
  32. data corruption.\n\
  33. \n\
  34. If you need a higher accuracy but lower range measurement on the voltages:\n\
  35. \n\
  36. ethstream -R 5,10 -C 3,4,5\n\
  37. \n\
  38. The two numbers to the R command set the range to either 5V or 10V. Above,\n\
  39. we are setting channels 0-5 to 5 V range and channels 6-11 to 10 V range.\n\
  40. Channels 6-11 are unconnected, but they can have range set independently.\n\
  41. \n\
  42. All of the above examples output a digital number from 0 to 65535 with\n\
  43. 65535 representing the highest range (5V or 10V). 0 represents the most\n\
  44. negative range (-5V or -10V). If you want conversion\n\
  45. to volts for all six voltages and currents:\n\
  46. \n\
  47. ethstream -c -C 0,3,1,4,2,5\n\
  48. \n\
  49. The channels will be output in the order given in the C command. This\n\
  50. command will group the current and voltage data by phase.\n\
  51. \n\
  52. If you are supplying data from ethstream to another program, you might\n\
  53. want to dump its output to a file and terminate after a certain number of\n\
  54. samples:\n\
  55. \n\
  56. ethstream -n 6 -r 8000 - l 16000 > outfile.dat\n\
  57. \n\
  58. This will take 16000 samples at 8 kHz (2 seconds of acquisition) of all\n\
  59. channels and write the data to outfile.dat. This can be directly read\n\
  60. by a package like MATLAB.\n\
  61. \n\
  62. If there are multiple NerdJacks or you have changed the TCP/IP settings\n\
  63. from default, you might have to specify which one you want to talk to:\n\
  64. \n\
  65. ethstream -a\n\
  66. \n\
  67. This will sample two channels at 8 kHz from the NerdJack at\n\
  68. This is the default \"1\" setting on the NerdJack. If no address is\n\
  69. specified, ethstream connects first to It then tries\n\
  70. to autodetect the NerdJack. This should find the device if you are on\n\
  71. the same network, but it will get confused if there are multiple NerdJacks\n\
  72. on the network.\n\
  73. \n\
  74. Labjack only Timer modes are also avaliable. Read the Labjack UE9 Users Guide\n\
  75. for more information. Upto 6 timers of various modes can be specified,\n\
  76. they occur on FIO0-FIO5 which are on channels 200-205 respectively in order\n\
  77. of specification. For 32 bit timer modes, the MSW should be read from\n\
  78. channel 224 imeadiately after the LSW is read from one the timer channel.\n\
  79. A clock frequency divisor is specified on a per device basis. For example:\n\
  80. \n\
  81. ethstream -t 4,12 -T 1 -C 200,224,201\n\
  82. \n\
  83. This will enable two timers with the fastest system clock divisor (48 MhZ/1)\n\
  84. and read the two 16 bit words for timer mode 4 and the single 16 bit word of\n\
  85. timer mode 12. These three words will occupy their own columns in the output\n\
  86. stream. Digital timer mode channels can be interspersed with analog inouts.\n\
  87. \n\
  88. Labjack only individual analog input channel gain set is also avaliable.\n\
  89. Gain 0 is default on labjack and corresponds to -5.18v to +5.07v. Gain 1 is\n\
  90. is -0.01 to +5.07v. Gain 2 is -0.01 to +2.53v. Gain 4 is -0.01 to +1.26v.\n\
  91. Gain 8 is -0.01 to +0.62v. Gains on the -g flag should be put in the desired\n\
  92. order corresponding to the channels as specified by the -C flag. If there are\n\
  93. less gains specified than channels the remainder default to gain 0. Extra gains\n\
  94. are ignored. Gains can be specified for digital inputs or timer modes but they\n\
  95. are irrelevant. A case where one should do this is if there are dital input\n\
  96. channels intersperced within analog input channels; this keeps the order matched\n\
  97. up so later analog input channels have the expected gain.\n\
  98. \n\
  99. ethstream -t 4 -T 1 -C 0,1,200,224,2,3 -g 2,2,0,0,4,4 -c\n\
  100. \n\
  101. This will set channles 0,1 and 2,3 to gain 2,2 and 4,4, respectively and convert\n\
  102. the data to volts using the firmware stored factory calibrated data on the\n\
  103. labjack. The digital channels 200 and 224 will remain undisturbed as integers.\n\
  104. \n\
  105. ";