- Main
- Tutorials
- Library
- Samples

- File List
- Globals

ioThinx_4530_API.py
Go to the documentation of this file.
1 import ctypes
2 from datetime import datetime
3 import os
4
5 BIN_TYPE = 2
6 SLOT_CH_NUM = 16
7
8
9 def check_c_api_version(device_c_api_version, support_c_api_version):
10 device_version_array = device_c_api_version.split(".")
11 support_version_array = support_c_api_version.split(".")
12 if len(support_version_array) != 3:
13 return "support_c_api_version error"
14 if len(device_version_array) != 3:
15 return "device_c_api_version error"
16
17 version_fail = device_c_api_version + ">" + support_c_api_version
18
19 if device_version_array == support_version_array:
20 return None
21
22 for i in range(3):
23 if device_version_array[i] < support_version_array[i]:
24 return None
25 else:
26 return version_fail
27
28
29 class ioThinxError(Exception):
30 def __init__(self, value):
31 self.value = value
32
33 def __str__(self):
34 error = ["ok",
35 "init fail",
36 "wrong slot settings",
37 "wrong argument",
38 "wrong config"
39 ]
40 return repr(error[self.value])
41
42
43 class ioThinx_4530_API(object):
44 def __init__(self):
45 super(ioThinx_4530_API, self).__init__()
46 self.c_api_version = "1.0.0"
47 self.shared_library_dir = "/usr/lib/iothinx/"
48 self.shared_library_filename = "libiothinxio.so"
49
50 error = check_c_api_version(
51 self.get_shared_library_version(),
52 self.c_api_version
53 )
54 if error is not None:
55 raise AssertionError(error)
56
57 shared_library = self.shared_library_dir + self.shared_library_filename
58 self.lib = ctypes.cdll.LoadLibrary(shared_library)
59 self.ioThinx_IO_Client_Init()
60
61 def get_shared_library_version(self):
62 for file in os.listdir(self.shared_library_dir):
63 if self.shared_library_filename in file and len(file.split(".")) == 5:
64 return(str(".".join(file.split(".")[2:5])))
65
66 def ioThinx_IO_Client_Init(self):
67 error = self.lib.ioThinx_IO_Client_Init(None)
68 if error is not 0:
69 raise ioThinxError(error)
70
71 def ioThinx_IO_GetBusStatus(self):
72 p_status = ctypes.c_uint8()
73 error = self.lib.ioThinx_IO_GetBusStatus(ctypes.byref(p_status))
74 if error is not 0:
75 raise ioThinxError(error)
76 return p_status.value
77
78 def ioThinx_IO_Config_Reload(self):
79 error = self.lib.ioThinx_IO_Config_Reload(None)
80 if error is not 0:
81 raise ioThinxError(error)
82
83 #
84 # DI
85 #
86
87 def ioThinx_DI_GetValues(self, slot):
88 p_values = ctypes.c_uint32()
89 error = self.lib.ioThinx_DI_GetValues(ctypes.c_uint32(slot),
90 ctypes.byref(p_values))
91 if error is not 0:
92 raise ioThinxError(error)
93 values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
94 return values
95
96 def ioThinx_DI_GetCntValues(self, slot, start, count):
97 buff = (ctypes.c_uint32 * count)()
98 error = self.lib.ioThinx_DI_GetCntValues(ctypes.c_uint32(slot),
99 ctypes.c_uint8(start),
100 ctypes.c_uint8(count),
101 ctypes.byref(buff))
102 if error is not 0:
103 raise ioThinxError(error)
104 buff_list = []
105 for value in buff:
106 buff_list.append(value)
107 return buff_list
108
109 def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list):
110 buff = (ctypes.c_uint32 * count)(*buff_list)
111 error = self.lib.ioThinx_DI_SetCntValues(ctypes.c_uint32(slot),
112 ctypes.c_uint8(start),
113 ctypes.c_uint8(count),
114 ctypes.byref(buff))
115 if error is not 0:
116 raise ioThinxError(error)
117
118 def ioThinx_DI_GetCntStarts(self, slot):
119 p_starts = ctypes.c_uint32()
120 error = self.lib.ioThinx_DI_GetCntStarts(ctypes.c_uint32(slot),
121 ctypes.byref(p_starts))
122 if error is not 0:
123 raise ioThinxError(error)
124 starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
125 return starts
126
127 def ioThinx_DI_SetCntStarts(self, slot, buff_list):
128 starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
129 error = self.lib.ioThinx_DI_SetCntStarts(ctypes.c_uint32(slot),
130 ctypes.c_uint32(starts))
131 if error is not 0:
132 raise ioThinxError(error)
133
134 def ioThinx_DI_SetCntStops(self, slot, buff_list):
135 starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
136 error = self.lib.ioThinx_DI_SetCntStops(ctypes.c_uint32(slot),
137 ctypes.c_uint32(starts))
138 if error is not 0:
139 raise ioThinxError(error)
140
141 def ioThinx_DI_GetCntOverflows(self, slot):
142 p_overflows = ctypes.c_uint32()
143 error = self.lib.ioThinx_DI_GetCntOverflows(ctypes.c_uint32(slot),
144 ctypes.byref(p_overflows))
145 if error is not 0:
146 raise ioThinxError(error)
147 overflows = [int(b) for b in bin(p_overflows.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
148 return overflows
149
150 def ioThinx_DI_SetCntOverflows(self, slot, buff_list):
151 overflows = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
152 error = self.lib.ioThinx_DI_SetCntOverflows(ctypes.c_uint32(slot),
153 ctypes.c_uint32(overflows))
154 if error is not 0:
155 raise ioThinxError(error)
156
157 def ioThinx_DI_Config_GetModes(self, slot, start, count):
158 buff = (ctypes.c_uint8 * count)()
159 error = self.lib.ioThinx_DI_Config_GetModes(ctypes.c_uint32(slot),
160 ctypes.c_uint8(start),
161 ctypes.c_uint8(count),
162 ctypes.byref(buff))
163 if error is not 0:
164 raise ioThinxError(error)
165 buff_list = []
166 for value in buff:
167 buff_list.append(value)
168 return buff_list
169
170 def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list):
171 buff = (ctypes.c_uint8 * count)(*buff_list)
172 error = self.lib.ioThinx_DI_Config_SetModes(ctypes.c_uint32(slot),
173 ctypes.c_uint8(start),
174 ctypes.c_uint8(count),
175 ctypes.byref(buff))
176 if error is not 0:
177 raise ioThinxError(error)
178
179 def ioThinx_DI_Config_GetFilters(self, slot, start, count):
180 buff = (ctypes.c_uint16 * count)()
181 error = self.lib.ioThinx_DI_Config_GetFilters(ctypes.c_uint32(slot),
182 ctypes.c_uint8(start),
183 ctypes.c_uint8(count),
184 ctypes.byref(buff))
185 if error is not 0:
186 raise ioThinxError(error)
187 buff_list = []
188 for value in buff:
189 buff_list.append(value)
190 return buff_list
191
192 def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list):
193 buff = (ctypes.c_uint16 * count)(*buff_list)
194 error = self.lib.ioThinx_DI_Config_SetFilters(ctypes.c_uint32(slot),
195 ctypes.c_uint8(start),
196 ctypes.c_uint8(count),
197 ctypes.byref(buff))
198 if error is not 0:
199 raise ioThinxError(error)
200
201 def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count):
202 buff = (ctypes.c_uint8 * count)()
203 error = self.lib.ioThinx_DI_Config_GetCntTriggers(ctypes.c_uint32(slot),
204 ctypes.c_uint8(start),
205 ctypes.c_uint8(count),
206 ctypes.byref(buff))
207 if error is not 0:
208 raise ioThinxError(error)
209 buff_list = []
210 for value in buff:
211 buff_list.append(value)
212 return buff_list
213
214 def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list):
215 buff = (ctypes.c_uint8 * count)(*buff_list)
216 error = self.lib.ioThinx_DI_Config_SetCntTriggers(ctypes.c_uint32(slot),
217 ctypes.c_uint8(start),
218 ctypes.c_uint8(count),
219 ctypes.byref(buff))
220 if error is not 0:
221 raise ioThinxError(error)
222
223 def ioThinx_DI_Config_GetCntValues(self, slot, start, count):
224 buff = (ctypes.c_uint32 * count)()
225 error = self.lib.ioThinx_DI_Config_GetCntValues(ctypes.c_uint32(slot),
226 ctypes.c_uint8(start),
227 ctypes.c_uint8(count),
228 ctypes.byref(buff))
229 if error is not 0:
230 raise ioThinxError(error)
231 buff_list = []
232 for value in buff:
233 buff_list.append(value)
234 return buff_list
235
236 def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list):
237 buff = (ctypes.c_uint32 * count)(*buff_list)
238 error = self.lib.ioThinx_DI_Config_SetCntValues(ctypes.c_uint32(slot),
239 ctypes.c_uint8(start),
240 ctypes.c_uint8(count),
241 ctypes.byref(buff))
242 if error is not 0:
243 raise ioThinxError(error)
244 #
245 # DO
246 #
247
248 def ioThinx_DO_GetValues(self, slot):
249 p_values = ctypes.c_uint32()
250 error = self.lib.ioThinx_DO_GetValues(ctypes.c_uint32(slot),
251 ctypes.byref(p_values))
252 if error is not 0:
253 raise ioThinxError(error)
254 values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
255 return values
256
257 def ioThinx_DO_SetValues(self, slot, buff_list):
258 values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
259 error = self.lib.ioThinx_DO_SetValues(ctypes.c_uint32(slot),
260 ctypes.c_uint32(values))
261 if error is not 0:
262 raise ioThinxError(error)
263
264 def ioThinx_DO_GetPwmCounts(self, slot, start, count):
265 buff = (ctypes.c_uint32 * count)()
266 error = self.lib.ioThinx_DO_GetPwmCounts(ctypes.c_uint32(slot),
267 ctypes.c_uint8(start),
268 ctypes.c_uint8(count),
269 ctypes.byref(buff))
270 if error is not 0:
271 raise ioThinxError(error)
272 buff_list = []
273 for value in buff:
274 buff_list.append(value)
275 return buff_list
276
277 def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list):
278 buff = (ctypes.c_uint32 * count)(*buff_list)
279 error = self.lib.ioThinx_DO_SetPwmCounts(ctypes.c_uint32(slot),
280 ctypes.c_uint8(start),
281 ctypes.c_uint8(count),
282 ctypes.byref(buff))
283 if error is not 0:
284 raise ioThinxError(error)
285
286 def ioThinx_DO_GetPwmStarts(self, slot):
287 p_starts = ctypes.c_uint32()
288 error = self.lib.ioThinx_DO_GetPwmStarts(ctypes.c_uint32(slot),
289 ctypes.byref(p_starts))
290 if error is not 0:
291 raise ioThinxError(error)
292 starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
293 return starts
294
295 def ioThinx_DO_SetPwmStarts(self, slot, buff_list):
296 starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
297 error = self.lib.ioThinx_DO_SetPwmStarts(ctypes.c_uint32(slot),
298 ctypes.c_uint32(starts))
299 if error is not 0:
300 raise ioThinxError(error)
301
302 def ioThinx_DO_SetPwmStops(self, slot, buff_list):
303 stops = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
304 error = self.lib.ioThinx_DO_SetPwmStops(ctypes.c_uint32(slot),
305 ctypes.c_uint32(stops))
306 if error is not 0:
307 raise ioThinxError(error)
308
309 def ioThinx_DO_GetPwmConfigures(self, slot, start, count):
310 frequencies_buff = (ctypes.c_uint16 * count)()
311 duty_cycles_buff = (ctypes.c_uint16 * count)()
312 error = self.lib.ioThinx_DO_GetPwmConfigures(ctypes.c_uint32(slot),
313 ctypes.c_uint8(start),
314 ctypes.c_uint8(count),
315 ctypes.byref(frequencies_buff),
316 ctypes.byref(duty_cycles_buff))
317 if error is not 0:
318 raise ioThinxError(error)
319
320 frequencies_buff_list = []
321 for value in frequencies_buff:
322 frequencies_buff_list.append(value)
323 duty_cycles_buff_list = []
324 for value in duty_cycles_buff:
325 duty_cycles_buff_list.append(value)
326 return frequencies_buff_list, duty_cycles_buff_list
327
328 def ioThinx_DO_SetPwmConfigures(self, slot, start, count,
329 frequencies_buff_list,
330 duty_cycles_buff_list):
331 frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
332 duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
333 error = self.lib.ioThinx_DO_SetPwmConfigures(ctypes.c_uint32(slot),
334 ctypes.c_uint8(start),
335 ctypes.c_uint8(count),
336 ctypes.byref(frequencies_buff),
337 ctypes.byref(duty_cycles_buff))
338 if error is not 0:
339 raise ioThinxError(error)
340
341 def ioThinx_DO_Config_GetModes(self, slot, start, count):
342 buff = (ctypes.c_uint8 * count)()
343 error = self.lib.ioThinx_DO_Config_GetModes(ctypes.c_uint32(slot),
344 ctypes.c_uint8(start),
345 ctypes.c_uint8(count),
346 ctypes.byref(buff))
347 if error is not 0:
348 raise ioThinxError(error)
349 buff_list = []
350 for value in buff:
351 buff_list.append(value)
352 return buff_list
353
354 def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list):
355 buff = (ctypes.c_uint8 * count)(*buff_list)
356 error = self.lib.ioThinx_DO_Config_SetModes(ctypes.c_uint32(slot),
357 ctypes.c_uint8(start),
358 ctypes.c_uint8(count),
359 ctypes.byref(buff))
360 if error is not 0:
361 raise ioThinxError(error)
362
363 def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count):
364 buff = (ctypes.c_uint32 * count)()
365 error = self.lib.ioThinx_DO_Config_GetPwmCounts(ctypes.c_uint32(slot),
366 ctypes.c_uint8(start),
367 ctypes.c_uint8(count),
368 ctypes.byref(buff))
369 if error is not 0:
370 raise ioThinxError(error)
371 buff_list = []
372 for value in buff:
373 buff_list.append(value)
374 return buff_list
375
376 def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list):
377 buff = (ctypes.c_uint32 * count)(*buff_list)
378 error = self.lib.ioThinx_DO_Config_SetPwmCounts(ctypes.c_uint32(slot),
379 ctypes.c_uint8(start),
380 ctypes.c_uint8(count),
381 ctypes.byref(buff))
382 if error is not 0:
383 raise ioThinxError(error)
384
385 def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count):
386 frequencies_buff = (ctypes.c_uint16 * count)()
387 duty_cycles_buff = (ctypes.c_uint16 * count)()
388 error = self.lib.ioThinx_DO_Config_GetPwmConfigures(ctypes.c_uint32(slot),
389 ctypes.c_uint8(start),
390 ctypes.c_uint8(count),
391 ctypes.byref(frequencies_buff),
392 ctypes.byref(duty_cycles_buff))
393 if error is not 0:
394 raise ioThinxError(error)
395
396 frequencies_buff_list = []
397 for value in frequencies_buff:
398 frequencies_buff_list.append(value)
399 duty_cycles_buff_list = []
400 for value in duty_cycles_buff:
401 duty_cycles_buff_list.append(value)
402
403 return frequencies_buff_list, duty_cycles_buff_list
404
405 def ioThinx_DO_Config_SetPwmConfigures(self, slot, start, count,
406 frequencies_buff_list,
407 duty_cycles_buff_list):
408 frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
409 duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
410 error = self.lib.ioThinx_DO_Config_SetPwmConfigures(ctypes.c_uint32(slot),
411 ctypes.c_uint8(start),
412 ctypes.c_uint8(count),
413 ctypes.byref(frequencies_buff),
414 ctypes.byref(duty_cycles_buff))
415 if error is not 0:
416 raise ioThinxError(error)
417
418 def ioThinx_Relay_GetValues(self, slot):
419 p_values = ctypes.c_uint32()
420 error = self.lib.ioThinx_Relay_GetValues(ctypes.c_uint32(slot),
421 ctypes.byref(p_values))
422 if error is not 0:
423 raise ioThinxError(error)
424 values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
425 return values
426
427 def ioThinx_Relay_SetValues(self, slot, buff_list):
428 values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
429 error = self.lib.ioThinx_Relay_SetValues(ctypes.c_uint32(slot),
430 ctypes.c_uint32(values))
431 if error is not 0:
432 raise ioThinxError(error)
433
434 def ioThinx_Relay_GetTotalCounts(self, slot, start, count):
435 buff = (ctypes.c_uint32 * count)()
436 error = self.lib.ioThinx_Relay_GetTotalCounts(ctypes.c_uint32(slot),
437 ctypes.c_uint8(start),
438 ctypes.c_uint8(count),
439 ctypes.byref(buff))
440 if error is not 0:
441 raise ioThinxError(error)
442 buff_list = []
443 for value in buff:
444 buff_list.append(value)
445 return buff_list
446
447 def ioThinx_Relay_GetCurrentCounts(self, slot, start, count):
448 buff = (ctypes.c_uint32 * count)()
449 error = self.lib.ioThinx_Relay_GetCurrentCounts(ctypes.c_uint32(slot),
450 ctypes.c_uint8(start),
451 ctypes.c_uint8(count),
452 ctypes.byref(buff))
453 if error is not 0:
454 raise ioThinxError(error)
455 buff_list = []
456 for value in buff:
457 buff_list.append(value)
458 return buff_list
459
460 def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list):
461 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
462 error = self.lib.ioThinx_Relay_ResetCurrentCounts(ctypes.c_uint32(slot),
463 ctypes.c_uint32(resets))
464 if error is not 0:
465 raise ioThinxError(error)
466
467 def ioThinx_AI_GetEngs(self, slot, start, count):
468 buff = (ctypes.c_float * count)()
469 error = self.lib.ioThinx_AI_GetEngs(ctypes.c_uint32(slot),
470 ctypes.c_uint8(start),
471 ctypes.c_uint8(count),
472 ctypes.byref(buff))
473 if error is not 0:
474 raise ioThinxError(error)
475 buff_list = []
476 for value in buff:
477 buff_list.append(value)
478 return buff_list
479
480 def ioThinx_AI_GetMinEngs(self, slot, start, count):
481 buff = (ctypes.c_float * count)()
482 error = self.lib.ioThinx_AI_GetMinEngs(ctypes.c_uint32(slot),
483 ctypes.c_uint8(start),
484 ctypes.c_uint8(count),
485 ctypes.byref(buff))
486 if error is not 0:
487 raise ioThinxError(error)
488 buff_list = []
489 for value in buff:
490 buff_list.append(value)
491 return buff_list
492
493 def ioThinx_AI_GetMaxEngs(self, slot, start, count):
494 buff = (ctypes.c_float * count)()
495 error = self.lib.ioThinx_AI_GetMaxEngs(ctypes.c_uint32(slot),
496 ctypes.c_uint8(start),
497 ctypes.c_uint8(count),
498 ctypes.byref(buff))
499 if error is not 0:
500 raise ioThinxError(error)
501 buff_list = []
502 for value in buff:
503 buff_list.append(value)
504 return buff_list
505
506 def ioThinx_AI_GetRaws(self, slot, start, count):
507 buff = (ctypes.c_uint32 * count)()
508 error = self.lib.ioThinx_AI_GetRaws(ctypes.c_uint32(slot),
509 ctypes.c_uint8(start),
510 ctypes.c_uint8(count),
511 ctypes.byref(buff))
512 if error is not 0:
513 raise ioThinxError(error)
514 buff_list = []
515 for value in buff:
516 buff_list.append(value)
517 return buff_list
518
519 def ioThinx_AI_GetMinRaws(self, slot, start, count):
520 buff = (ctypes.c_uint32 * count)()
521 error = self.lib.ioThinx_AI_GetMinRaws(ctypes.c_uint32(slot),
522 ctypes.c_uint8(start),
523 ctypes.c_uint8(count),
524 ctypes.byref(buff))
525 if error is not 0:
526 raise ioThinxError(error)
527 buff_list = []
528 for value in buff:
529 buff_list.append(value)
530 return buff_list
531
532 def ioThinx_AI_GetMaxRaws(self, slot, start, count):
533 buff = (ctypes.c_uint32 * count)()
534 error = self.lib.ioThinx_AI_GetMaxRaws(ctypes.c_uint32(slot),
535 ctypes.c_uint8(start),
536 ctypes.c_uint8(count),
537 ctypes.byref(buff))
538 if error is not 0:
539 raise ioThinxError(error)
540 buff_list = []
541 for value in buff:
542 buff_list.append(value)
543 return buff_list
544
545 def ioThinx_AI_ResetMins(self, slot, buff_list):
546 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
547 error = self.lib.ioThinx_AI_ResetMins(ctypes.c_uint32(slot),
548 ctypes.c_uint32(resets))
549 if error is not 0:
550 raise ioThinxError(error)
551
552 def ioThinx_AI_ResetMaxs(self, slot, buff_list):
553 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
554 error = self.lib.ioThinx_AI_ResetMaxs(ctypes.c_uint32(slot),
555 ctypes.c_uint32(resets))
556 if error is not 0:
557 raise ioThinxError(error)
558
559 def ioThinx_AI_GetStatuss(self, slot, start, count):
560 buff = (ctypes.c_uint8 * count)()
561 error = self.lib.ioThinx_AI_GetStatuss(ctypes.c_uint32(slot),
562 ctypes.c_uint8(start),
563 ctypes.c_uint8(count),
564 ctypes.byref(buff))
565 if error is not 0:
566 raise ioThinxError(error)
567 buff_list = []
568 for value in buff:
569 buff_list.append(value)
570 return buff_list
571
572 def ioThinx_AI_Config_GetRanges(self, slot, start, count):
573 buff = (ctypes.c_uint8 * count)()
574 error = self.lib.ioThinx_AI_Config_GetRanges(ctypes.c_uint32(slot),
575 ctypes.c_uint8(start),
576 ctypes.c_uint8(count),
577 ctypes.byref(buff))
578 if error is not 0:
579 raise ioThinxError(error)
580 buff_list = []
581 for value in buff:
582 buff_list.append(value)
583 return buff_list
584
585 def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list):
586 buff = (ctypes.c_uint8 * count)(*buff_list)
587 error = self.lib.ioThinx_AI_Config_SetRanges(ctypes.c_uint32(slot),
588 ctypes.c_uint8(start),
589 ctypes.c_uint8(count),
590 ctypes.byref(buff))
591 if error is not 0:
592 raise ioThinxError(error)
593
594 def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count):
595 buff = (ctypes.c_float * count)()
596 error = self.lib.ioThinx_AI_Config_GetBurnoutValues(ctypes.c_uint32(slot),
597 ctypes.c_uint8(start),
598 ctypes.c_uint8(count),
599 ctypes.byref(buff))
600 if error is not 0:
601 raise ioThinxError(error)
602 buff_list = []
603 for value in buff:
604 buff_list.append(value)
605 return buff_list
606
607 def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list):
608 buff = (ctypes.c_float * count)(*buff_list)
609 error = self.lib.ioThinx_AI_Config_SetBurnoutValues(ctypes.c_uint32(slot),
610 ctypes.c_uint8(start),
611 ctypes.c_uint8(count),
612 ctypes.byref(buff))
613 if error is not 0:
614 raise ioThinxError(error)
615
616 def ioThinx_TC_GetValues(self, slot, start, count):
617 buff = (ctypes.c_float * count)()
618 error = self.lib.ioThinx_TC_GetValues(ctypes.c_uint32(slot),
619 ctypes.c_uint8(start),
620 ctypes.c_uint8(count),
621 ctypes.byref(buff))
622 if error is not 0:
623 raise ioThinxError(error)
624 buff_list = []
625 for value in buff:
626 buff_list.append(value)
627 return buff_list
628
629 def ioThinx_TC_GetMinValues(self, slot, start, count):
630 buff = (ctypes.c_float * count)()
631 error = self.lib.ioThinx_TC_GetMinValues(ctypes.c_uint32(slot),
632 ctypes.c_uint8(start),
633 ctypes.c_uint8(count),
634 ctypes.byref(buff))
635 if error is not 0:
636 raise ioThinxError(error)
637 buff_list = []
638 for value in buff:
639 buff_list.append(value)
640 return buff_list
641
642 def ioThinx_TC_GetMaxValues(self, slot, start, count):
643 buff = (ctypes.c_float * count)()
644 error = self.lib.ioThinx_TC_GetMaxValues(ctypes.c_uint32(slot),
645 ctypes.c_uint8(start),
646 ctypes.c_uint8(count),
647 ctypes.byref(buff))
648 if error is not 0:
649 raise ioThinxError(error)
650 buff_list = []
651 for value in buff:
652 buff_list.append(value)
653 return buff_list
654
655 def ioThinx_TC_ResetMins(self, slot, buff_list):
656 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
657 error = self.lib.ioThinx_TC_ResetMins(ctypes.c_uint32(slot),
658 ctypes.c_uint32(resets))
659 if error is not 0:
660 raise ioThinxError(error)
661
662 def ioThinx_TC_ResetMaxs(self, slot, buff_list):
663 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
664 error = self.lib.ioThinx_TC_ResetMaxs(ctypes.c_uint32(slot),
665 ctypes.c_uint32(resets))
666 if error is not 0:
667 raise ioThinxError(error)
668
669 def ioThinx_TC_GetStatuss(self, slot, start, count):
670 buff = (ctypes.c_uint8 * count)()
671 error = self.lib.ioThinx_TC_GetStatuss(ctypes.c_uint32(slot),
672 ctypes.c_uint8(start),
673 ctypes.c_uint8(count),
674 ctypes.byref(buff))
675 if error is not 0:
676 raise ioThinxError(error)
677 buff_list = []
678 for value in buff:
679 buff_list.append(value)
680 return buff_list
681
682 def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list):
683 buff = (ctypes.c_float * count)(*buff_list)
684 error = self.lib.ioThinx_TC_SetCalibrations(ctypes.c_uint32(slot),
685 ctypes.c_uint8(start),
686 ctypes.c_uint8(count),
687 ctypes.byref(buff))
688 if error is not 0:
689 raise ioThinxError(error)
690
691 def ioThinx_TC_ResetCalibrations(self, slot, start, count):
692 error = self.lib.ioThinx_TC_ResetCalibrations(ctypes.c_uint32(slot),
693 ctypes.c_uint8(start),
694 ctypes.c_uint8(count))
695 if error is not 0:
696 raise ioThinxError(error)
697
698 def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count):
699 buff = (ctypes.c_uint8 * count)()
700 error = self.lib.ioThinx_TC_Config_GetSensorTypes(ctypes.c_uint32(slot),
701 ctypes.c_uint8(start),
702 ctypes.c_uint8(count),
703 ctypes.byref(buff))
704 if error is not 0:
705 raise ioThinxError(error)
706 buff_list = []
707 for value in buff:
708 buff_list.append(value)
709 return buff_list
710
711 def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list):
712 buff = (ctypes.c_uint8 * count)(*buff_list)
713 error = self.lib.ioThinx_TC_Config_SetSensorTypes(ctypes.c_uint32(slot),
714 ctypes.c_uint8(start),
715 ctypes.c_uint8(count),
716 ctypes.byref(buff))
717 if error is not 0:
718 raise ioThinxError(error)
719
720 def ioThinx_RTD_GetValues(self, slot, start, count):
721 buff = (ctypes.c_float * count)()
722 error = self.lib.ioThinx_RTD_GetValues(ctypes.c_uint32(slot),
723 ctypes.c_uint8(start),
724 ctypes.c_uint8(count),
725 ctypes.byref(buff))
726 if error is not 0:
727 raise ioThinxError(error)
728 buff_list = []
729 for value in buff:
730 buff_list.append(value)
731 return buff_list
732
733 def ioThinx_RTD_GetMinValues(self, slot, start, count):
734 buff = (ctypes.c_float * count)()
735 error = self.lib.ioThinx_RTD_GetMinValues(ctypes.c_uint32(slot),
736 ctypes.c_uint8(start),
737 ctypes.c_uint8(count),
738 ctypes.byref(buff))
739 if error is not 0:
740 raise ioThinxError(error)
741 buff_list = []
742 for value in buff:
743 buff_list.append(value)
744 return buff_list
745
746 def ioThinx_RTD_GetMaxValues(self, slot, start, count):
747 buff = (ctypes.c_float * count)()
748 error = self.lib.ioThinx_RTD_GetMaxValues(ctypes.c_uint32(slot),
749 ctypes.c_uint8(start),
750 ctypes.c_uint8(count),
751 ctypes.byref(buff))
752 if error is not 0:
753 raise ioThinxError(error)
754 buff_list = []
755 for value in buff:
756 buff_list.append(value)
757 return buff_list
758
759 def ioThinx_RTD_ResetMins(self, slot, buff_list):
760 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
761 error = self.lib.ioThinx_RTD_ResetMins(ctypes.c_uint32(slot),
762 ctypes.c_uint32(resets))
763 if error is not 0:
764 raise ioThinxError(error)
765
766 def ioThinx_RTD_ResetMaxs(self, slot, buff_list):
767 resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
768 error = self.lib.ioThinx_RTD_ResetMaxs(ctypes.c_uint32(slot),
769 ctypes.c_uint32(resets))
770 if error is not 0:
771 raise ioThinxError(error)
772
773 def ioThinx_RTD_GetStatuss(self, slot, start, count):
774 buff = (ctypes.c_uint8 * count)()
775 error = self.lib.ioThinx_RTD_GetStatuss(ctypes.c_uint32(slot),
776 ctypes.c_uint8(start),
777 ctypes.c_uint8(count),
778 ctypes.byref(buff))
779 if error is not 0:
780 raise ioThinxError(error)
781 buff_list = []
782 for value in buff:
783 buff_list.append(value)
784 return buff_list
785
786 def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list):
787 buff = (ctypes.c_float * count)(*buff_list)
788 error = self.lib.ioThinx_RTD_SetCalibrations(ctypes.c_uint32(slot),
789 ctypes.c_uint8(start),
790 ctypes.c_uint8(count),
791 ctypes.byref(buff))
792 if error is not 0:
793 raise ioThinxError(error)
794
795 def ioThinx_RTD_ResetCalibrations(self, slot, start, count):
796 error = self.lib.ioThinx_RTD_ResetCalibrations(ctypes.c_uint32(slot),
797 ctypes.c_uint8(start),
798 ctypes.c_uint8(count))
799 if error is not 0:
800 raise ioThinxError(error)
801
802 def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count):
803 buff = (ctypes.c_uint8 * count)()
804 error = self.lib.ioThinx_RTD_Config_GetSensorTypes(ctypes.c_uint32(slot),
805 ctypes.c_uint8(start),
806 ctypes.c_uint8(count),
807 ctypes.byref(buff))
808 if error is not 0:
809 raise ioThinxError(error)
810 buff_list = []
811 for value in buff:
812 buff_list.append(value)
813 return buff_list
814
815 def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list):
816 buff = (ctypes.c_uint8 * count)(*buff_list)
817 error = self.lib.ioThinx_RTD_Config_SetSensorTypes(ctypes.c_uint32(slot),
818 ctypes.c_uint8(start),
819 ctypes.c_uint8(count),
820 ctypes.byref(buff))
821 if error is not 0:
822 raise ioThinxError(error)
823
824 #
825 # PWR
826 #
827
828 def ioThinx_PWR_GetSysStatus(self, slot, start, count):
829 buff = (ctypes.c_uint8 * count)()
830 error = self.lib.ioThinx_PWR_GetSysStatus(ctypes.c_uint32(slot),
831 ctypes.c_uint8(start),
832 ctypes.c_uint8(count),
833 ctypes.byref(buff))
834 if error is not 0:
835 raise ioThinxError(error)
836 buff_list = []
837 for value in buff:
838 buff_list.append(value)
839 return buff_list
840
841 def ioThinx_PWR_GetFieldStatus(self, slot, start, count):
842 buff = (ctypes.c_uint8 * count)()
843 error = self.lib.ioThinx_PWR_GetFieldStatus(ctypes.c_uint32(slot),
844 ctypes.c_uint8(start),
845 ctypes.c_uint8(count),
846 ctypes.byref(buff))
847 if error is not 0:
848 raise ioThinxError(error)
849 buff_list = []
850 for value in buff:
851 buff_list.append(value)
852 return buff_list
853
854 def ioThinx_PWR_Config_GetAlarms(self, slot, start, count):
855 buff = (ctypes.c_float * count)()
856 error = self.lib.ioThinx_PWR_Config_GetAlarms(ctypes.c_uint32(slot),
857 ctypes.c_uint8(start),
858 ctypes.c_uint8(count),
859 ctypes.byref(buff))
860 if error is not 0:
861 raise ioThinxError(error)
862 buff_list = []
863 for value in buff:
864 buff_list.append(value)
865 return buff_list
866
867 def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list):
868 buff = (ctypes.c_float * count)(*buff_list)
869 error = self.lib.ioThinx_PWR_Config_SetAlarms(ctypes.c_uint32(slot),
870 ctypes.c_uint8(start),
871 ctypes.c_uint8(count),
872 ctypes.byref(buff))
873 if error is not 0:
874 raise ioThinxError(error)
875
876 #
877 # Misc
878 #
879
880 def ioThinx_Misc_GetModuleInfo(self, slot):
881 class MODULE_INFO(ctypes.Structure):
882 _fields_ = [('model_name', (ctypes.c_uint8 * 20)),
883 ('product_id', ctypes.c_uint32),
884 ('fwr_version', ctypes.c_uint16),
885 ('fwr_build_date', ctypes.c_uint32),
886 ('serial_number', (ctypes.c_uint8 * 13))]
887
888 p_module_info = MODULE_INFO()
889 error = self.lib.ioThinx_Misc_GetModuleInfo(ctypes.c_uint8(slot),
890 ctypes.byref(p_module_info))
891 if error is not 0:
892 raise ioThinxError(error)
893
894 def convert_build_date_from_hex_to_datetime():
895 build_date = hex(p_module_info.fwr_build_date).strip('0x').strip('L')
896 build_date = [str(int(build_date[i:i + 2], 16)) for i in range(0, len(build_date), BIN_TYPE)]
897 build_date = datetime.strptime("".join(build_date), '%y%m%d%H')
898 return build_date
899 fwr_build_date = convert_build_date_from_hex_to_datetime()
900
901 module_info = {
902 'model_name': str(bytearray(p_module_info.model_name).decode().rstrip('\x00')),
903 'product_id': hex(p_module_info.product_id).rstrip("L"),
904 'fwr_version': hex(p_module_info.fwr_version),
905 'fwr_build_date': fwr_build_date,
906 'serial_number': str(bytearray(p_module_info.serial_number).decode().rstrip('\x00')),
907 }
908 return module_info
909
910 def ioThinx_Misc_GetModuleCount(self):
911 pmodule_count = ctypes.c_uint32()
912 error = self.lib.ioThinx_Misc_GetModuleCount(ctypes.byref(pmodule_count))
913 if error is not 0:
914 raise ioThinxError(error)
915 return pmodule_count.value
916
917 def ioThinx_Misc_GetRotarySwitchState(self, slot):
918 p_state = ctypes.c_uint8()
919 error = self.lib.ioThinx_Misc_GetRotarySwitchState(ctypes.c_uint32(slot),
920 ctypes.byref(p_state))
921 if error is not 0:
922 raise ioThinxError(error)
923 return p_state.value
924
925 def ioThinx_Misc_SetUserLedState(self, slot, channel, state):
926 error = self.lib.ioThinx_Misc_SetUserLedState(ctypes.c_uint32(slot),
927 ctypes.c_uint8(channel),
928 ctypes.c_uint8(state))
929 if error is not 0:
930 raise ioThinxError(error)
931
932 def ioThinx_Misc_GetPushButtonState(self, slot):
933 p_state = ctypes.c_uint8()
934 error = self.lib.ioThinx_Misc_GetPushButtonState(ctypes.c_uint32(slot),
935 ctypes.byref(p_state))
936 if error is not 0:
937 raise ioThinxError(error)
938 return p_state.value
939
940 def ioThinx_Misc_GetLocateState(self, slot):
941 p_state = ctypes.c_uint8()
942 error = self.lib.ioThinx_Misc_GetLocateState(ctypes.c_uint32(slot),
943 ctypes.byref(p_state))
944 if error is not 0:
945 raise ioThinxError(error)
946 return p_state.value
947
948 def ioThinx_Misc_SetLocateState(self, slot, state):
949 error = self.lib.ioThinx_Misc_SetLocateState(ctypes.c_uint32(slot),
950 ctypes.c_uint8(state))
951 if error is not 0:
952 raise ioThinxError(error)
953
954 #
955 # Communication
956 #
957 def ioThinx_Uart_Open(self, slot, port, mode, baudrate):
958 fd = ctypes.c_int()
959 error = self.lib.ioThinx_Uart_Open(
960 ctypes.c_uint32(slot),
961 ctypes.c_uint32(port),
962 ctypes.c_uint32(mode),
963 ctypes.c_uint32(baudrate),
964 ctypes.byref(fd)
965 )
966 if error is not 0:
967 raise ioThinxError(error)
968
969 return fd.value
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API
Definition: ioThinx_4530_API.py:43
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_SetPwmCounts
def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:277
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_SetValues
def ioThinx_DO_SetValues(self, slot, buff_list)
Definition: ioThinx_4530_API.py:257
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_GetCntStarts
def ioThinx_DI_GetCntStarts(self, slot)
Definition: ioThinx_4530_API.py:118
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_GetCntValues
def ioThinx_DI_Config_GetCntValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:223
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetMaxRaws
def ioThinx_AI_GetMaxRaws(self, slot, start, count)
Definition: ioThinx_4530_API.py:532
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_SetUserLedState
def ioThinx_Misc_SetUserLedState(self, slot, channel, state)
Definition: ioThinx_4530_API.py:925
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_PWR_Config_GetAlarms
def ioThinx_PWR_Config_GetAlarms(self, slot, start, count)
Definition: ioThinx_4530_API.py:854
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_ResetMaxs
def ioThinx_RTD_ResetMaxs(self, slot, buff_list)
Definition: ioThinx_4530_API.py:766
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_GetModuleInfo
def ioThinx_Misc_GetModuleInfo(self, slot)
Definition: ioThinx_4530_API.py:880
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_SetFilters
def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:192
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_GetMinValues
def ioThinx_RTD_GetMinValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:733
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Relay_ResetCurrentCounts
def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list)
Definition: ioThinx_4530_API.py:460
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_SetModes
def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:354
ioThinx_4530.ioThinx_4530_API.ioThinxError.__init__
def __init__(self, value)
Definition: ioThinx_4530_API.py:30
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_GetStatuss
def ioThinx_TC_GetStatuss(self, slot, start, count)
Definition: ioThinx_4530_API.py:669
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_GetPwmConfigures
def ioThinx_DO_GetPwmConfigures(self, slot, start, count)
Definition: ioThinx_4530_API.py:309
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_ResetMins
def ioThinx_RTD_ResetMins(self, slot, buff_list)
Definition: ioThinx_4530_API.py:759
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_GetPwmCounts
def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count)
Definition: ioThinx_4530_API.py:363
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_GetPwmCounts
def ioThinx_DO_GetPwmCounts(self, slot, start, count)
Definition: ioThinx_4530_API.py:264
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Uart_Open
def ioThinx_Uart_Open(self, slot, port, mode, baudrate)
Definition: ioThinx_4530_API.py:957
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_Config_GetSensorTypes
def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count)
Definition: ioThinx_4530_API.py:802
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.__init__
def __init__(self)
Definition: ioThinx_4530_API.py:44
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_SetLocateState
def ioThinx_Misc_SetLocateState(self, slot, state)
Definition: ioThinx_4530_API.py:948
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_SetCntStarts
def ioThinx_DI_SetCntStarts(self, slot, buff_list)
Definition: ioThinx_4530_API.py:127
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_SetPwmConfigures
def ioThinx_DO_SetPwmConfigures(self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)
Definition: ioThinx_4530_API.py:330
ioThinx_4530.ioThinx_4530_API.ioThinxError.__str__
def __str__(self)
Definition: ioThinx_4530_API.py:33
ioThinx_4530.ioThinx_4530_API.check_c_api_version
def check_c_api_version(device_c_api_version, support_c_api_version)
Definition: ioThinx_4530_API.py:9
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetStatuss
def ioThinx_AI_GetStatuss(self, slot, start, count)
Definition: ioThinx_4530_API.py:559
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_ResetMaxs
def ioThinx_AI_ResetMaxs(self, slot, buff_list)
Definition: ioThinx_4530_API.py:552
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_SetCntStops
def ioThinx_DI_SetCntStops(self, slot, buff_list)
Definition: ioThinx_4530_API.py:134
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_GetValues
def ioThinx_RTD_GetValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:720
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_GetPwmConfigures
def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count)
Definition: ioThinx_4530_API.py:385
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.c_api_version
c_api_version
Definition: ioThinx_4530_API.py:46
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetRaws
def ioThinx_AI_GetRaws(self, slot, start, count)
Definition: ioThinx_4530_API.py:506
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_Config_SetSensorTypes
def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:711
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.get_shared_library_version
def get_shared_library_version(self)
Definition: ioThinx_4530_API.py:61
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Relay_GetCurrentCounts
def ioThinx_Relay_GetCurrentCounts(self, slot, start, count)
Definition: ioThinx_4530_API.py:447
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_GetCntValues
def ioThinx_DI_GetCntValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:96
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_GetPwmStarts
def ioThinx_DO_GetPwmStarts(self, slot)
Definition: ioThinx_4530_API.py:286
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_SetCntOverflows
def ioThinx_DI_SetCntOverflows(self, slot, buff_list)
Definition: ioThinx_4530_API.py:150
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_SetCalibrations
def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:682
ioThinx_4530.ioThinx_4530_API.ioThinxError.value
value
Definition: ioThinx_4530_API.py:31
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Relay_GetTotalCounts
def ioThinx_Relay_GetTotalCounts(self, slot, start, count)
Definition: ioThinx_4530_API.py:434
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_PWR_Config_SetAlarms
def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:867
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_GetMaxValues
def ioThinx_RTD_GetMaxValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:746
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.lib
lib
Definition: ioThinx_4530_API.py:58
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_SetCalibrations
def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:786
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_GetMinValues
def ioThinx_TC_GetMinValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:629
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_ResetCalibrations
def ioThinx_TC_ResetCalibrations(self, slot, start, count)
Definition: ioThinx_4530_API.py:691
ioThinx_4530.ioThinx_4530_API.ioThinxError
Definition: ioThinx_4530_API.py:29
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_Config_GetBurnoutValues
def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:594
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_SetPwmStarts
def ioThinx_DO_SetPwmStarts(self, slot, buff_list)
Definition: ioThinx_4530_API.py:295
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_GetCntOverflows
def ioThinx_DI_GetCntOverflows(self, slot)
Definition: ioThinx_4530_API.py:141
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_GetMaxValues
def ioThinx_TC_GetMaxValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:642
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_PWR_GetFieldStatus
def ioThinx_PWR_GetFieldStatus(self, slot, start, count)
Definition: ioThinx_4530_API.py:841
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_IO_GetBusStatus
def ioThinx_IO_GetBusStatus(self)
Definition: ioThinx_4530_API.py:71
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_SetModes
def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:170
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_GetValues
def ioThinx_TC_GetValues(self, slot, start, count)
Definition: ioThinx_4530_API.py:616
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_Config_SetRanges
def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:585
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_GetValues
def ioThinx_DI_GetValues(self, slot)
Definition: ioThinx_4530_API.py:87
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetMaxEngs
def ioThinx_AI_GetMaxEngs(self, slot, start, count)
Definition: ioThinx_4530_API.py:493
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_SetCntValues
def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:109
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_ResetMins
def ioThinx_AI_ResetMins(self, slot, buff_list)
Definition: ioThinx_4530_API.py:545
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_GetValues
def ioThinx_DO_GetValues(self, slot)
Definition: ioThinx_4530_API.py:248
MODULE_INFO
Definition: iothinxio.h:1052
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_GetStatuss
def ioThinx_RTD_GetStatuss(self, slot, start, count)
Definition: ioThinx_4530_API.py:773
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_IO_Config_Reload
def ioThinx_IO_Config_Reload(self)
Definition: ioThinx_4530_API.py:78
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_Config_SetSensorTypes
def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:815
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetMinRaws
def ioThinx_AI_GetMinRaws(self, slot, start, count)
Definition: ioThinx_4530_API.py:519
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_SetCntTriggers
def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:214
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_RTD_ResetCalibrations
def ioThinx_RTD_ResetCalibrations(self, slot, start, count)
Definition: ioThinx_4530_API.py:795
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_SetPwmStops
def ioThinx_DO_SetPwmStops(self, slot, buff_list)
Definition: ioThinx_4530_API.py:302
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_GetRotarySwitchState
def ioThinx_Misc_GetRotarySwitchState(self, slot)
Definition: ioThinx_4530_API.py:917
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Relay_GetValues
def ioThinx_Relay_GetValues(self, slot)
Definition: ioThinx_4530_API.py:418
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.shared_library_filename
shared_library_filename
Definition: ioThinx_4530_API.py:48
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_GetModes
def ioThinx_DO_Config_GetModes(self, slot, start, count)
Definition: ioThinx_4530_API.py:341
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetEngs
def ioThinx_AI_GetEngs(self, slot, start, count)
Definition: ioThinx_4530_API.py:467
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_GetMinEngs
def ioThinx_AI_GetMinEngs(self, slot, start, count)
Definition: ioThinx_4530_API.py:480
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_Config_SetBurnoutValues
def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:607
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.shared_library_dir
shared_library_dir
Definition: ioThinx_4530_API.py:47
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_Config_GetSensorTypes
def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count)
Definition: ioThinx_4530_API.py:698
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_GetCntTriggers
def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count)
Definition: ioThinx_4530_API.py:201
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_GetPushButtonState
def ioThinx_Misc_GetPushButtonState(self, slot)
Definition: ioThinx_4530_API.py:932
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_ResetMins
def ioThinx_TC_ResetMins(self, slot, buff_list)
Definition: ioThinx_4530_API.py:655
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_SetCntValues
def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:236
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_GetFilters
def ioThinx_DI_Config_GetFilters(self, slot, start, count)
Definition: ioThinx_4530_API.py:179
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DI_Config_GetModes
def ioThinx_DI_Config_GetModes(self, slot, start, count)
Definition: ioThinx_4530_API.py:157
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_IO_Client_Init
def ioThinx_IO_Client_Init(self)
Definition: ioThinx_4530_API.py:66
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_PWR_GetSysStatus
def ioThinx_PWR_GetSysStatus(self, slot, start, count)
Definition: ioThinx_4530_API.py:828
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_GetLocateState
def ioThinx_Misc_GetLocateState(self, slot)
Definition: ioThinx_4530_API.py:940
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_SetPwmCounts
def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list)
Definition: ioThinx_4530_API.py:376
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_TC_ResetMaxs
def ioThinx_TC_ResetMaxs(self, slot, buff_list)
Definition: ioThinx_4530_API.py:662
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_AI_Config_GetRanges
def ioThinx_AI_Config_GetRanges(self, slot, start, count)
Definition: ioThinx_4530_API.py:572
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Misc_GetModuleCount
def ioThinx_Misc_GetModuleCount(self)
Definition: ioThinx_4530_API.py:910
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_Relay_SetValues
def ioThinx_Relay_SetValues(self, slot, buff_list)
Definition: ioThinx_4530_API.py:427
ioThinx_4530.ioThinx_4530_API.ioThinx_4530_API.ioThinx_DO_Config_SetPwmConfigures
def ioThinx_DO_Config_SetPwmConfigures(self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)
Definition: ioThinx_4530_API.py:407