ASCII output from a 504

geniusintraining

Lifetime Supporting Member + Moderator
Join Date
Jun 2005
Location
SC
Posts
8,287
This is the first ascii project that I have worked on, I need to generate a output on the rs232 from a slc504

The output needs to read A9 01 02 CB 00 80 00 F7
Would I just type this into a ST30:0? then using a AWT generated my output?

This is what I have done and I am getting a output I just don’t know if it’s the correct output, I put comas in the ST should I?

If this works I would also get a DD back,
many regards,

 
Nope. You are doing a few things wrong.

First, to put raw characters into the data file, (and it looks like you want to send some pure hex data) you need to 'escape' them first. Try entering your string as:
\a9\01\02\cb\00\80\00\f7
Once entered, the length of the string should be 8. The '\' character tells Logix that the next two characters are to be entered in the string as a hex number.

Also, before sending your message, you should MOV the length of your string into the control block length:
MOV ST30:0.LEN R6:0.LEN

See if that helps.
 
rdrast,

Thank you, I made the changes, it looks good to me, but I am still getting a error in my vb code, the code is...

Private Sub Recieve_Click()
For c = 0 To 19
If com.InBufferCount > 0 Then

com.InputLen = 1
val = com.Input

X(c) = Hex(Asc(val)) //this is were my error shows up

Else
Exit For

End If

Next c

For d = 0 To c
Debug.Print X(d) + " , ";
Next d
Debug.Print "End"
 
Ok, its not the VB file...I set up a hyperlink and could not get anything, I jumpered the pins on the cable and tested it so the cable is fine.

could someone look at my new screen shot and tell me if you see something wrong?

When the rung goes true I get a flash on the 232(led), I get something thats how I get there error in the VB, I just think its not true hex or text with the other test on the hyperterminal

Thanks
 
Greetings geniusintraining,



I’ve got a hunch that it’s working ok ... maybe it’s just that your monitoring program isn’t showing the string ...



this is an old DOS-days monitor that works fine for me ...



monitor.JPG





and here’s the Channel 0 setup screen that I used ...



ch0.JPG




I used the same program construction that you showed in your latest .PDF ...
 
Thanks Ron,

Your post pointed me in the right direction, it was the baud rate in the VB program, I was getting something across but it could not read it at two different speeds

Thanks again

I do need to attend you schooling
 
Glad you got it sorted out, Geniusintraining.

Ron, what's that serial monitor you showed ? I have a license for HHD Software's serial monitor, which is very powerful, but that one looks like it's a little more lightweight.
 
Greetings Ken,

I've had it so long that I can't remember where it came from ... I really do think that it was offered as "freeware" but I can't be sure at this late date ... it's only one 19KB file (MONITOR.EXE) dated 1994 ... it's saved the day for me many times when fancier things have failed ...
 

Similar Topics

So, i've hit the deep end. customer has a 25 year old machine (not being replaced anytime soon). Its basic operation has a sequence that...
Replies
33
Views
8,382
Hello everyone, I'm working in RSLogix 5000. I have an ASCII string of letters & numbers (call it String_3) which I have used INSERT to add a...
Replies
3
Views
2,324
Hi Guys and the master Bernie :D I need more advice….I know very little about ASCII transmission via RS-232 I am considering purchasing this...
Replies
5
Views
4,589
Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
115
I have an L24ER-QB1B with a 1769-ASCII card in slot number 4. I'm looking to send data to this zebra printer after every completed sequence. I'm a...
Replies
2
Views
468
Back
Top Bottom