Home > Vidicode > Communications System > Vidicode Argus Basic Programmers Reference Manual

Vidicode Argus Basic Programmers Reference Manual

    Download as PDF Print this page Share this page

    Have a look at the manual Vidicode Argus Basic Programmers Reference Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 9 Vidicode manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    128
      
    MONTH    set/read month of year 
    MONTH is used to read or set the month value for the internal clock/calendar. 
     
    When reading it returns an integer from 1 to 12, month 1 being January.  Similarly, when setting, the specified value must be 
    between 1 and 12.  An incorrect value will leave the current setting unchanged. 
    Examples: 
    MONTH=9
    Quarter=MONTH/4
    Syntax: 
    MONTH = [integer 1..12]
    [num-var] = MONTH
    See also: 
    DATE$, DAY, DDAY, YEAR 
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    129
      
    NETWORK network commands 
    The Argus LAN (Local Area Network) is only available for the Argus Programmable Modem, not for the T.C.Lite.  A network 
    modem must have a special operating system in ROM with the network filing system build in.  A network is made with (at 
    least) 1 network server and 1 or more network stations.  They are all connected to one another with RJ45 plugs.  The 
    network operates at a clock speed of  921.6 kbits per second (115.2 kbytes per second).  This clock is generated by the 
    network server. 
    A network server is an Argus with Hard-disk and network interface and no modem-chip and telephone interface.  More than 1 
    server can be connected to the network, but a more complex application is neaded to get things right.  Optional, a backup 
    server can be connected to the network that monitors the network and stores all data (mirror function). 
    A network station can be an Argus with network interface and modem-chip or an Argus with only a network interface.  The 
    last is used as an serial interface between the network and a computer.  Depending on the application,  there may be 10 till 
    20 stations connected to a network. 
     
    In the case that 1 server is used, it always has the network address 255.  This address is also used by the stations to access 
    the server.  A backup server has the network address 244.  The server has not much intelligents and only serves incoming 
    commands from the stations.  It can deal with only 1 command at the time.  A following command is only handled if the 
    previous one completely has finished.  A serial connection between the server and a computer is not recommended, because 
    a server is not a multi-tasking device; it can not handle the serial port and the network at the same time. 
    Each station in the network must have a unique network address from 1 till 127.  Each station is a complete Argus 
    Programmable Modem with no restrictions compared to a stand alone modem.  All BASIC filing system commands are 
    available.  The network operating system deals with the data flow over the network (commands to the server, collision 
    detection, etc.). 
    After a power-up, the first thing the stations will do is loading the BOOT program file from the server and then run it in system 
    memory. 
     
    There are 2 BASIC system errors related to the network: 
     
    ERN = 101 (“No server”) is generated after a timeout of 2 minutes if the network was free but the server couldn’t be 
    acccesed. It is also generated if a station executes a NETWORK command that is only ment to be used on a server. 
     
    ERN = 102 (“No clock”) is generated if a station doesn’t see a network clock.  This can mean that the network cables are not 
    correct or that the server is not connected. 
     
    The only network related command is the NETWORK command.  There are various forms: 
    NETWORK 
    The command NETWORK on its own will load the system variable MATCH with the network address.  This is used by a 
    program if it wants to know on which station it is running. Example: 
    30 NETWORK
    40 Address=MATCH
    NETWORK= 
    This command is used to set the server network address in a station.  After a reset, the server address is always set to 255.  
    So, the BOOT program file is always loaded by the stations from server 255.  The command is only used if more than 1 
    server is connected to the network. Example: (copy a file from server 254 to server 255, using the buffer) 
    120 NETWORK=254
    130 SEND#8,F$,F
    140 NETWORK=255 
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    130
      
    150 RECEIVE#8,F$,F
    NETWORK ON/OFF 
    This is an important command.  The NETWORK ON command claimes the network for own use by a station.  This means 
    that no other stations can reach the server until the network is freed with the NETWORK OFF command.  Other stations, 
    accessing the network at the same time, will wait forever until the network becomes free again.  So, care must be taken that 
    NETWORK OFF always follows NETWORK ON after a short period.   This feature must be used to update files on the 
    server which can be accessed by more than 1 station at the time. Example: 
    100 NETWORK ON
    110 CLEAR BUFFER
    120 PRINT#8,Update$
    130 RECEIVE#8,Dfile$,F,A
    140 NETWORK OFF
    NETWORK CLEAR 
    This command will initialise the network chip again, the same as it is done after a reset. The command is not intended to be 
    used in a program. 
    NETWORK HANDSHAKE ON/OFF 
    This command can be important if a serial connection to a computer exists on a station.  Because the speed of the network, 
    the serial ports and the network can not be handled at the same time.  This means that data coming from a serial port is 
    missed by a station if that station is accessing the network at the same time.  In those cases where it is needed, the 
    handshake between station and computer must be defined well (see HANDSHAKE command).  Each time a station 
    accesses the network it sets and clears the handshake to the serial ports automatically after NETWORK HANDSHAKE
    ON (default). 
    NETWORK HANDSHAKE OFF is only needed if the application requires it. 
    NETWORK LOAD/SAVE CLOCK$ 
    Each station has its own real time clock on board, but does not have a battery backup.  Only the server has a real time clock 
    with battery backup.  NETWORK LOAD CLOCK$ is therefor used to synchronize the real time clock on a station with the 
    one from the server.  This is necessary after each reset and must be included in the BOOT program file. 
    NETWORK SAVE CLOCK$ is used to set the real time clock on the server the same as the one in the station executing this 
    command. 
    NETWORK SCAN 
    This command is executed on a station to monitor the network activity and is used for test purposes.  It will show all the 
    network addresses from the stations and server that are sending commands over the network at the time.  
    NETWORK RESET 
    Executing this command from a station will hard reset the network server (power LED off>on). 
    NETWORK OUTPUT  
    This command will send a string from a station to the server.  The server outputs this string to one of the serial ports 
    (depending on OPORT of the sending station).  
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    131
      
    NETWORK AT  
    This command will send a string from a station to the server.  The server will pass this string to its AT-commands interpreter. 
    NETWORK RUN/ACTIVE 
    NETWORK RUN can only be used on a server and puts it into serve-mode.  The BOOT program file for the server must 
    therefor always contain this command.  The server will stay in this command until a hard reset.  Some ON-event handlers 
    can also take it out of serve-mode. 
    NETWORK ACTIVE has the same effect, but will exit after 1 command from a station has been executed. 
    REPEAT NETWORK ACTIVE : UNTIL FALSE is the same as NETWORK RUN. 
    NETWORK TRACE ON/OFF 
    This command can only be used on a server and will set network trace-mode on or off.  If trace-mode is on, the server will 
    output a line of information after each received network command.  The ouput is done to the ports defined by te system 
    variable OPORT.  It can be handy during development phase where a serial connection between server and computer 
    monitors all the network activity. 
     Examples: 
    NETWORK : Addr=MATCH
    NETWORK=255
    NETWORK ON
    NETWORK LOAD CLOCK$
    NETWORK SCAN
    NETWORK RUN
    Syntax: 
    NETWORK (ON|OFF) (HANDSHAKE ON|OFF) (LOAD|SAVE CLOCK$) (SCAN)
    NETWORK (RUN) (ACTIVE) (TRACE ON|OFF)
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    132
      
    NEW    new program 
    NEW prepares the modem BASIC interpreter to accept a new program.  All variables are cleared, and the program start and 
    end are set to the value of the system variable PBOT.  Any program already stored at the value of PBOT will be lost (but 
    may be recovered using OLD up to the point at which new program lines are entered). 
    Syntax: 
    NEW
    See also: 
    CLEAR, OLD, PBOT
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    133
      
    OLD    restore program 
    OLD is used to restore a program in system memory that has been lost following use of the NEW command.  OLD will only 
    work if no new program lines have been entered. 
    Syntax: 
    OLD
    See also: 
    NEW, PBOT
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    134
      
    OLINE    set/read digital output line 
    OLINE is used to set or read the status of the specified User I/O line. 
     
    The modem has eight programmable output lines numbered 1 to 8, which are normally configured for use as a parallel printer 
    port.  To configure one of these lines as a digital output, OLINE is followed by the number of the line to be configured, an 
    equal sign, and 0 for low or 1 for high; e.g. to switch line 5 high use: 
    OLINE5=1 or OLINE5 ON
    Similarly, to toggle the same line low again, you would use: 
    OLINE5=0 or OLINE5 OFF
    OLINE can also be used to read the status of a line, even if the line in question has previously been defined as an input; i.e. 
    the current status of an input line can be read using either ILINE or OLINE. 
     
    The status of the I/O lines is not affected by a reset. 
     
    Lines 1 to 8 are automatically configured as outputs as soon as the printer is addressed. 
     
    OLINE0 is the on-line relay of the modem and can thus be used to switch the modem on/off line.  It directly controls the 
    relay and is not the same as using the HOOK ON/OFF and HANGUP commands.  Those commands will set/clear more 
    then the realy only. 
     
    OLINE(-1)=var  is used to set the seed of the random number generator. 
     
    var=OLINE(-1) is used to read the random number generator. 
     
    Parentheses ( ) are optional. 
    Examples: 
    OLINE3=1
    OLINE3 OFF
    OLINECpu=FALSE
    IF ILINE0=0 THEN OLINE0=1
    OLINE3=ILINE6
    Status(Line)=OLINELine
    PRINT OLINE6
    Syntax: 
    [var] = OLINE(-1)
    OLINE [integer 0..8] = [integer]
    OLINE [integer] = [var] (ON|OFF)
    [num-var] = OLINE [integer 0..8]
    OLINE(-1) = [num]
    See also:  
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    135
      
    ILINE
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    136
      
    ON AT    AT scan event handler 
    ON AT is used to react to the character string AT typed at one of the serial ports. 
    The ON AT event will only happen if AT is detected on a port which has been previously set to AT scan using the 
    command AT. 
     
    When the ON AT event occurs, the port number of the port which received the AT can be found in the system variable 
    PORT. 
     
    The command ON AT OFF will turn off the ON AT event but the AT scan on the ports set with the AT command will 
    remain active. 
    Examples: 
    ON AT GOSUB Menu
    ON AT OFF
    Syntax: 
    ON AT ....
    ON AT OFF
    See also: 
    AT, ON SLASH, PORT
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    137
      
    ON BRK    BRK event handler 
    BRK (a break) is a signaling procedure where the data line is pulled low by the terminal for a certain time, normally caused 
    by somebody pressing the [Break] key on the keyboard. 
     
    This is a very different way of signalling a break which has nothing to do with data.  The use of ON BRK as a procedure to 
    interrupt a program when needed has the enormous advantage that full data transparency can be maintained while it is still 
    possible to interrupt whatever the modem is doing from a remote terminal. 
     
    For example you might use ON BRK to switch from a link with one port to a link with another port while on line: 
    .
    200 ON BRK GOSUB Switch
    .
    1050 %Switch
    1060 INPUT Enter port nr. , x
    1070 LINK#3,#x
    1080 LINK#x,#3
    1090 RETURN
    This will allow you to maintain full data transparency and still switch between ports when needed.  Of course many other 
    useful effects can be programmed using ON BRK. 
     
    When needed, the systems variable PORT will tell you on which port the event happened. 
    Examples: 
    ON BRK GOSUB Switch
    ON BRK OFF
    Syntax: 
    ON BRK ....
    ON BRK OFF
    See also: 
    BRK
      
    						
    All Vidicode manuals Comments (0)