Transfering a string to Basic module from SLC.

kiran

Member
Join Date
Jul 2003
Posts
43
Hi,

I am looking for some help into programming a system involving basic module. The system is with SLC 5/05. I have to send info. of mm/dd/yy/sl# of the part to a part marker using RS232. I have not done such application before. I a have Basic module available to me and was successful in communicating to this on hyperterminal and was able to run a program by refering to the basic program example given AB in the doccumentation.

I need to know how I could generate a string in SLC and pass it Basic module and from there to the Partmark in ASCII.

The ASCII string will have 10 char. in total ie. ddmmyysl# (sl# is 4 chars.)

I have generated all the data in the PLC which is in decimal. I have not been able to string(ASCII) this data together and send it to Basic module. Are there any examples available?

Any help with this is appreciated.

Thanks.

Kiran
 
Do you have to use the Basic module? Why can't you just send the data out channel 0 of the 5/05 with an AWT or AWA instruction?
 
If you are intent on the BASIC module I would suggest sending the date and 4 character (numeric possibly ?) information by way of the module's output image and let the BASIC program assemble them into an appropriate string and then transmit it.

My application had only one number being transferred from the PLC to the BASIC module where it was combined with appropriate leading and trailing characters and sent to a printer. But the one number could easily be more. There are 8 words of output (PLC -> BASIC module) and input (BASIC module -> PLC) available. I used one word in each direction for handshaking and used another for data.

I won't be able to get back to my documentation for a week but the process is something like this:

1. On the proper condition the PLC puts information into output image (O:Slot.word(s)). Then set one of the output words as a trigger.

2. In the BASIC module it is continually calling the function to transfer the PLC output image into the BASIC buffer. Test the trigger word. If it's set then start the processing. Else go back to transferring and testing again.

3. In the BASIC module, when the assembling of the string and transmitting it are done then set a word in the BASIC output buffer as a handshake and invoke the command to send it to the PLC input image. Start reading and testing the trigger word again as above.

4. In the PLC, when the input handshake word turns on you know the string was transmitted. Turn off the output trigger word. Go back to 1 to wait for the proper condition to transmit another string.

5. In the BASIC module, when the trigger word turns off then turn off the handshake word and send that. Now go back up to 2 where it starts looking for a trigger again.
 

Similar Topics

AB 1200P 6181P Needing to transfer .cli file from one 1200P to another. I've loaded the file to the new one but it will not open. File name is KM...
Replies
0
Views
1,294
Hi guys. I am using RS Studio v24 and I have a structure BOOL[2048] inside. When I give project to our HMI designer he sees that array of bools...
Replies
6
Views
2,194
Hi, I've been trying to run my project in Simulation (and check display on VNC viewer). When I try to download a procjet to simulator, then I...
Replies
2
Views
1,527
Hi All, I've recently gained control of an existing control system used for purifying water. We have an SLC 5/05 processor and are using RSView...
Replies
8
Views
3,060
Everyone, So I have been on this forum for the last 24hours straight. I have learned a ton, like always. Yesterday I posted about resetting all...
Replies
1
Views
2,693
Back
Top Bottom