User Tools

Site Tools


julia

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
julia [2022/08/19 19:42] – add expandable tab brandonjulia [2023/08/15 15:44] (current) – remove html comment, use ruby since it's close to Julia syntax, make file downloadable brandon
Line 4: Line 4:
  
 --> Here is an example script for the MS2000 and XY stage:# --> Here is an example script for the MS2000 and XY stage:#
- 
-<html><!-- Ruby also uses if/end syntax, so it's the closest thing to Julia supported by Dokuwiki. --></html> 
  
 **Last tested on Windows 10 64-Bit and Julia 1.8.0** **Last tested on Windows 10 64-Bit and Julia 1.8.0**
  
-<code Ruby>+<code Ruby ms2k.jl>
 using LibSerialPort using LibSerialPort
  
Line 62: Line 60:
         print("Waiting for axis $(axis)...")         print("Waiting for axis $(axis)...")
     end     end
-    while is_axis_busy(serial_port)+    while is_axis_busy(serial_port, axis)
         sleep(wait_time_sec) # 1 ms default         sleep(wait_time_sec) # 1 ms default
     end     end
Line 78: Line 76:
 end end
  
-function is_axis_busy(seial_port::SerialPort, axis::String)::Bool+function is_axis_busy(serial_port::SerialPort, axis::String)::Bool
     if serial_send_recv(serial_port, "RS $(axis)") == "B"     if serial_send_recv(serial_port, "RS $(axis)") == "B"
         true         true
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
julia.1660952548.txt.gz · Last modified: by brandon